Skip to content

ci: fix chart check test shell and comment - #300

Merged
uniqueg merged 2 commits into
devfrom
ci/299-chart-check-followups
Oct 31, 2026
Merged

uniqueg merged 2 commits into
devfrom
ci/299-chart-check-followups

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Two follow-ups to the chart-artifact check (#296), found while porting it to trs-filer and proTES:

  • tests/test_workflows.py: the chart check test runs the step's script with the options of GitHub's default shell for steps without shell: (bash -e, no pipefail), as the runner does, instead of bash -e -o pipefail. It also asserts that the check comes before "Tag image", and its comment no longer says the image is left unattested.
  • .github/workflows/release.yml: the comment of "Check chart" no longer claims a rejected chart leaves "nothing attested or signed, the image included": the image was already pushed untagged by push, with BuildKit's SBOM and provenance attestations; the check only comes before the GitHub attestation, the signature and the tags (and before the chart is attested and signed). Same wording as the trs-filer and proTES ports.

Audit for foca#574: cloud-registry already follows the release image flow (push by digest only in release, scan without environment or secrets, publish in release attests, signs, then tags; CI dev image jobs in dev-images). Nothing else to change.

Closes #299

Verification

  • pytest tests/test_workflows.py: 15 passed.
  • ruff check / ruff format --check on the test file: clean.
  • actionlint .github/workflows/*.yml: no findings.
  • adversarial-reviewer: no high or medium findings; its two low findings (test comment, missing tag ordering assertion) are fixed. quality-reviewer skipped: comment and test-option change only.
  • CI: all checks passed.

Declined review findings

None.

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Correct chart validation test behavior and documentation to match the release workflow's artifact and attestation lifecycle.

Bug Fixes:

  • Align the chart-check test with GitHub Actions' default shell behavior by removing the extra pipefail option.

Enhancements:

  • Ensure the workflow test verifies that chart validation precedes image tagging and accurately describes the artifacts remaining after a rejected chart.
  • Clarify release workflow comments about which image and chart attestations, signatures, and tags are withheld when chart validation fails.

Tests:

  • Update workflow tests to reflect the corrected shell behavior, artifact status, and required ordering of chart validation.

uniqueg and others added 2 commits October 31, 2026 18:44
Run the chart check script in its test with the options of GitHub's
default shell for steps without shell: (bash -e, no pipefail), as the
runner does. Correct the comment of the step: a rejected chart leaves
the image pushed by push, with its BuildKit SBOM and provenance
attestations, but without GitHub attestation, signature and tags.

Closes #299

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assert that the chart check comes before the image is tagged, and align the test comment with the corrected workflow comment.

Refs #299

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates chart-check verification to accurately emulate GitHub’s default Bash invocation and enforce that validation occurs before image tagging and all later attest/sign steps; also corrects the release workflow comment to reflect the image’s pre-existing digest push and BuildKit attestations.

File-Level Changes

Change Details Files
Align the chart-check test with GitHub Actions shell behavior and verify all required release-ordering constraints.
  • Run the extracted workflow script with Bash -e only, matching the default shell when no shell: is specified.
  • Update test documentation to describe the actual shell options and artifact state.
  • Assert that chart validation precedes image tagging in addition to attestation and signing steps.
tests/test_workflows.py
Clarify the release workflow’s artifact-state guarantees when chart validation rejects the build.
  • Document that the image was already pushed by digest with BuildKit SBOM and provenance attestations.
  • Specify that rejection prevents GitHub attestation, signatures, tags, and chart attestation/signing rather than leaving the image entirely unattested.
.github/workflows/release.yml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c0e3277) to head (196eb6b).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #300   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         2356      2356           
=========================================
  Hits          2356      2356           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 31, 2026 18:12

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Linked issues

#299 ci: fix chart check test shell and comment · 3 of 3 met

# Requirement Status Notes
1 Run the chart-check test with GitHub’s default shell options (bash -e, without pipefail). ✅ Met The test invokes Bash with -e and no -o pipefail.
2 Correct the “Check chart” comment so it accurately describes the image’s existing BuildKit attestations and the GitHub attestation, signature, and tags that the check precedes. ✅ Met The workflow comment distinguishes the image’s existing SBOM and provenance attestations from the GitHub attestation, signature, and tags; the test also asserts the check precedes tagging.
3 Audit the release image flow and leave it unchanged if it already pushes by digest, scans without an environment or secrets, then attests, signs, and tags in release; keep CI dev-image jobs in dev-images. ✅ Met The release workflow has that flow, and the CI dev-image push and publish jobs use the dev-images environment.

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit 7c3f7aa into dev Oct 31, 2026
19 checks passed
@uniqueg
uniqueg deleted the ci/299-chart-check-followups branch October 31, 2026 18:20
Sign up for free to 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.

ci: fix chart check test shell and comment

1 participant