Version
flate 0.4.10 (container image), also traced against pkg/change/ownership.go on main.
Layout that triggers it
A base/overlay repo where a few meta Flux Kustomizations claim overlay dirs, and overlays pull app bases from OUTSIDE the claimed subtree via plain kustomize resources: refs:
clusters/prod/flux-system/apps.yaml # Flux KS, spec.path: ./apps/prod
apps/prod/<app>/kustomization.yaml # resources: [../../base/<app>, ...]
apps/base/<app>/deployment.yaml # plain resources live here
Symptom
With --path-orig (or --base), an edit that ONLY touches a plain-resource file under apps/base/<app>/ (the most common change in such repos - image bumps, resource limits) is detected by the tree diff but attributed to no owner, so nothing renders and flate diff all emits nothing:
level=DEBUG msg="changed-only mode" ... changed_files=1
level=DEBUG msg="changed-only keep set" size=0 items=[]
Control experiments (all 0.4.10):
- Edit a file INSIDE the claimed overlay (
apps/prod/<app>/ingress.yaml): app enters the keep set, and the rendered diff then correctly includes the base-file delta too.
- Edit a Flux CR (HelmRelease) file in the same unclaimed base dir: caught fine - the full chart template delta renders (resource-level attribution by "file it was loaded from" appears to work; it's only plain resources in unclaimed dirs that fall through).
Why (as far as I can tell)
BuildKSClaims/ownershipIndex claims are KS spec.path prefixes + spec.components + components: read from the kustomization at spec.path. Plain resources: references to dirs outside every claim are not part of the claim set, so ownersOf() returns nil for files under them and the filter drops the change.
Since the loader already walks the full kustomize file graph during discovery, would attributing files via the loaded kustomization's actual input file set (rather than path prefixes alone) be feasible? The single-KS-per-app layout never hits this, but the "few meta-KSs + shared bases" layout is fairly common for smaller repos.
Happy to test patches. (Aside: this made our CI diff comments silently empty for exactly the PRs where reviewers wanted them - documented on our side as a known gap for now.)
Version
flate 0.4.10 (container image), also traced against
pkg/change/ownership.goon main.Layout that triggers it
A base/overlay repo where a few meta Flux Kustomizations claim overlay dirs, and overlays pull app bases from OUTSIDE the claimed subtree via plain kustomize
resources:refs:Symptom
With
--path-orig(or--base), an edit that ONLY touches a plain-resource file underapps/base/<app>/(the most common change in such repos - image bumps, resource limits) is detected by the tree diff but attributed to no owner, so nothing renders andflate diff allemits nothing:Control experiments (all 0.4.10):
apps/prod/<app>/ingress.yaml): app enters the keep set, and the rendered diff then correctly includes the base-file delta too.Why (as far as I can tell)
BuildKSClaims/ownershipIndexclaims are KSspec.pathprefixes +spec.components+components:read from the kustomization at spec.path. Plainresources:references to dirs outside every claim are not part of the claim set, soownersOf()returns nil for files under them and the filter drops the change.Since the loader already walks the full kustomize file graph during discovery, would attributing files via the loaded kustomization's actual input file set (rather than path prefixes alone) be feasible? The single-KS-per-app layout never hits this, but the "few meta-KSs + shared bases" layout is fairly common for smaller repos.
Happy to test patches. (Aside: this made our CI diff comments silently empty for exactly the PRs where reviewers wanted them - documented on our side as a known gap for now.)