Skip to content

Conversation

elfkuzco
Copy link
Collaborator

Changes

  • load offliner versions
  • fetch the latest offliner definition from the versions array. Rationale is that API sorts versions in descending order which they were created and the most recent should be the latest. Could be violated by updating the wrong version but it's the only way of knowing which version is the "latest" as of now.

This closes #167

@elfkuzco elfkuzco requested a review from benoit74 October 15, 2025 10:50
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.11%. Comparing base (c5a8882) to head (e276db7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   56.95%   57.11%   +0.15%     
==========================================
  Files          12       12              
  Lines         546      548       +2     
  Branches       79       79              
==========================================
+ Hits          311      313       +2     
  Misses        233      233              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elfkuzco elfkuzco self-assigned this Oct 15, 2025
@elfkuzco
Copy link
Collaborator Author

elfkuzco commented Oct 16, 2025

This should not be merged until openzim/zimfarm#1422 is merged upstream

Copy link
Collaborator

@benoit74 benoit74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zimit-frontend should not try to guess offliner definition to use, sorry for not having clear enough on that point.

It should have:

  • an env variable (e.g. ZIMIT_DEFINITION_VERSION) which specifies the exact version to use
  • a fallback if this env variable is not set to use the 'tag' from ZIMIT_IMAGE env variable
  • since this is defined in the backend, I suggest we add a new endpoint to retrieve the offliner definition instead of letting the UI directly call the Zimfarm ; the fact that UI directly called the Zimfarm has anyway never been such a great idea since it means double configuration needed anytime we move the Zimfarm, while the UI should not care about that, only backend should ; this will allow to cleanup as well the UI code which will not need anymore the zimfarm_api configuration

@elfkuzco
Copy link
Collaborator Author

closing this as it's cleaner to implement in #177

@elfkuzco elfkuzco closed this Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Properly use offliner definition version

2 participants