fix(stack): preserve invocation environment overrides - #1380
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe self-managed stack now validates and merges configured invocation environment values with generated defaults. The default NATS region is ChangesInvocation environment wiring
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change preserves explicit invocation environment overrides and sets the request-queue region to ncp while retaining generated settings; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Merge configured invocation environment values after stack-generated defaults and declare the existing ncp request-queue region explicitly. Closes #1378 Signed-off-by: Stephanie Baum <sbaum@nvidia.com>
6d71098 to
07af4a1
Compare
TL;DR
Preserve self-managed
invocation.envvalues during global values rendering and declare the current working request-queue region (ncp) explicitly.Additional Details
The base environment declares invocation settings under
invocation.env, butglobal.yaml.gotmplpreviously rebuilt the entire environment from tracing, rate-limiter, and worker-stream entries. It did not merge the configured map.NATS_PROPERTIES__REGION: localwas therefore silently discarded, and invocation continued using its application fallback ofncp.The template now builds the stack-owned defaults first and merges configured environment values afterward. Explicit environment values take precedence while unrelated generated settings remain present. A non-map
invocation.envnow fails with a direct validation message.The checked-in region changes from the ineffective
localdeclaration toncp. This preserves current runtime behavior and keeps invocation request subjects aligned with the API and worker consumers.Customer Release Notes
Self-managed invocation environment overrides are now applied consistently, including explicit request-queue region configuration.
Plan Summary
No Kubernetes resources, sizing, storage, or deployment order change. The invocation ConfigMap receives the corrected merged environment.
Usage
Environment-specific invocation settings can be supplied through the existing map:
Changing
NATS_PROPERTIES__REGIONrequires the API, workers, and NATS placement configuration to use the same logical region.For the Reviewer
Please focus on merge precedence in
global.yaml.gotmpl: stack-generated defaults are the base, and explicitinvocation.envvalues are the final override.For QA
No separate QA run is needed for this configuration-only fix. Automated rendering tests cover the default, a custom override, generated-value preservation, and invalid input.
Tests run:
make testfromdeploy/stacks/self-managedbash -n deploy/stacks/self-managed/tests/invocation-env-wiring.shgit diff --checkNotes
This PR is independent of #1370. That PR makes the bundled NATS server eligible for both request-stream creators; this PR fixes environment-value propagation without changing the active region.
Issues
Closes #1378
Related Pull Requests
Dependencies
No new or updated third-party dependencies. No license review or NOTICE update is required.
Checklist
Summary by CodeRabbit
Bug Fixes
Tests