Skip to content

fix(hack): keep root monitoring redirects off in the E2E install - #4811

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/e2e-select-install-monitoring-namespace
Oct 7, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/e2e-select-install-monitoring-namespace

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

This fixes the E2E install on pull requests that select only a few suites. Today those runs fail before any suite starts: cozystack-basics fails with namespaces "cozy-monitoring" not found, and every package waiting on basics never installs.

The reduced install from #4022 disables every package the selected suites don't need. For narrow selections like vminstance or the Kubernetes suites, that list includes metrics-server, monitoring-agents and monitoring, which are the only packages that create cozy-monitoring. Basics still renders three ExternalName redirects into that namespace, because monitoring.rootEnabled stays at its default of true. Wide selections keep at least one of those packages, so they pass.

The E2E install already sets Tenant/root spec.monitoring to false, and rootEnabled is meant to match it. The harness now sets rootEnabled: false, so basics no longer writes into a namespace the install may not create. No suite uses these redirects. With root monitoring off they pointed at nothing even on full runs.

The same failure can happen in a real cluster when a user disables those three packages. That needs a product change and is tracked in #4810.

Screenshots

Downstream repositories

Release note

fix(hack): the E2E install keeps root monitoring redirects off, so runs that select only a few suites no longer fail on a missing cozy-monitoring namespace.

Summary by CodeRabbit

  • Bug Fixes
    • Root monitoring stays disabled in generated platform package settings when cozy-monitoring is omitted, preventing monitoring Services from being rendered in narrowly selected test suites.
  • Documentation
    • Clarified how the root monitoring setting relates to the installation’s Tenant/root configuration and which setting to change to enable it.

The E2E install sets Tenant/root spec.monitoring to false, but left the
platform monitoring.rootEnabled at its default of true, so
cozystack-basics rendered its vlinsert/vminsert ExternalName Services
into cozy-monitoring regardless.

That namespace is created only by metrics-server, monitoring-agents and
monitoring. A narrow suite selection disables all three, so basics
fails with `namespaces "cozy-monitoring" not found` and every package
waiting on it never installs. Wide selections passed only because they
keep at least one of those packages.

Setting rootEnabled to match the root tenant removes the dependency and
is what the value's contract asks for anyway.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
@github-actions github-actions Bot added size/S This PR changes 10-29 lines, ignoring generated files area/dx Issues or PRs related to developer tooling (hack/ scripts, package Makefiles, cozypkg) kind/bug Categorizes issue or PR as related to a bug labels Oct 7, 2026
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c7061bda-19b9-43ec-8d01-d12fdc23bc89
📥 Commits

Reviewing files that changed from the base of the PR and between cbc9d0c and 84daaf0.

📒 Files selected for processing (3)
  • hack/e2e-install-cozystack.bats
  • hack/e2e-platform-packages.sh
  • hack/platform-packages_test.bats

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Generated platform package values now set monitoring.rootEnabled to false. Comments identify the setting, and tests check it with empty and vminstance selectors.

Changes

Root monitoring setting

Layer / File(s) Summary
Set and check the root monitoring value
hack/e2e-platform-packages.sh, hack/e2e-install-cozystack.bats, hack/platform-packages_test.bats
Generated platform values set monitoring.rootEnabled to false. A comment identifies the setting to change when enabling root monitoring. Tests check the value with empty and vminstance selectors.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 84daa

The change removes unused root monitoring redirects without disabling the packages required by narrow or full installs. No material merge risk is apparent; proceed with ordinary checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: disabling root monitoring redirects in the E2E install.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@IvanHunters IvanHunters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

Focused test-infra fix and the mechanism checks out. hack/e2e-platform-packages.sh renders the platform Package with variant: isp-full, which inherits monitoring.rootEnabled: true from packages/core/platform/values.yaml. The install sets Tenant/root spec.monitoring: false, so the two disagreed, and cozystack-basics/templates/monitoring-external-services.yaml then rendered the ExternalName Services into cozy-monitoring, a namespace a narrow suite selection never creates. Pinning rootEnabled: false in the generator matches the chart's own documented rule to keep monitoring.rootEnabled in sync with Tenant/root spec.monitoring.

Verified: hack/platform-packages_test.bats passes (all 12) on the head and on the tree merged with current main; the new guard catches the regression (flipping the generator back to rootEnabled: true turns the test red); the cross-reference comment in e2e-install-cozystack.bats is accurate. No blocking findings; change is hack/-only.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit d7f3f0d into main Oct 7, 2026
20 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the fix/e2e-select-install-monitoring-namespace branch October 7, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dx Issues or PRs related to developer tooling (hack/ scripts, package Makefiles, cozypkg) kind/bug Categorizes issue or PR as related to a bug size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants