Repository navigation
ci: cut a release and require a changelog entry only when something that ships changes - #827
Merged
Merged
Conversation
…hat ships changes A release, and the changelog entry that goes with it, are for changes users receive. Bench, test suites, the conformance registry, scripts, workflows, compose files, examples, docs and the website change nothing that ships, so they neither cut a release nor need an entry. change_scope.py gains a ships() question next to the existing infra or product classification, which is left as it is. A path ships when it is under cmd/, internal/ or pkg/ (not a _test.go file and not testdata), is go.mod, go.sum, Dockerfile or .dockerignore, or is under charts/, dashboard/ or alerting/. A path that cannot be placed does not ship. The new --ships flag prints ships=true|false; an empty list or an error still reports true, as the release bot always did. The changelog gate now asks only whether any changed file ships. A fix: that only edits unit tests, the bench harness or the registry no longer needs an entry, whatever the commit subject says. Dependency-only pull requests stay exempt, and the released-history guard and the metadata-sync exemption are unchanged. auto-release.yaml decides on ships after its existing Chart.yaml version-only filter and skips the release when nothing since the tag ships. A Go bump changes the shipped binary, but a workflow-only edit of go-version would not release it. A new test requires go.mod (go and toolchain), the Dockerfile builder image and every setup-go go-version in the workflows to be the same version, so a real bump has to touch go.mod and the Dockerfile.
Contributor
PR Quality ReportCompared against base branch Coverage and tests
Compatibility
Performance smokePerformance smoke was skipped for this PR because no perf-sensitive paths changed. State
|
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A release, and the changelog entry that goes with it, are for changes users receive. This PR makes both depend on one question, "does anything that ships change?", instead of on the infra or product classification and on commit subjects.
Bench, test suites (Go e2e, Playwright), the conformance registry and evidence, scripts, workflows, compose files, examples, docs and the website never cut a release and never need a changelog entry.
CI scoping is untouched:
classify(),scope(), the rule tables and their test expectations are unchanged.Shipped paths
A path ships when it matches one of these (
SHIPPEDinscripts/ci/change_scope.py):cmd/**,internal/**,pkg/***_test.gofiles and anytestdata/directory are excluded: they are compiled into nothing (nogo:embedexists, and a test guards that)go.mod,go.sumDockerfile,.dockerignorecharts/**templates/tests/**dashboard/**,alerting/**scripts/ci/sync_observability_assets.shcopies into the chart, and the files the operations guide points users atpkg/**has no files today; it is kept so a package added there ships without anyone editing the table (the dead-glob guard allows it explicitly and fails once the directory exists, so the exemption gets removed).A path that cannot be placed (empty, absolute,
..) does not ship. This is the opposite of the CI classifier, which treats it as product, because releasing on a guess is the mistake this prevents.change_scope.py --shipsprintsships=true|false; an empty list or an internal error printsships=true, as the release bot always behaved, and its remaining checks (changelog content, labels) stay the deciding gate then.Behaviour
fix:touching onlyinternal/x/y_test.gofix:/feat:touching onlybench/,test/,conformance/,scripts/or.github/smoke-test.sh, thewait_*scripts, the quality and conformance gates); no entry for other scripts,.github/and the classifier itself (P4)internal/x/y.goandinternal/x/y_test.gocharts/(includingtemplates/tests/**),dashboard/,alerting/,Dockerfile,.dockerignore,go.mod,go.sum,cmd/,internal/go.mod,go.sum,Dockerfile)go-versionbump fails CI; a real bump must changego.modand theDockerfile, which ship, so it releasesGo toolchain pin test (
scripts/ci/tests/test_go_toolchain_pins.py, run in the lint job's unit-test step): thego.modgodirective (andtoolchaindirective when present), theDockerfilegolang:builder image, and everyactions/setup-gogo-version:in all workflows must be the same version. All workflows are included, not onlyauto-release.yamlandrelease.yaml(which build the release binaries and are asserted to be present), because every workflow already runs the same version and one rule is simpler than two. Eachsetup-gostep must carry a literalgo-version.Changes
scripts/ci/change_scope.py:SHIPPED,NOT_SHIPPED_GO,ships(),any_ships(),--ships.scripts/ci/check_changelog_pr.py:should_require_changelogis "any changed file ships" (with no files, a release-type subject is the only evidence). Obsolete path tables and helpers are removed. The dependency-only exemption, the released-history guard and the metadata-sync exemption are unchanged..github/workflows/auto-release.yaml: the since-last-tag decision callschange_scope.py --shipsafter the existing Chart.yaml version-only filter. No newrun:interpolation..github/workflows/ci.yaml: one line, adds the toolchain pin test to the unit-test step.test_change_scope.py(ships table, real PR fixtures, dead-glob guards, CLI),test_check_changelog_pr.py, newtest_go_toolchain_pins.py.Changed existing assertions in
test_check_changelog_pr.py:fix(proxy)withREADME.mdandbench/ab/daily.py: now no entry (a second case withinternal/proxy/tail.gokeeps the entry);test:withtest/e2e-compat/features_test.go: now no entry;bench:tofeat:to show the subject no longer matters);fix:withinternal/x/y_test.go: now no entry (test renamed);is_dependency_only_prwithbench/visual/package.jsonandbench/visual/run.py: now exempt (the script ships nothing); the rejecting case now pairs the manifest withinternal/proxy/proxy.go;bench/ab/daily.py,bench/visual/package.jsonandconformance/registry/baseline.json, which move to a new non-release test; it gainsdashboard/loki-vl-proxy.json,alerting/loki-vl-proxy-prometheusrule.yamland the chart test template.Proofs
python3 -m unittest discover -s scripts/ci/tests -p 'test_*.py': 181 tests, OK.python3 scripts/ci/check_changelog_pr.py --base origin/main --head HEADon this branch: skipped (no releasable changes detected).go.mod), docs: pin example images, require a peer token in examples, add a Dockerfile HEALTHCHECK #819 (Dockerfile), fix(security): resolve the open Semgrep code-scanning alerts in the release workflows and the unwrap check #804 and fix: count, min, max and avg read one value per Loki series #582 ship.v2.24.4..0638246c(#807)v2.25.1..origin/main(workflows, scripts, tests, Chart.yaml version only)v2.24.5..6c20fb03(#808)v2.25.0..17aa57c1(#819)Dockerfile,go.mod,go.sum)v2.24.3..v2.24.4internal/)actionlint: no findings.zizmor 1.30.1 --offline: identical output tomain(no findings).go-versioninrelease.yamlalone fails it.Not applicable
This PR ships nothing; product checks (e2e vs Loki, Grafana range matrix, visual, A/B, benchstat, load) do not apply. No changelog entry and no release.
It edits
scripts/ci/change_scope.py, which is rule P4, so its own CI run is the full product run.