Repository navigation
build: only warn about stale licenses.yaml versions in PR CI - #20774
Conversation
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
The current head correctly keeps stale-version failures strict by default and only downgrades same-license version drift in the PR CI paths. The custom YAML loader preserves dependency versions as strings, while unknown and mismatched license checks remain blocking; I found no actionable correctness or regression issue.
Reviewed 11 of 11 changed files, including the CI scripts, distribution Maven wiring, license checker and parser, YAML loader, refresh/generation callers, registry changes, documentation, and the expanded tests.
Validation: GitHub reported the PR as MERGEABLE/CLEAN, the prepared worktree merged cleanly against origin/master with git merge-tree, git diff --check passed, and bash -n passed for both changed shell scripts. Maven and Python unit tests were not run; this was a static review.
This is an automated review by Codex GPT-5.6 Luna(Max)
check-licenses.py gets --stale-versions=fail|warn, defaulting to fail. With warn, a reported dependency becomes a warning when its groupId and artifactId are registered under other versions, all with the reported license, and one of those versions is no longer in any report. The warning gives the commands to refresh licenses.yaml. Unregistered dependencies, changed or unknown licenses, license_file_path problems and unknown module tags still fail, and so does a module that starts bundling another version of a library while the registered version still ships. If the dependency ships in the release, registrations under excluded modules do not count. distribution/pom.xml passes druid.distribution.licenses.staleVersions (default fail) to the check, and packaging-check.sh sets it to warn, so release builds stay strict.
4315404 to
0351daa
Compare
check-licenses.py now separates stale versions from missing licenses in both modes, so the release build lists them with the refresh hint instead of as missing licenses. --stale-versions only decides whether they fail the check. Drop the --stale-versions flag from license_checks_script.sh: nothing calls that script.
FrankChen021
left a comment
There was a problem hiding this comment.
🟡 Changes recommended
The stale-version classifier can downgrade a genuinely missing shipped dependency when its current GAV is registered only under an excluded module. PR CI may then pass while the release build later fails due to the missing license registration.
Reviewed 5 of 5 changed files; finding in 1 file.
Validation: git diff --check and bash -n .github/scripts/packaging-check.sh passed. The targeted Python test was blocked by missing yaml/PyYAML.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
This is an automated review by Codex GPT-5.6-Luna(max)
After addressing the findings or replying to the comments, you can request another review from me to trigger a new automated review.
…missing split_stale_versions treated a reported version that is registered only under an excluded module, with an older version registered under a shipped module, as stale. When an extension ships that version, the release has no registration for the jar and refresh-license-versions.py neither updates nor flags the entry. Only treat a missing version as stale when it is in no licenses.yaml entry at all.
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
The prior P1 is resolved in the current head: stale-version classification now requires the current GAV to be absent from licenses.yaml entirely, so an excluded-only current registration remains a missing license and cannot be downgraded to a warning. The added regression test covers this scenario, and no actionable issues remain in the reviewed changes.
Reviewed 5 of 5 changed files.
Validation: git diff --check passed and bash -n passed for the changed packaging script. The focused Python test was attempted but could not start because the yaml/PyYAML module is unavailable (ModuleNotFoundError: No module named 'yaml'). No Maven or broader tests were run.
This is an automated review by Codex GPT-5.6-Luna(max)
Part of #20732.
Description
Every bump of a bundled dependency fails PR CI until someone edits its version in
licenses.yamlby hand. As proposed on dev@, PR CI now only warns about these versions, and the release build stays strict. The release-guide step that refreshes the versions before each release branch follows in a separate PR, also part of #20732.Warning mode in
check-licenses.pyWith
--stale-versions=warn(the default isfail), a reported dependency becomes a warning instead of an error when:licenses.yamlentry,The warning lists the registered versions and the commands to refresh
licenses.yaml. With the defaultfail, the release build lists the same dependencies as errors with the same commands, rather than as missing licenses.Contributor docs
dev/license.mdnow says what PR CI does when a contributor leaves a version as it is.How it was checked
test_check_licenses.py, which theapache-releasebuild runs:check_licenses()run per mode.licenses.yamlmade stale by hand (OSHI 7.7.1 to 7.7.0, snappy-java 1.1.10.12 to 1.1.10.11):failexits 1 and lists the 3 as stale versions with the refresh commands, andwarnexits 0 with the same 3 as warnings;warnexits 1 on OSHI and still warns on snappy-java;warnexits 1;refresh-license-versions.pythen updates exactly those 2 entries, andfailpasses again../mvnw -pl distribution -Papache-release exec:exec@check-licenseson a stale version fails by default and passes with-Ddruid.distribution.licenses.staleVersions=warn.licenses.yamledits:failreports caffeine 3.3.1, hibernate-validator 9.1.5.Final and xz 1.12.warnwarns on the first two and still fails on xz, whose license changed from Public Domain to 0BSD in 1.12.license_name: Public Domainfor xz 1.12. Master passed it because its check did not know the name0BSD; build: read licenses.yaml versions as strings and fail on unknown license names #20764 added that name and registered xz 1.12 underZero-Clause BSD.This PR has: