Skip to content

feat(chart): HA via CDC or in-flight staging - #1358

Merged
kalbasit merged 2 commits into
mainfrom
feat-chart-ha-via-cdc-or-in
Jun 8, 2026
Merged

kalbasit merged 2 commits into
mainfrom
feat-chart-ha-via-cdc-or-in

Conversation

@kalbasit

@kalbasit kalbasit commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Helm chart HA validation for in-flight staging (group 10, BREAKING). The
replicaCount > 1 guard in _helpers.tpl now passes when EITHER config.cdc.enabled
OR config.inflightStaging.enabled is set, with no bypass. Because staging is
zero-overhead-until-contention, every HA operator can satisfy the guard safely,
so the accept-the-risk escape hatch protected no remaining use case.

BREAKING: config.cdc.iLoveTimeouts is removed. Migration: set
config.inflightStaging.enabled=true (or config.cdc.enabled=true). A validation
test asserts that supplying the now-unrecognized iLoveTimeouts no longer
bypasses the guard.

  • values.yaml: add config.inflightStaging.{enabled,retention,partSize}; remove
    config.cdc.iLoveTimeouts; update HA warnings.
  • configmap.yaml: render config.inflightStaging.* into the ncps config
    (cache.inflight-staging.*), formatting part-size as an integer.
  • tests/validation_test.yaml: neither-fails, staging-passes, cdc-passes, and
    iLoveTimeouts-no-longer-bypasses cases (helm unittest green, 157 tests).
  • nix/k8s-tests/config.nix: the two HA permutations that ran with
    cdc.iLoveTimeouts now exercise real in-flight staging instead.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kalbasit, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 21 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dc268510-c593-47eb-aeb6-da78baf1895b

📥 Commits

Reviewing files that changed from the base of the PR and between 433889c and 638a4a3.

📒 Files selected for processing (5)
  • charts/ncps/templates/_helpers.tpl
  • charts/ncps/templates/configmap.yaml
  • charts/ncps/tests/validation_test.yaml
  • charts/ncps/values.yaml
  • nix/k8s-tests/config.nix
📝 Walkthrough

Walkthrough

The PR replaces the HA CDC-only requirement with an OR condition: HA deployments must enable either CDC or the new in-flight NAR staging option. It removes the iLoveTimeouts bypass, adds config.inflightStaging configuration, updates validation logic and test coverage, and refactors test infrastructure to use the new staging mechanism.

Changes

HA Validation and In-Flight Staging

Layer / File(s) Summary
Configuration schema and HA validation logic
charts/ncps/values.yaml, charts/ncps/templates/_helpers.tpl, charts/ncps/templates/configmap.yaml
New config.inflightStaging block (with enabled, retention, partSize) added to values with HA documentation updated. HA validation now requires CDC or inflightStaging enabled; the iLoveTimeouts bypass is removed. ConfigMap template conditionally renders the inflight-staging configuration section.
HA validation test coverage
charts/ncps/tests/validation_test.yaml
Tests updated to verify HA fails when both CDC and inflightStaging are disabled, succeeds when either is independently enabled, and confirm iLoveTimeouts bypass no longer permits HA without at least one staging option. Two new passing cases added for CDC-only and inflightStaging-only HA configurations.
Test permutation infrastructure updates
nix/k8s-tests/config.nix
HA test permutations (ha-s3-postgres, ha-s3-mariadb) switch from cdc.iLoveTimeouts = true to inflightStaging.enabled = true. Helm values generation updated to produce inflightStaging.enabled sourced from permutation data instead of cdc.iLoveTimeouts.

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

size:M

🐰 A fleece of logic refined so clear,
CDC and staging, either will steer,
No timeouts to fret, just choices that ring—
HA blooms with the new staging spring! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: enabling HA via either CDC or in-flight staging, matching the core objective of the changeset.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the HA validation logic, breaking changes, and migration path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces in-flight NAR staging as an alternative to Content-Defined Chunking (CDC) for High Availability (HA) deployments. It updates the Helm chart templates, values, and validation tests to enforce that HA mode (replicaCount > 1) requires either CDC or in-flight staging to be enabled, while removing the deprecated iLoveTimeouts bypass flag. The review feedback suggests adding defensive guards in the Helm templates to prevent rendering errors if config.inflightStaging is nil, and recommends using the more idiomatic int filter instead of float formatting for the partSize configuration.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread charts/ncps/templates/_helpers.tpl Resolved
Comment thread charts/ncps/templates/configmap.yaml Resolved
Comment thread charts/ncps/templates/configmap.yaml Resolved
@kalbasit

kalbasit commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalbasit

kalbasit commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalbasit

kalbasit commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalbasit

kalbasit commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from b7e105b to d640de5 Compare June 8, 2026 00:11
kalbasit added a commit that referenced this pull request Jun 8, 2026
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from 433889c to a3466dc Compare June 8, 2026 00:11
@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from d640de5 to bab5ed2 Compare June 8, 2026 00:19
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from a3466dc to f9b4797 Compare June 8, 2026 00:19
@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from bab5ed2 to c546455 Compare June 8, 2026 00:27
kalbasit added a commit that referenced this pull request Jun 8, 2026
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from f9b4797 to c2f98b1 Compare June 8, 2026 00:27
@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from c546455 to 66282cc Compare June 8, 2026 00:42
kalbasit added a commit that referenced this pull request Jun 8, 2026
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from c2f98b1 to b5822ac Compare June 8, 2026 00:42
@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from 66282cc to 2c630bd Compare June 8, 2026 00:49
kalbasit added a commit that referenced this pull request Jun 8, 2026
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from b5822ac to 83be552 Compare June 8, 2026 00:49
@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from 2c630bd to 74d511a Compare June 8, 2026 00:56
kalbasit added a commit that referenced this pull request Jun 8, 2026
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from 83be552 to e1a4ada Compare June 8, 2026 00:56
@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from 74d511a to dbf22de Compare June 8, 2026 01:04
kalbasit added a commit that referenced this pull request Jun 8, 2026
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from e1a4ada to f46fc73 Compare June 8, 2026 01:04
@kalbasit
kalbasit force-pushed the feat-cache-restart-staging-on branch from dbf22de to 3c211b3 Compare June 8, 2026 01:11
kalbasit added a commit that referenced this pull request Jun 8, 2026
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from f46fc73 to 9df284c Compare June 8, 2026 01:11
Base automatically changed from feat-cache-restart-staging-on to main June 8, 2026 01:18
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jun 8, 2026
kalbasit and others added 2 commits June 8, 2026 01:19
Helm chart HA validation for in-flight staging (group 10, BREAKING). The
replicaCount > 1 guard in _helpers.tpl now passes when EITHER config.cdc.enabled
OR config.inflightStaging.enabled is set, with no bypass. Because staging is
zero-overhead-until-contention, every HA operator can satisfy the guard safely,
so the accept-the-risk escape hatch protected no remaining use case.

BREAKING: config.cdc.iLoveTimeouts is removed. Migration: set
config.inflightStaging.enabled=true (or config.cdc.enabled=true). A validation
test asserts that supplying the now-unrecognized iLoveTimeouts no longer
bypasses the guard.

- values.yaml: add config.inflightStaging.{enabled,retention,partSize}; remove
  config.cdc.iLoveTimeouts; update HA warnings.
- configmap.yaml: render config.inflightStaging.* into the ncps config
  (cache.inflight-staging.*), formatting part-size as an integer.
- tests/validation_test.yaml: neither-fails, staging-passes, cdc-passes, and
  iLoveTimeouts-no-longer-bypasses cases (helm unittest green, 157 tests).
- nix/k8s-tests/config.nix: the two HA permutations that ran with
  cdc.iLoveTimeouts now exercise real in-flight staging instead.
Address review feedback on PR #1358:

- HA validation guard and the configmap now defensively guard against a nil
  config.inflightStaging (and (and .X .X.enabled)), so a values file that omits
  the inflightStaging block — e.g. after upgrading from an older chart — does not
  error with a nil-pointer evaluation (PRRT_kwDONV6tZs6Hr3Jg, PRRT_kwDONV6tZs6Hr3Ji).
- Render part-size with the int filter instead of printf "%.0f" (... | float64),
  which is cleaner and avoids any float/scientific-notation formatting mismatch
  (PRRT_kwDONV6tZs6Hr3Jj).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@kalbasit
kalbasit force-pushed the feat-chart-ha-via-cdc-or-in branch from 9df284c to 638a4a3 Compare June 8, 2026 01:19
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 8, 2026
@kalbasit
kalbasit enabled auto-merge (squash) June 8, 2026 01:19
@kalbasit
kalbasit merged commit b215866 into main Jun 8, 2026
39 checks passed
@kalbasit
kalbasit deleted the feat-chart-ha-via-cdc-or-in branch June 8, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request helm merge-stack size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant