wp1 icon indicating copy to clipboard operation
wp1 copied to clipboard

Properly use Zimfarm offliner definition version

Open benoit74 opened this issue 3 months ago • 4 comments

This is a follow-up to https://github.com/openzim/zimfarm/pull/1266

This PR introduced the notion of offliner definition to correctly model that scraper flags are changing over scraper releases.

We introduced it in a non-breaking way so we have "time" to adapt, but we need to move forward to clean things afterwards.

We need to adapt wp1 to:

  • store somewhere which zimit offliner definition version is currently in use
  • properly set this version to use when creating a schedule
  • properly retrieve the definition of current version to display flags

@elfkuzco I feel like you can propose a PR here, and @audiodude and myself will review. Is it ok for you?

benoit74 avatar Oct 02 '25 08:10 benoit74

Yes

elfkuzco avatar Oct 14 '25 15:10 elfkuzco

This was intended for wp1 ... my bad

benoit74 avatar Oct 14 '25 18:10 benoit74

In openzim/zimfarm#1422, the backend determines the "latest" version to use. Is there any need for wp1 to set the version again?

elfkuzco avatar Oct 16 '25 06:10 elfkuzco

I think this is not such a good idea. It will work "in general", but might fail in some occasion.

WP1 has the ability to define which Docker image tag (mwoffliner version) to use, see https://github.com/openzim/wp1/blob/36c92a55b02970b78976bacf952ccf8408adcd5e/wp1/zimfarm.py#L209-L214

It should be able to define the offliner definition version as well.

Should WP1 decide to use a "non-latest" mwoffliner version (it does anytime after release event for few hours before its configuration gets updated), then it should use "non-latest" offliner definition version.

And it should also be able to use a custom version if needed for whatever reason.

We should probably have same behavior than in zimit-frontend:

  • introduce a new configuration in credentials.py to specify offliner definition version to use
  • if this configuration is not set, fallback to assume we can use the tag of Docker image as offliner definition version (because this is in general correct)

benoit74 avatar Oct 16 '25 09:10 benoit74

Fixed by https://github.com/openzim/wp1/pull/1027

benoit74 avatar Dec 02 '25 13:12 benoit74