Skip to content

Fix unknown HelmChart OCI build error from unready source#2074

Open
immanuwell wants to merge 1 commit into
fluxcd:mainfrom
immanuwell:fix-894-oci-source-ready
Open

Fix unknown HelmChart OCI build error from unready source#2074
immanuwell wants to merge 1 commit into
fluxcd:mainfrom
immanuwell:fix-894-oci-source-ready

Conversation

@immanuwell
Copy link
Copy Markdown
Contributor

@immanuwell immanuwell commented Jun 6, 2026

Fixes #894

If OCI HelmRepository is already Ready=False, the generated HelmChart still tries to build from it and ends up with a pretty meh unknown build error.

This change stops that early and reuses the source failure reason and message.

Repro:

  1. Create a HelmRepository with spec.type: oci and bad creds so it goes Ready=False.
  2. Reference it from a HelmRelease.
  3. Inspect the generated HelmChart.

Before:
FetchFailed=True, reason Unknown, message unknown build error: failed to login to OCI registry

After:
FetchFailed=True, reason AuthenticationFailed, message failed to login to OCI registry

Tested with make tidy fmt vet && make test

Stop HelmChart from attempting an OCI chart build when its source
HelmRepository is already reporting Ready=False.

This keeps the HelmChart failure aligned with the source error
instead of surfacing a later generic unknown build error.

Signed-off-by: immanuwell <pchpr.00@list.ru>
Assisted-by: codex/gpt-5
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.

Fix unknown build error when reconciling HelmChart from an OCI Registry

1 participant