Skip to content

fix(operator): keep collecting usage past a failed write - #316

Merged
v0l merged 2 commits into
masterfrom
fix/usage-breakdown-per-deployment-315
Jul 29, 2026
Merged

v0l merged 2 commits into
masterfrom
fix/usage-breakdown-per-deployment-315

Conversation

@v0l

@v0l v0l commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Closes #315.

collect_usage propagated the first failed write with ?, so one deployment's error left every deployment behind it in the iteration order with no reading at all (lnvps_operator/src/app_deployments.rs:1348). Both writes now log and move on, matching what the compose-parse failures a few lines below already did.

collect_usage takes the db and the metrics client rather than the whole Context, so the test does not need a kube client. MockDb gains failing_usage_writes, the only way to reach a failing write from a test.

Verified at 2a1557a: cargo test --workspace --exclude lnvps_e2e 854 passed / 0 failed, e2e 163 pass, fmt clean and no new clippy warnings on either crate. The new test fails on the old code with usage write denied for 1.

From the lnvps channel.

v0l added 2 commits July 29, 2026 09:27
One deployment's write failing left every deployment behind it in the
iteration order with no reading at all.
@v0l
v0l merged commit a9e1172 into master Jul 29, 2026
6 checks passed
@v0l
v0l deleted the fix/usage-breakdown-per-deployment-315 branch July 29, 2026 08:54
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.

Operator: one failed usage-breakdown write skips the rest of the pass

1 participant