Skip to content

Conversation

@elfkuzco
Copy link
Contributor

@elfkuzco elfkuzco commented Oct 6, 2025

Changes

@elfkuzco elfkuzco requested a review from benoit74 October 6, 2025 07:45
@elfkuzco elfkuzco linked an issue Oct 6, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (49f1155) to head (5857667).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #46   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files           4        4           
  Lines         376      376           
  Branches       37       37           
=======================================
  Hits          347      347           
  Misses         25       25           
  Partials        4        4           

☔ 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.

Copy link
Contributor

@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.

I feel like we should:

  • replace "farm" with "zimfarm" for clarity (in job, filename, variables, comments, ...)
  • rename file from devdocs.json to offliner-definition.json (so that we have same name in all scrapers, and it is way easier for scraper maintainers to understand what this file is about)

Sorry for these nitty-gritty details, but it is worth to polish this first PR before spreading this over all scrapers ^^

Thank you overall, once both details above are fixed we should merge and try to make it run on main, we might realize there is something still needing polishing, but we shouldn't care.

@elfkuzco
Copy link
Contributor Author

elfkuzco commented Oct 6, 2025

Okay. I was thinking if there's a way we could reuse the workflow given all the scrapers are all on the same org repo.
Also, I realize I need to create an endpoint for PATCH too

@benoit74
Copy link
Contributor

benoit74 commented Oct 6, 2025

Okay. I was thinking if there's a way we could reuse the workflow given all the scrapers are all on the same org repo.

Is there a way in Github to run "org" CIs ?

Also, I realize I need to create an endpoint for PATCH too

I didn't dare to mention it because I was afraid I just missed it during my review 🤣 Or maybe we could say that POST allows to both create or update definition (a bit more risky, but not that a big deal)

@elfkuzco
Copy link
Contributor Author

elfkuzco commented Oct 6, 2025

Is there a way in Github to run "org" CIs ?

I am currently looking at https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows#creating-a-reusable-workflow but it doesn't seem to cover what I need. Not sure if it respects the on because the job shouldn't run everytime. Otherwise, it serves. It would have to live in one repo. Not sure if there's a way to setup org level CI without a repo

@elfkuzco elfkuzco requested a review from benoit74 October 6, 2025 08:45
@elfkuzco
Copy link
Contributor Author

elfkuzco commented Oct 6, 2025

# .github/workflows/reusable-offliner.yml
name: Offliner Reusable Workflow

on:
  workflow_call:
    inputs:
      version:
        required: string
        type: string
      offliner:
       required: true
       type: string

jobs:
  offliner:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Running offliner with version=${{ inputs.version || 'auto' }}"

and then in devdocs

# .github/workflows/offliner-triggers.yml
name: Offliner Triggers

on:
  push:
    branches: [main]
    paths:
      - "offliner-definition.json"
  release:
    types: [published]

jobs:
  call-reusable:
    uses: ./.github/workflows/reusable-offliner.yml
    with:
      version: ${{ github.event.release.tag_name || 'dev' }}
      offliner: devdocs

@elfkuzco
Copy link
Contributor Author

elfkuzco commented Oct 6, 2025

I reckon it could take more arguments

@elfkuzco
Copy link
Contributor Author

elfkuzco commented Oct 6, 2025

I think openzim/overview would be a good place to place the reusable workflow. What do you think?

@benoit74
Copy link
Contributor

benoit74 commented Oct 6, 2025

I think openzim/overview would be a good place to place the reusable workflow. What do you think?

Yes, we should give it a try

@elfkuzco
Copy link
Contributor Author

elfkuzco commented Oct 6, 2025

set up openzim/overview#64 for the reusable workflow

Copy link
Contributor

@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.

LGTM, I will try to run this once you've merged

@elfkuzco elfkuzco force-pushed the offliner-definitions branch from fe3c8b4 to 5857667 Compare October 6, 2025 14:25
@elfkuzco elfkuzco merged commit 9a228a9 into main Oct 6, 2025
8 checks passed
@elfkuzco elfkuzco deleted the offliner-definitions branch October 6, 2025 14:26
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.

Adopt the new offliner-definition.json file

3 participants