Skip to content

ci: check license notices freshness at PR time - #278

Merged
LeeroyHannigan merged 1 commit into
mainfrom
ci/license-notices-pr-check
Aug 19, 2026
Merged

ci: check license notices freshness at PR time#278
LeeroyHannigan merged 1 commit into
mainfrom
ci/license-notices-pr-check

Conversation

@robinnsc

Copy link
Copy Markdown
Collaborator

What

A Licenses workflow that runs devtools/generate-software-license-notices --check on pull requests, merge groups, and pushes to main — the exact
script and pinned cargo-about 0.9.0 the release-image gate uses (the
script itself refuses any other version, so the PR-time and release-time
checks cannot drift apart). Path-filtered to the generator's inputs
(Cargo.toml/Cargo.lock, the notices file, about config, the script
itself); the binary is cached so the common case adds seconds, not a
compile. contents: read only.

Why

Follow-up to the process gap called out in #272: the notices check ran only
inside release-image, so #271's version bump merged 32/32 green while
leaving main unable to produce a release candidate — discovered only when
the v0.1.6 tag was dispatched. This moves the failure to the PR that
causes it, where the fix is one regeneration command instead of a burned
tag dispatch.

The release-gate check stays: it is the unconditional backstop for anything
the path filter cannot anticipate.

Testing done

Checklist

  • All tests pass (cargo test --workspace) — not applicable, workflow-only change
  • Code is formatted (cargo fmt --check) — not applicable
  • Clippy is clean (cargo clippy -- -W clippy::pedantic) — not applicable
  • I have added or updated tests for new functionality — the check is itself the test; discriminating pass/fail cases cited above
  • I have updated documentation if behavior changed — header documents rationale and the Fixes IAM condition evaluation for multivalued condition keys #271/chore(licenses): regenerate notices for 0.1.6 #272 incident
  • Breaking changes are noted below (if any)

ADR / RFC: n/a — CI tooling only.

Breaking changes

None.


By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

The notices file embeds workspace crate versions and the only check
lived in release-image's gate, so a version bump could merge fully
green while leaving main unreleasable (#271, unblocked by #272).
Reuses the same devtools script with the same pinned cargo-about the
release gate uses, so the two checks cannot disagree. Path-filtered
to the generator's inputs; the release gate stays as the backstop.

@LeeroyHanniganLeeroyHannigan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good change. Running the same script with the same pinned cargo-about at PR time removes any way for the PR gate and release gate to disagree, and the path filter matches the generator's real inputs. Approving.

  • dtolnay/rust-toolchain@master is a floating branch ref. Everything else in CI is @stable or a pinned version, use @stable here too.
  • If we make notices-current a required check, require it via the merge queue. It's path-filtered on pull_request, so PRs that don't touch those paths would wait forever on a check that never runs.
  • Once the dev container lands there'll be a second notices file for the sqlite feature set that needs the same treatment.

@LeeroyHannigan
LeeroyHannigan added this pull request to the merge queueAug 19, 2026
Merged via the queue into main with commit ffb7ea4Aug 19, 2026
18 checks passed
yesyayen pushed a commit to yesyayen/extenddb that referenced this pull request Aug 19, 2026
SOFTWARE-LICENSE-NOTICES.html embeds the resolved dependency set, so it went
stale when ExtendDB#285 consolidated on a single crypto stack and dropped `ring` from
the graph. The shipped file still listed `ring 0.17.14` and carried the whole
ISC licence section that existed only for it.
Regenerating removes exactly that and nothing else: the Apache-2.0 count moves
212 to 211, ISC 6 to 5, and the ring entry plus its ISC block are deleted.
Two insertions, twenty-four deletions, no other dependency affected.
Why main went red rather than the PR that caused it: ExtendDB#278, which added the
PR-time freshness check, and ExtendDB#285, which changed the graph, merged in the same
merge-queue batch twenty seconds apart (ffb7ea4, 0a3aaa0, 1ae553d). Neither was
red on its own. ExtendDB#285 predated the check existing, and ExtendDB#278's own PR was green
because `ring` was still legitimately listed at that point. Only the
combination is red, and the batch merged despite `notices-current` failing on
the batch head, so that context is not currently required.
This is release-blocking, not just a red mark: release-image's gate runs the
same freshness check, so main cannot be released while the file is stale. That
is the failure mode ExtendDB#278's own header describes from the 0.1.6 bump.
Generated with the pinned cargo-about 0.9.0 via
devtools/generate-software-license-notices, the same script and pin the CI job
and the release gate both invoke, so PR-time and release-time cannot disagree.
Verified: devtools/generate-software-license-notices --check exits 1 on
1ae553d and 0 with this change. No Rust sources touched.
Sign up for freeto 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.

2 participants

@robinnsc@LeeroyHannigan