Skip to content

Set Ready on OCI HelmRepository objects - #2151

Open
roshpr wants to merge 2 commits into
fluxcd:mainfrom
roshpr:cursor/fix-oci-helmrepository-ready-2135-bad9
Open

Set Ready on OCI HelmRepository objects#2151
roshpr wants to merge 2 commits into
fluxcd:mainfrom
roshpr:cursor/fix-oci-helmrepository-ready-2135-bad9

Conversation

@roshpr

@roshpr roshpr commented Sep 10, 2026

Copy link
Copy Markdown

Fixes #2135

Developed with Cursor assistance.

OCI HelmRepository objects currently finish migration with an empty status, so the Ready/Status printer columns stay blank. After migrating to a static object, set Ready=True with reason NoIndex (no index Artifact; charts are resolved on demand). Treat that Ready state as fully migrated so a later reconcile does not wipe it.

Empty status is no longer treated as already migrated, so existing status: {} objects get the condition on controller restart.

Test coverage

  • Predicate: empty OCI objects require a one-shot reconcile; Ready=True static objects do not
  • Reconciler: leftover HTTP status is dropped, Ready is set, and a second reconcile does not clear it
  • Envtest: creating a type: oci HelmRepository reports Ready without an index artifact

Documentation

Update docs/spec/v1/helmrepositories.md so OCI examples and status docs describe the Ready condition instead of a blank status.

OCI HelmRepositories finished migration with an empty status, so
kubectl Ready/Status columns stayed blank. Set Ready=True with
reason NoIndex after migrating to a static object, and treat that
state as fully migrated so a later reconcile does not wipe it.

Assisted-by: Cursor Grok 4.6/cursor-grok-4.6-high-fast
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Rosh Ramadass <roshpr@gmail.com>

@Karthik-Chowdary Karthik-Chowdary 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.

I reviewed the migration predicate and condition invariants. The current static-object test can accept pre-migration or stale Ready conditions and skip the migration that establishes NoIndex; I left details inline.

@roshpr
roshpr marked this pull request as ready for review September 14, 2026 00:34
Stale Ready=True with reason Succeeded (or empty)
was treated as a completed OCI migration, so the
one-shot reconcile that sets NoIndex could be
skipped. Require Ready=True with reason NoIndex
before skipping migration, and assert that in
predicate and reconciler tests.

Assisted-by: Cursor Grok 4.6/cursor-grok-4.6-high-fast
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Rosh Ramadass <roshpr@gmail.com>
@roshpr

roshpr commented Sep 14, 2026

Copy link
Copy Markdown
Author

@Karthik-Chowdary Thanks for the review.

Hardened the static-object path so tests no longer accept pre-migration or stale Ready (Succeeded or empty reason treated as success). Migration is required until Ready=True with reason NoIndex is established, and the reconciler/predicate tests assert that path.

Pushed in 4368179.

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.

OCI HelmRepository leaves status empty (Ready printer column blank) even when HelmCharts pull successfully

2 participants