Skip to content

fix(konflux): set prefetch-input so prefetch-dependencies attests package registry proxy - #800

Closed
bsquizz wants to merge 2 commits into
mainfrom
fix/konflux-prefetch-input-package-registry-proxy
Closed

bsquizz wants to merge 2 commits into
mainfrom
fix/konflux-prefetch-input-package-registry-proxy

Conversation

@bsquizz

@bsquizz bsquizz commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Problem

The application-wide enterprise-contract check fails with 5 violations of
prefetch_dependencies.package_registry_proxy_enabled, one each for
api-server, cli, control-plane, web-console and fleet-dashboard.

Root cause

These pipelines already define enable-package-registry-proxy with default: "true"
and wire it into the prefetch task. The rule, however, reads the resolved value from
the image's SLSA attestation, and a task's params are only attested when the task
actually executes. The plain prefetch-dependencies task gates its single step on
when input != ""; with an empty prefetch-input the step is skipped, nothing is
recorded, and the rule sees no enable-package-registry-proxy=true.

The components already on trusted-artifacts (agent-runtime, fullsend-sandbox)
pass because the -oci-ta task has a skip-ta step that runs even on empty input,
so the param is always attested.

Fix

Per Konflux support guidance, set a non-empty prefetch-input so the prefetch step
runs and the (already true) parameter lands in the attestation. No hermetic flag,
no Dockerfile changes.

Component prefetch-input
api-server {"type": "gomod", "path": "components/api-server"}
cli {"type": "gomod", "path": "components/cli"}
control-plane {"type": "gomod", "path": "components/control-plane"}
web-console {"type": "pnpm", "path": "."}
fleet-dashboard {"type": "pnpm", "path": "."}

Applied to all three pipeline variants (push, pull-request, merge-queue) for each
component. 15 files, 30 insertions.

Verification

The prefetch step must succeed or the build fails. This is exercised by the
pull-request and merge-queue pipelines before anything merges. Watch the
per-component enterprise-contract checks flip green.

Lower-confidence rows to watch on the build:

  • control-plane go.mod has in-repo replace directives (=> ../api-server,
    => ../cli); cachi2 supports these but confirm on the build.
  • web-console / fleet-dashboard are pnpm workspace builds; pnpm prefetch is an
    established pattern but is the riskier case.

If any component's prefetch fails, the fallback for that one is migrating it to the
-oci-ta tasks, which clear the rule with empty input and no cachi2 execution.

The app-wide enterprise-contract check only goes fully green once all five build
successfully, since it validates the whole snapshot together.

Note: api-server overlaps open PR #779 (which enables it via a full hermetic
build). If #779 lands first, drop the api-server hunk here.

🤖 Generated with Claude Code

…kage registry proxy

The enterprise-contract rule prefetch_dependencies.package_registry_proxy_enabled
fails for api-server, cli, control-plane, web-console and fleet-dashboard.

These pipelines already wire enable-package-registry-proxy=true, but the plain
prefetch-dependencies task skips its only step when prefetch-input is empty, so the
parameter is never recorded in the SLSA attestation that the rule reads. The
components already on trusted-artifacts (agent-runtime, fullsend-sandbox) pass
because the oci-ta task records params even with empty input.

Set a non-empty prefetch-input per ecosystem (gomod for the Go components, pnpm for
the UI builds) so the prefetch step runs and the parameter is attested. No hermetic
flag and no Dockerfile changes.

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

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

HyperShell environment updated to commit fad70f8

This pull request has a live ephemeral OpenShift environment running commit fad70f8.

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.

Fact Value
Namespaces Platform: hypershell-ci-pr-800 Keycloak: hypershell-ci-pr-800-keycloak
OpenShift console https://console-openshift-console.apps.rosa.hysh-aws-01.c6uk.p3.openshiftapps.com
API https://hypershell-api-hypershell-ci-pr-800.apps.rosa.hysh-aws-01.c6uk.p3.openshiftapps.com
Web console https://hypershell-web-console-hypershell-ci-pr-800.apps.rosa.hysh-aws-01.c6uk.p3.openshiftapps.com
Keycloak admin console https://keycloak-hypershell-ci-pr-800-keycloak.apps.rosa.hysh-aws-01.c6uk.p3.openshiftapps.com/admin/hypershell/console/

Log in through the web console with your GitHub account (you must be a member of the configured organization or on its allowlist) or with a seeded test-tier username and password. To test as developer or platform-admin, sign in as that user, or open the Keycloak admin console, sign in with GitHub, and impersonate that user.

CLI access
oc login --server=https://api.hysh-aws-01.c6uk.p3.openshiftapps.com:443 --web

Setting prefetch-input activates cachi2 build integration, which broke the cli,
control-plane, web-console and fleet-dashboard builds (pnpm resolution 404s and
gomod cache issues) even with hermetic disabled. Only api-server builds cleanly
with gomod prefetch.

Revert prefetch-input on the four that broke, restoring their working builds. They
need the trusted-artifacts (oci-ta) pipeline instead, which clears the
enterprise-contract rule with empty input and no cachi2 integration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bsquizz

bsquizz commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #801

@bsquizz bsquizz closed this Oct 27, 2026
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