nvca: MiniService re-renders chart via ReVal after install and fails running instances on invalid render
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 218
- Forks
- 72
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 427
Description
Describe the bug
Component: NVCA agent, MiniService controller (src/compute-plane-services/nvca/internal/miniservice).
After a Helm MiniService install completes, the rendered chart (the ReVal /v1/render output) is kept only in a local gzip file cache (internal/miniservice/chartcache) backed by an emptyDir volume on the agent pod (pkg/operator/reconcile/nvcaagent_reconcile.go, volume reval-rendered-helmcharts). That cache is lost whenever the agent pod restarts or is rescheduled, and entries are LRU-evicted when the emptyDir hits ENOSPC.
When the cache misses, getRenderedData callers call ReVal again:
collectObjectStatusesininternal/miniservice/status.go(used by both status modes) on every status reconcile of aRunninginstanceprepareUpdateWorkloadininternal/miniservice/reconcile.goduring Helm values updates
render() in reconcile.go returns reconcile.TerminalError when ReVal answers valid=false. In Reconcile, a terminal error from doStatus moves a Running instance to phase Failed and the instance is cleaned up.
Consequences:
- Unnecessary ReVal calls for already-installed instances.
- A transient upstream ReVal problem, or a chart republished under the same URL, tears down a healthy running instance.
Steps or code to reproduce bug
- Deploy a Helm-based function so a MiniService reaches
Running. - Restart or delete the nvca agent pod (or fill the
reval-rendered-helmchartsemptyDirto force LRU eviction). - Make ReVal return
valid=false(for example, point the agent at a broken ReVal endpoint, or republish the chart with a validation error). - Observe that the next status reconcile calls
reval.Renderand the MiniService transitions toFailedand is cleaned up.
Expected behavior
NVCA should persist the rendered chart durably for the lifetime of the instance after the first successful render. Status checks must never call ReVal, and must never fail a running instance because of a re-render.
Additional context
A fix is in progress. Proposed approach:
- Persist the render output in a Secret in the instance namespace (gzipped, hash-annotated, owned by the MiniService).
- Remove the
chartcacheemptyDirvolume from the agent pod. - Downgrade terminal render errors during status checks to retryable errors so a running instance is never torn down by a re-render.
By submitting this issue, you agree to follow our code of conduct and our contributing guidelines.
Contributor guide
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 src/compute-plane-services/nvca/internal/miniservice/reconcile.go and status.go, then inspect internal/miniservice/chartcache and pkg/operator/reconcile/nvcaagent_reconcile.go. Trace getRenderedData, collectObjectStatuses, prepareUpdateWorkload, and the Running-to-Failed transition, then run the relevant NVCA tests. Done means rendered data survives agent restarts, status checks do not re-render, and a re-render failure cannot clean up a running instance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, helm, kubernetes
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100