feat(operator-wandb): add session key rotation - #661
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c79b7047e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@vanpelt @j7m4 The final commit ( |
|
QA Google prerelease validation is complete for chart The live matrix covered managed prepare/activate/clear, cancellation, accelerated clear, hard cutover, external Secret recovery, API-key continuity, current/previous internal JWT verification, real browser timeout, and all three supported app/local-service topologies. QA is restored and healthy with no temporary Secrets remaining. One live finding: the installed Stakater Reloader restarted API immediately when the referenced external Secret changed, before @vanpelt @j7m4 this clears the prerelease validation gate for review once required checks finish. |
|
QA Google follow-up / correction — July 30, 2026 An external Final artifacts:
Fresh operator/chart results:
The previously exercised supported topology fixtures and live modes remain passing: local-bypass without App, local-bypass with App, and App without local-bypass. The Reloader observation is now documented: a referenced Secret update may trigger an automatic rollout, while |
|
CI triage update: the remaining red checks are the three The same three jobs are currently failing on unrelated branches/runs, including:
In PR 661's run, the OLAP fixture pulls floating I have not added an unrelated fixture/image-pinning change to this PR. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
charts/operator-wandb/tests/session_key_rotation_test.yaml (1)
300-340: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd tests for the remaining rotation validation branches.
Add failed-template cases for an ID without a phase, a phase without an ID, and an unsupported phase. These branches protect invalid rotation state before the Secret is rendered.
As per coding guidelines, “Exercise every meaningful branch in Helm templates with render or snapshot tests”.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@charts/operator-wandb/tests/session_key_rotation_test.yaml` around lines 300 - 340, Add failed-template cases alongside the existing session key rotation validation tests for an ID without a phase, a phase without an ID, and an unsupported phase. Set the corresponding global.auth.sessionKeyRotation fields and assert each branch’s exact validation error before Secret rendering.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@charts/operator-wandb/tests/session_key_rotation_test.yaml`:
- Around line 300-340: Add failed-template cases alongside the existing session
key rotation validation tests for an ID without a phase, a phase without an ID,
and an unsupported phase. Set the corresponding global.auth.sessionKeyRotation
fields and assert each branch’s exact validation error before Secret rendering.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aa76077a-40dd-4b15-a65b-64e4c24f6ceb
📒 Files selected for processing (10)
.github/workflows/test-operator-wandb.yamlcharts/operator-wandb/Chart.yamlcharts/operator-wandb/README.mdcharts/operator-wandb/docs/session-key-rotation.mdcharts/operator-wandb/templates/_session-key.tplcharts/operator-wandb/templates/session-key.yamlcharts/operator-wandb/tests/session_key_env_test.yamlcharts/operator-wandb/tests/session_key_rotation_test.yamlcharts/operator-wandb/tests/session_length_test.yamlcharts/operator-wandb/values.yaml
Why
wandb/core#48640 adds support for verifying sessions with a previous Gorilla
session key. The operator chart already generates the current key, but has no
safe way to rotate it across a rolling deployment.
What changed
global.auth.sessionKeyandglobal.auth.sessionKeyPrevious. Each valueaccepts either a literal or a Kubernetes
valueFrommap.prepare -> activate -> clearrotation workflow.reconciliations keep the same keys.
The managed workflow generates a 32-character candidate during
prepare.activatepromotes it and retains the outgoing key for verification.clearremoves verification-only keys after the overlap window. A prepared rotation
can also be cleared without activating it.
This pairs with wandb/core#48640.
Validation
helm unittest ./charts/operator-wandb/helm lint ./charts/operator-wandb/ct lint --charts charts/operator-wandb --validate-maintainers=falseuser-defined-secretschartsnap casescc @cvp — could you take a look at the operator-facing rotation workflow and
values API?
Summary by CodeRabbit