-
Notifications
You must be signed in to change notification settings - Fork 1
fix/opv2-jwt #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix/opv2-jwt #318
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -521,6 +521,18 @@ | |
| return ctrl.Result{RequeueAfter: 5 * time.Second}, nil | ||
| } | ||
|
|
||
| // Refuse to reconcile applications with an unknown issuer rather than emitting | ||
| // a guessed one: W&B services reject a mismatched `iss` with a 401 and the API | ||
| // panics on that path, so no value is safer than a wrong value. | ||
| if internalServiceAuthEnabled(wandb) && resolveInternalServiceAuthIssuer(wandb) == "" { | ||
|
Check failure on line 527 in internal/controller/reconciler/reconcile_v2.go
|
||
| logger.Info("Cluster service-account issuer unknown; not reconciling applications") | ||
| if err := updateReadyStatus(ctx, client, wandb, statusBefore, false, | ||
| serviceAccountIssuerUnknownReason, serviceAccountIssuerUnknownMessage); err != nil { | ||
|
Check failure on line 530 in internal/controller/reconciler/reconcile_v2.go
|
||
|
Comment on lines
+527
to
+530
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win Restore the shared issuer-resolution declarations.
After the fix, run 📍 Affects 2 files
🤖 Prompt for AI AgentsSources: Coding guidelines, Linters/SAST tools |
||
| return ctrl.Result{}, err | ||
| } | ||
| return ctrl.Result{RequeueAfter: time.Minute}, nil | ||
| } | ||
|
|
||
| result, err = reconcileApplications(ctx, client, wandb, manifest, telemetryConfig) | ||
| if err != nil { | ||
| return result, err | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Add a deadline to issuer discovery.
context.Background()at Line 294 has no deadline. If the API server stalls,DoRawblocks before the manager starts. The non-fatal error path does not run.Use
context.WithTimeoutfor this startup lookup.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Coding guidelines