← Back to Pull requests

build: only warn about stale licenses.yaml versions in PR CI #20774

Closed
unknown closed this pull request without merging on Nov 01, 2026 02:49 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 17:25 UTC
Author

Part of #20732.

Description

Every bump of a bundled dependency fails PR CI until someone edits its version in licenses.yaml by 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.py

With --stale-versions=warn (the default is fail), a reported dependency becomes a warning instead of an error when:

  • the reported version is in no licenses.yaml entry,

  • its groupId and artifactId are registered under other versions, all with the reported license, and

  • one of those registered versions is no longer in any report, i.e. the dependency was bumped.
  • The warning lists the registered versions and the commands to refresh licenses.yaml. With the default fail, the release build lists the same dependencies as errors with the same commands, rather than as missing licenses.

    Contributor docs

    dev/license.md now says what PR CI does when a contributor leaves a version as it is.

    <details>
    <summary>How it was checked</summary>

  • Unit tests in test_check_licenses.py, which the apache-release build runs:

  • - a bumped version warns, including when another registered version still ships;
    - each of these fails: an unregistered dependency, a changed license, an unknown reported license, registered versions with mixed licenses, a registered version that still ships, and an old version registered only under an excluded module while the new one ships in the release;
    - one end-to-end check_licenses() run per mode.
  • Against real dependency reports from a local build, with licenses.yaml made stale by hand (OSHI 7.7.1 to 7.7.0, snappy-java 1.1.10.12 to 1.1.10.11):

  • - fail exits 1 and lists the 3 as stale versions with the refresh commands, and warn exits 0 with the same 3 as warnings;
    - with the OSHI license also changed, warn exits 1 on OSHI and still warns on snappy-java;
    - with snappy-java not registered at all, warn exits 1;
    - refresh-license-versions.py then updates exactly those 2 entries, and fail passes again.
  • ./mvnw -pl distribution -Papache-release exec:exec@check-licenses on a stale version fails by default and passes with -Ddruid.distribution.licenses.staleVersions=warn.

  • Replay of #20765, the first grouped Dependabot PR, without its licenses.yaml edits:

  • - fail reports caffeine 3.3.1, hibernate-validator 9.1.5.Final and xz 1.12.
    - warn warns on the first two and still fails on xz, whose license changed from Public Domain to 0BSD in 1.12.
    - #20765 keeps license_name: Public Domain for xz 1.12. Master passed it because its check did not know the name 0BSD; #20764 added that name and registered xz 1.12 under Zero-Clause BSD.
    </details>

    <hr>

    This PR has:

  • been self-reviewed.

  • added documentation for new or modified features or behaviors.

  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.

  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • Diff: 422 lines (+316 / -106) across 5 files Reviewer: amaechler Review duration: 4883m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 422 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.362
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #20774"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45% (MEDIUM) · Higher = larger blast radius
    45%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%
    Repository