openzim / zimfarm

Farm operated by bots to grow and harvest new zim files
https://farm.openzim.org
GNU General Public License v3.0
81 stars 25 forks source link

[regression] Output as Unknown field while output is required field. #879

Closed Popolechien closed 9 months ago

Popolechien commented 9 months ago

When trying to update the recipe I get an error message

Error!
400: Bad Request
"Invalid Request JSON"
{"output":["Unknown field."]}.

This is odd as among recipe parameters the Ouput folder states: Output folder for ZIM file(s). Leave it as /output

Popolechien commented 9 months ago

Recipe is at https://farm.openzim.org/recipes/freecodecamp_en_javascript/edit

benoit74 commented 9 months ago

We have both flags output and output-dir in the configuration, this is not intended. image

The correct flag is output : https://github.com/openzim/freecodecamp/blob/5ec7c6c03b5d104c24e78951ffe37612b5125b2e/scraper/src/fcc2zim/entrypoint.py#L98-L103

But Zimfarm scraper definition is output_dir: https://github.com/openzim/zimfarm/blob/ae32fb60449a5062df08f64d5cde5457ea690869/dispatcher/backend/src/common/schemas/offliners/freecodecamp.py#L102-L112

Let's fix this mess.