Skip to content

aicr upgrade-check --from cluster: read installed release inventory #2531

Closed

Description

@lockwobr

Summary

Add --from cluster, reading installed release inventory through the Helm SDK, so upgrade-check answers "what is actually running here?" rather than "what does this artifact claim?"

Depends on #2530 (SDK vendored) and #2526 (wrappers carry a payload version). Extends #2528.

Why it earns its place beside the artifact path

The artifact path assumes the old bundle in git is what is deployed. Cluster mode is the ground truth for which release version is installed, including when that has drifted from the artifact.

Precise about the limits: this is not a live view of cluster resources. Helm records what it last applied, so a hand-edited Deployment leaves the release metadata unchanged. It answers the version question authoritatively and nothing else.

Version source, per component kind

One rule with two branches: read aicr.run/component-version when present, otherwise read the release's own chart version.

Presence of the annotation is exactly the signal that the chart version means something else, which is why no flag or lookup table is needed.

Release name matches the ComponentRef name from registry.yaml, and everything in an AICR bundle is a Helm release (localformat wraps Kustomize components and raw manifests into generated charts), so helm list -A enumerates the whole stack.

The at-risk scan

Whether a cluster scan runs is a separate axis from where from comes from: it needs a cluster either way, so it is available alongside artifact comparison via --scan-cluster and implied by --from cluster.

A record declares the API groups and kinds it affects (affectedResources). The check lists matching objects carrying no AICR or Helm ownership and reports them as at risk. This is the highest-severity case the design covers: if a user authored their own Skyhook CRs outside AICR, the nodewright rename ships, their objects are untouched, and the 0.20.0 CRD removal cascade-deletes them.

Read-only list operation, not a new assertion format, and advisory: it warns, it does not fail the gate. AICR blocking an upgrade over resources it does not own is a claim it has not earned.

Pre-annotation bundles report unversioned

Bundles generated before #2526 carry version: 0.1.0 and no annotation, so both branches fail. That must report unversioned, not compare 0.1.0 to 0.1.0 and declare no change. unversioned is a gap in the inputs; reporting "no change" would be a silent false negative.

Acceptance

  • --from cluster against a KWOK-installed bundle reports the same versions the artifact path reports for the same artifacts (ADR acceptance criterion 4).
  • Offline mode states it cannot see unmanaged resources rather than omitting the section, since an absent warning reads as an all-clear.
  • The at-risk scan warns and never changes the exit code.

References

ADR-021 Decisions 3 and 5

Activity

  1. self-assigned this
    on Sep 1, 2026
  2. added
    theme/recipes
    on Sep 1, 2026
  3. added theissue type on Sep 1, 2026
  4. mchmarny commented on Sep 8, 2026

    @mchmarny
    Member

    Triaged: Ready→Backlog. Cluster inventory remains blocked on the open Helm SDK work in #2530; neither this issue nor parent #2424 belongs to the v1 milestone.

  5. added this to the v1 milestone on Sep 17, 2026
  6. removed this from the v1 milestone on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/bundlertheme/recipes

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions