ci: test in-place chart upgrades from the latest release and the PR base #627
<!-- codex-pull-request-review-summary -->
<!-- codex-review-state:v1 {"code_review":{"commit_sha":"97c9f6cb52ec1a38f882c5277de2189147f92158","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} -->
<details>
<summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
| --- | --- | --- | --- |
| 📝 Code Review | ✅ Completed <relative-time datetime="2026-11-17T16:06:58.939573Z">2026-11-17T16:06:58.939573Z</relative-time> | 97c9f6c | New commits |
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
</details>
</details>
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest-inline:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:6ba0fd45bb051a5feac0009c192ae252aa0f1a686a5c08ab200af951cdfb283d:inline-0 -->
<sub><sub>!P2</sub></sub> Propagate upgrade failures to the validation gate
<!-- autotest-finding-meta prod_data_type=none finding_id=06e3545f-492a-4b92-b787-841222ab8f68 prod_effect=static -->
When a non-breaking upgrade fails, GitHub skips pr-validated because its dependency failed. Skipped required checks are accepted, so requiring pr-validated alone does not make this upgrade test block merging. Run the aggregate job regardless of dependency outcomes and explicitly fail when a dependency did not succeed.
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- install-chart
- upgrade-from-release
- lint-docs
steps:
- name: Check required job results
run: |
test "${{ needs.install-chart.result }}" = success
test "${{ needs.upgrade-from-release.result }}" = success
test "${{ needs.lint-docs.result }}" = success
- name: validate
<!-- datadog-autotest-feedback-legend:v1 -->
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
<details><summary>What each reaction means</summary>
</details>
<sub>🤖 Bits Code Review</sub> <sub>· <a href="https://app.datadoghq.com/code/1818b42d-cad6-42ba-9686-724d230fb2b1?referrer=autotest-pr-comment">Open Bits AI session</a></sub>
A failed upgrade can leave the aggregate validation check skipped, allowing a required-check gate to accept it. Breaking-change detection also retains an outdated PR title after title edits.
<sub>Open Bits AI session</sub>
<sub>🤖 Bits Code Review · Commit 60ed25e</sub>
<!-- autotest-meta model=gpt-6.1-sol engine=codex reasoning_effort=high verdict=FAIL ddrs_bucket=unknown session_id=1818b42d-cad6-42ba-9686-724d230fb2b1 -->
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:6ba0fd45bb051a5feac0009c192ae252aa0f1a686a5c08ab200af951cdfb283d:bundle -->
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest-inline:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:6ba0fd45bb051a5feac0009c192ae252aa0f1a686a5c08ab200af951cdfb283d:inline-1 -->
<sub><sub>!P2</sub></sub> Refresh breaking-change detection after PR title edits
<!-- autotest-finding-meta prod_data_type=none finding_id=94e9a0d4-eeee-4edf-a329-36e7525463c4 prod_effect=static -->
Editing the PR title to add or remove the breaking marker does not trigger this workflow: the default pull_request activity types exclude edited, and rerunning an existing run retains its original event payload. For a PR without another breaking commit, classification therefore stays stale, potentially tolerating an upgrade failure after the marker is removed or blocking an expected failure after it is added. Include title edits in the workflow triggers; that change lies outside this diff's hunks.
<!-- datadog-autotest-feedback-legend:v1 -->
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
<details><summary>What each reaction means</summary>
</details>
<sub>🤖 Bits Code Review</sub> <sub>· <a href="https://app.datadoghq.com/code/1818b42d-cad6-42ba-9686-724d230fb2b1?referrer=autotest-pr-comment">Open Bits AI session</a></sub>
<details>
<summary>More details</summary>
CI now tests upgrades from the latest release and PR base, with baseline-specific breaking-change exemptions; dependency failures reach the validation gate, fixing its bypass. Reruns fetch the current PR title, resolving stale classification, though title-only edits require a manual rerun; no findings remain open.
</details>
Was this helpful? React 👍 or 👎
<sub>Open Bits AI session</sub>
<sub>🤖 Bits Code Review · Commit d1dd037</sub>
<!-- autotest-meta model=gpt-6.1-sol engine=codex reasoning_effort=high verdict=PASS ddrs_bucket=unknown session_id=1818b42d-cad6-42ba-9686-724d230fb2b1 -->
<!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
<!-- datadog-autotest:v1:prod -->
<!-- datadog-autotest-delivery:v1:prod:47fdb19ab44d154e4663430fd1f61064bfd35aa9997659135f951ada117e6af2:bundle -->
Approved these changes.
This covers a real testing gap, thanks!
thomasqueirozb
JinchengCao
Summary
ct skips its upgrade test whenever the chart's minor version changes.
developmoves to the next minor after every release, so the upgrade test is routinely skipped during the develop release cycle. For #610, ct loggedSkipping upgrade test ... 0.62.0 does not have same major and minor version as 0.61.0.The new
upgrade-chartjob upgrades the chart in place withhelm upgrade, the way users do, for eachci/-default-values.yaml. It starts from the latest published chart and, for PRs, from the chart at the PR's base. Every installation and upgrade must succeed, including for breaking changes. The job runs all of them and reports the failures together.A breaking change must still upgrade in place. If users must change their values first, the PR that makes the change should add a test for that migration to this job. Bypassing the PR check is only for emergencies. The upgrade from the latest release then keeps failing until the change is released, and the automated release workflow, which pushes only after CI passes, stays blocked. For example, an incompatible selector change merged with a bypass would behave as follows:
| Run | From the latest release | From the PR's base |
| --- | --- | --- |
| The breaking PR | Fails | Fails |
| Later PRs | Fails because of the breaking change | Passes unless the PR adds a failure |
| The release push | Fails and blocks the release | Doesn't run |
| PRs after the release | Passes | Passes |
pr-validatednow runs withalways()and fails unless every job it needs succeeded. Before, a failed dependency left it skipped, and a skipped required check counts as passing.References
Related: #620, #621
Testing
- Normal PRs and
releasing/*pushes pass.- A selector change fails both baselines.
- After an unreleased selector change on the base, an unrelated PR fails only the upgrade from the latest release.
- A baseline that doesn't install fails the job.
pr-validatedfails when a needed job ends as failure, skipped, or cancelled.actionlintwith shellcheck passes.