Repository navigation
ci: summarize reference data changes and build on fixes in deps update - #4987
dolfim-ibm wants to merge 1 commit into
Conversation
The nightly deps update job now: - adds a summary of each changed reference file to the PR, from a new git range mode of groundtruth_diff.py, and lists the failing tests - builds on the PR branch once it has commits from other authors: it regenerates the reference data with the fixes, pushes one more commit without a force-push, and posts the summary as a PR comment - updates the PR body through the REST API, because `gh pr edit` fails on the classic Projects fields Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
|
✅ DCO Check Passed Thanks @dolfim-ibm, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit The PR adds a git range mode to CI safety: needs maintainer care before you approve CI.
1 related pull request(s) in the same code
The |
There was a problem hiding this comment.
AI first review (advisory): blocker found
This review covers the full diff at 48e16f63db. It read the code and did not run it.
In update mode the job runs the summary script from the old PR branch, not from main. A branch made before this PR merges has a script without the git range mode, so the summary can say "No reference data changed." when files did change. Check where groundtruth_diff.py comes from in the open-pr job.
A maintainer makes the merge decision. This review never approves the pull request.
| echo | ||
| echo "## Changed reference files" | ||
| echo | ||
| summary=$(python3 .github/scripts/groundtruth_diff.py HEAD~1 HEAD) |
There was a problem hiding this comment.
blocker: Update mode runs a stale groundtruth_diff.py and can report no changes by mistake
Trigger: In update mode the open-pr job checks out needs.lock.outputs.base_sha. That commit is the tip of the existing PR branch, not main. The step then runs .github/scripts/groundtruth_diff.py from that checkout.
The PR branch is never rebased on main. The branch of the open PR #4985 was cut before this PR merges. On main, groundtruth_diff.py has only functions. It has no main() and no __main__ block. A script like that prints nothing when you run it.
Wrong result: summary is empty, so line 317 prints No reference data changed. The new commit may change many reference files. The PR comment then gives a false statement, and the reviewer reads it to decide if the data is safe.
The same applies to every other script and local action that the job takes from the branch. Examples are pytest_marker_selection.py and ./.github/actions/setup-ubuntu-ci. They can be old or edited on a fix branch.
Fix: Take the CI scripts from the default branch. For example, run git show origin/main:.github/scripts/groundtruth_diff.py | python3 - HEAD~1 HEAD, or check out main into a second directory and run the script from there. Also, make the step fail when the script exits with an error. Do not fall back to "No reference data changed." for an empty result.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Improve the nightly update of the locked Docling dependencies (
.github/workflows/update-deps.yml), after the first run in #4985.Changes
groundtruth_diff.pyhas a new git range mode:python3 .github/scripts/groundtruth_diff.py BASE HEAD. The job adds its output to the PR. For each changed reference file it shows the kind of change (structure, tables, text, coordinates only, formatting only) with short details, for examplepicture: 2 → 0. The PR also lists the failing tests of each suite.main.gh pr editfails on the classic Projects fields.Validation
actionlintpasses.tests/test_groundtruth_diff.pypasses, with a new test for the git range mode.