Skip to content

fix(konflux): skip prefetch tasks with empty input - #801

Merged
jsell-rh merged 1 commit into
mainfrom
fix/konflux-skip-empty-prefetch
Oct 27, 2026
Merged

jsell-rh merged 1 commit into
mainfrom
fix/konflux-skip-empty-prefetch

Conversation

@jsell-rh

Copy link
Copy Markdown
Collaborator

Empty prefetch input currently creates a TaskRun whose only step is skipped. The deployed Conforma policy fails to read its already-true proxy parameter because the TaskRun has no status.results, causing five application-wide EC violations.

Skip the entire prefetch-dependencies PipelineTask when prefetch-input is empty for api-server, cli, control-plane, web-console, and fleet-dashboard, across push, pull-request, and merge-queue (15 files). Nonempty input still runs prefetch. The active policy already excludes tasks.required_tasks_found:prefetch-dependencies; builds have no downstream references to prefetch results, and Tekton continues ordering-only dependents after a skipped task.

This is an alternative to #800. It preserves the existing empty-input build behavior and requires no policy changes. The workaround addresses empty-input builds only; the upstream parameter-extraction bug remains relevant if prefetch is enabled later.

Validation:

  • make check passed.
  • All 15 YAML files parse, and structural comparison confirms the task condition is the only configuration change.
  • Confirmed all affected pipelines retain empty prefetch input and have no references to prefetch task results.
  • Replayed a simulated skipped-task attestation through Conforma v0.10.10 and the deployed policy bundle: the proxy violation disappears without introducing another violation.
  • Live Konflux builds and EC validation are still required to confirm the newly generated attestations end to end.

Policy bug source: https://github.com/conforma/policy/blob/fb1d3a6b7d70a6c43e045f0b38c77349a94faba2/policy/lib/tekton/task.rego#L30-L60
Tekton skip semantics: https://tekton.dev/docs/pipelines/pipelines/#guarding-a-task-only

@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

HyperShell environment deploying

Deploying commit 100e323 to an ephemeral OpenShift environment. This comment will update in place once the environment is ready.

Track this deploy

Comment /pr-extend to keep this environment active. Otherwise it is destroyed once e2e testing concludes. If it has already been destroyed, /pr-extend redeploys it.

@jsell-rh
jsell-rh merged commit a98e21b into main Oct 27, 2026
34 of 40 checks passed
@jsell-rh
jsell-rh deleted the fix/konflux-skip-empty-prefetch branch October 27, 2026 18:36
@red-hat-konflux

Copy link
Copy Markdown
Contributor

All PipelineRuns for this commit have already succeeded. Use /retest <pipeline-name> to re-run a specific pipeline or /test to re-run all pipelines.

jsell-rh pushed a commit that referenced this pull request Oct 27, 2026
Add a no-op comment to each pipeline variant of the five components that had
prefetch_dependencies.package_registry_proxy_enabled violations (api-server, cli,
control-plane, web-console, fleet-dashboard) to trigger a fresh build and
enterprise-contract evaluation.

This verifies that #801 (skip the prefetch TaskRun on empty input) actually clears
the violations. The per-component enterprise-contract checks on this PR are the
proof.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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