Skip to content

fix(control-plane): drop -z- from MPP namespace prefix#1178

Merged
markturansky merged 1 commit intoalphafrom
fix/cp-provisioner-use-project-kube
Apr 2, 2026
Merged

fix(control-plane): drop -z- from MPP namespace prefix#1178
markturansky merged 1 commit intoalphafrom
fix/cp-provisioner-use-project-kube

Conversation

@markturansky
Copy link
Copy Markdown
Contributor

@markturansky markturansky commented Apr 2, 2026

Summary

  • Fixes hardcoded ambient-code--z- prefix in MPPNamespaceProvisioner — the tenant-operator materializes TenantNamespace CRs as ambient-code--<id>, not ambient-code--z-<id>
  • With the wrong prefix, ProvisionNamespace would create the TenantNamespace CR correctly but then poll for ambient-code--z-<id> which never appeared, timing out after 60s every time

Test plan

  • Create a session on MPP cluster — namespace provisioned as ambient-code--<project-id> and becomes active without timeout

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated namespace naming conventions in the control plane provisioning system.

The tenant-operator materializes TenantNamespace CRs as ambient-code--<id>,
not ambient-code--z-<id>. The hardcoded z- prefix caused ProvisionNamespace
to wait 60s for a namespace that never appeared.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 64268807-f943-47f5-af0b-557c4b4e2938

📥 Commits

Reviewing files that changed from the base of the PR and between 7a8ff1f and a1c6216.

📒 Files selected for processing (1)
  • components/ambient-control-plane/internal/kubeclient/namespace_provisioner.go

📝 Walkthrough

Walkthrough

The namespace prefix constant in the namespace provisioner was updated from "ambient-code--z-" to "ambient-code--", affecting how instance IDs are derived from namespace names and how namespace names are constructed during provisioning operations.

Changes

Cohort / File(s) Summary
Namespace Prefix Configuration
components/ambient-control-plane/internal/kubeclient/namespace_provisioner.go
Updated MPP namespace prefix constant from "ambient-code--z-" to "ambient-code--", altering the prefix stripping logic in instanceID() and namespace construction in namespaceName()/NamespaceName().

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Security And Secret Handling ❓ Inconclusive Unable to verify git diff output; shell commands provided without execution context or results. Execute the git commands in an actual shell environment and provide their output for analysis.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title follows Conventional Commits format (fix type) and directly matches the primary change: removing '-z-' from the MPP namespace prefix constant.
Performance And Algorithmic Complexity ✅ Passed String constant update with no algorithmic complexity regressions; all operations remain O(1) or O(n) with reasonable bounds.
Kubernetes Resource Safety ✅ Passed Namespace naming prefix constant change from "ambient-code--z-" to "ambient-code--" has no Kubernetes resource safety implications.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cp-provisioner-use-project-kube
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/cp-provisioner-use-project-kube

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 and usage tips.

@markturansky markturansky merged commit 630e8d7 into alpha Apr 2, 2026
36 checks passed
@markturansky markturansky deleted the fix/cp-provisioner-use-project-kube branch April 2, 2026 21: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.

1 participant