Skip to content

Add on-push retrying info to debug agent and fix typo in build pipeline definition#5008

Open
jvulgan wants to merge 2 commits into
mainfrom
debug-on-push
Open

Add on-push retrying info to debug agent and fix typo in build pipeline definition#5008
jvulgan wants to merge 2 commits into
mainfrom
debug-on-push

Conversation

@jvulgan

@jvulgan jvulgan commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Document a safe procedure for retrying failed on-push pipelines and correct a configuration typo in the build pipeline.

Enhancements:

  • Fix a typo in the build pipeline parameter definition by correcting the git-clone-depth description field.

Documentation:

  • Expand debug agent guidance for missing snapshots to cover transient on-push pipeline failures and appropriate remediation steps.
  • Add detailed documentation on correctly retrying failed on-push pipelines, including limitations of the Konflux UI rerun and required annotations/params.
  • Highlight best practices and caveats for manual on-push retries in the troubleshooting notes, including avoiding the Konflux UI rerun button.

jvulgan added 2 commits July 3, 2026 11:58
Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Document how to retry failed on-push pipelines for the original commit,
using the current pipeline spec (not the archived one) to avoid stale
task bundle digests failing EC checks. Always inject the
ignore-supersession annotation to prevent snapshot supersession.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

Documents a safe, correct procedure for retrying failed on-push Konflux pipelines for the original commit, adds guidance to avoid using the Konflux UI 'Rerun' button, and fixes a typo in the build pipeline parameter definition.

Flow diagram for retrying a failed on-push pipeline

flowchart TD
  A["On-push PipelineRun failed with transient error
(e.g. registry 503, image pull backoff)"] --> B{"Need to retry?"}
  B -->|No| Z["Stop"]
  B -->|Yes| C{"Use Konflux UI Rerun?"}
  C -->|Yes| D["Do NOT use Konflux UI Rerun
It re-resolves {{revision}} to latest main
and builds wrong commit"]
  D --> C
  C -->|No| E["Fetch original PipelineRun JSON
oc get pipelinerun ...
  or kubectl ka get ..."]
  E --> F["Verify revision and title
with jq from archived-plr.json"]
  F --> G["Convert current .tekton/build-pipeline.yaml
spec to JSON with python3"]
  G --> H["Build retry PipelineRun JSON
with jq:
- archived .spec.params
- current pipelineSpec
- adjusted annotations/labels
- git-auth-dummy workspace
- ignore-supersession annotation"]
  H --> I["Create new PipelineRun
oc create -f /tmp/retry-plr.json"]
  I --> J["Verify retry started
oc get pipelinerun ...
filtered by revision"]
  J --> Z
Loading

File-Level Changes

Change Details Files
Document correct retry procedure for failed on-push Konflux PipelineRuns and risks of using stale pipelineSpecs.
  • Expanded root-cause analysis to include transient image/registry errors as a reason for missing snapshots.
  • Updated remediation guidance to prefer retrying the original PipelineRun over pushing a dummy commit, when the failure is transient.
  • Added a new 'Retrying a Failed On-Push Pipeline' section explaining why the Konflux UI 'Rerun' is unsafe for on-push pipelines.
  • Documented that the on-push template uses '{{revision}}' and 'HEAD^', and how reruns resolve them incorrectly against main HEAD.
  • Provided a step-by-step bash/jq/python procedure to reconstruct a new PipelineRun using archived params and the current '.tekton/build-pipeline.yaml'.
  • Explained why the archived pipelineSpec must not be reused due to stale trusted-task bundle digests and EC checks.
  • Described the use of a 'git-auth-dummy' secret for public repos and the need to strip certain PaC annotations and labels.
  • Documented the rationale for always injecting 'test.appstudio.openshift.io/ignore-supersession: "true"' on retries.
  • Mentioned an alternative retry path via redelivering the original GitHub push webhook when you have admin access.
.claude/agents/debug-package.md
Reinforce best practices and caveats in the debug guide around rerunning on-push pipelines.
  • Added a caution in the 'Tips and Gotchas' section explicitly telling engineers not to use the Konflux UI 'Rerun' button for on-push pipelines and to follow the manual retry procedure instead.
.claude/agents/debug-package.md
Fix typo in Tekton build pipeline parameter definition.
  • Corrected the 'descripton' field to 'description' for the 'git-clone-depth' pipeline parameter, ensuring proper field naming.
.tekton/build-pipeline.yaml

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

@jvulgan

jvulgan commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@calungaproject/developers ptal

@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 left some high level feedback:

  • The retry script hardcodes values like the calunga-tenant namespace, .tekton/build-pipeline.yaml path, and git-auth-dummy secret; consider calling these out as variables/placeholders at the top of the snippet so they’re easier to adapt for other tenants/repos.
  • The with_entries(select(.key | test(...))) filters for annotations and labels are quite specific; it may be worth adding a brief inline comment near each explaining what categories are intentionally preserved vs. stripped to make future modifications safer.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The retry script hardcodes values like the `calunga-tenant` namespace, `.tekton/build-pipeline.yaml` path, and `git-auth-dummy` secret; consider calling these out as variables/placeholders at the top of the snippet so they’re easier to adapt for other tenants/repos.
- The `with_entries(select(.key | test(...)))` filters for annotations and labels are quite specific; it may be worth adding a brief inline comment near each explaining what categories are intentionally preserved vs. stripped to make future modifications safer.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant