MapColonies / MapColonies/infra-tools
Chart context: file scope and appVersion-derived tags
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 22h 52m
- Merged PRs (30d)
- 13
Description
## Parent
#17
## What to build
Two behaviours that both need to know which chart governs a values file. First, scope: values files anywhere beneath a chart directory are checked, subchart values included, and that chart's `templates` directory excluded. Second, references with no tag resolve through the governing chart's `appVersion`, matching Helm's own semantics.
The governing chart is the one in the **nearest ancestor directory containing chart metadata**, so a values file inside a subchart resolves against the subchart's own metadata rather than the parent's — which is what Helm would actually deploy. Messages about a tag taken from `appVersion` say so, and the diagnostic attaches to the repository value, since there is no tag in the file to underline; the reader needs to be pointed at the chart metadata rather than left hunting for a tag that is not there.
Absent chart metadata, or an absent `appVersion`, yields no marker.
Editing a chart's `appVersion` re-checks the open files that depend on it, because a version bump otherwise leaves stale checkmarks at exactly the moment correctness matters most.
This lives in the Helm package with filesystem reads injected. Passing `appVersion` in from the extension was considered and rejected in spec #17: which chart governs which values file is Helm knowledge, and leaving it in an editor extension guarantees a future CLI reimplements it.
## Acceptance criteria
- [ ] Values files beneath a chart directory are checked, not only files matching a values naming pattern
- [ ] Files under a chart's `templates` directory are never checked
- [ ] A subchart's values file resolves `appVersion` from the subchart's own metadata, not the parent chart's
- [ ] A tagless reference is checked against the resolved `appVersion`
- [ ] Its diagnostic attaches to the repository value and names chart metadata as the tag's source
- [ ] No chart metadata, or no `appVersion`, produces no marker
- [ ] Changing `appVersion` re-checks the affected open files
- [ ] Chart context resolution tested in the Helm package with filesystem reads injected, so tests describe a directory shape rather than writing temporary files
## Blocked by
- #20 — Structural detection of image references anywhere in a values file
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Helm package and review spec #17 plus the filesystem-read injection points; this work is blocked by #20's structural image-reference detection. Define directory-shape tests for nested charts, templates exclusions, appVersion resolution, diagnostics, and re-checking after metadata changes; done means every acceptance criterion is covered without temporary files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, typescript
- Domain
- devops, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100