Skip to content

fix: decode colons in Flux inventory resource names - #628

Merged
nklmilojevic merged 1 commit into
mainfrom
fix/626-flux-inventory-colons
Sep 17, 2026
Merged

nklmilojevic merged 1 commit into
mainfrom
fix/626-flux-inventory-colons

Conversation

@nklmilojevic

Copy link
Copy Markdown
Owner

Flux inventory entries with colons in RBAC resource names showed invalid inventory entry. The parser treated the encoded __ in each name as field separators.

Parse the namespace from the start and the kind and API group from the end, then convert __ back to : in the name. The managed resource row and Enter navigation now use the decoded name.

Tests cover Role, RoleBinding, ClusterRole, and ClusterRoleBinding names in both Kustomization and HelmRelease views, including names with multiple colons.

Validation: just check (format check, Clippy, and tests).

Closes #626

Parse inventory fields from the outer separators so encoded colons remain in the resource name. Decode the name for display and navigation.

Closes #626
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the parsing change matches the tested Flux inventory encoding and correctly propagates decoded names into display and navigation.

Summary

The PR fixes Flux inventory parsing for RBAC resource names containing encoded colons.

  • Parses namespace from the beginning and kind/API group from the end, preserving encoded separators within the resource name.
  • Decodes __ to : before rendering inventory rows and constructing navigation targets.
  • Adds Kustomization and HelmRelease coverage for namespaced and cluster-scoped RBAC resources, including names containing multiple colons.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Flux inventory ID] --> B[Split namespace from start]
  B --> C[Split kind from end]
  C --> D[Split API group from end]
  D --> E[Decode __ as colon in name]
  E --> F[Render managed-resource row]
  E --> G[Build metadata.name field selector]
  G --> H[Navigate to resource table]
Loading

Reviews (1) · Last reviewed commit: "fix: decode colons in Flux inventory res..."

@nklmilojevic
nklmilojevic merged commit 6036b00 into main Sep 17, 2026
4 checks passed
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.

bug: Flux inventory (managed resources) does not parse all entries correctly

1 participant