Repository navigation
Fix pre-existing legacy 502 - #5246
Conversation
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. WalkthroughThe handler now returns 404 when no signed and approved CCLA is found. The pull request also adds a production-only shell utility for ACS role operations and warden probes. ChangesCCLA auto-create handling
Production ACS role utility
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Operator
participant prod_acs_role_flip.sh
participant ACS
Operator->>prod_acs_role_flip.sh: Request admin on or off
prod_acs_role_flip.sh->>ACS: Grant or revoke system-admin and lf-staff
ACS-->>prod_acs_role_flip.sh: Return role operation responses
prod_acs_role_flip.sh->>ACS: Check system-admin state
ACS-->>prod_acs_role_flip.sh: Return role state
Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is established for this change. The production utility may warn when it cannot confirm a role change. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The nil result is handled consistently with the API contract and covered by a focused regression test.
0 open findings
What changed in this PR
Prevents a pre-existing 502 when auto-ECLA creation cannot find a signed, approved CCLA, and adds a production ACS role-management helper.
Changes:
- Return HTTP 404 for missing CCLAs.
- Add regression coverage.
- Add a production ACS role helper.
| File | Description |
|---|---|
utils/prod_acs_role_flip.sh |
Adds production ACS role operations. |
cla-backend-go/v2/signatures/handlers.go |
Handles missing CCLAs safely. |
cla-backend-go/v2/signatures/handlers_sanctions_test.go |
Tests the new 404 response. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
mlehotskylf
left a comment
There was a problem hiding this comment.
Handler fix LGTM: GetCorporateSignature returns (nil, nil) when no CCLA exists, which caused the 502. The 404 and the test are right.
Before approval, please drop utils/prod_acs_role_flip.sh from this PR and from #5247. It's unrelated to the 502 and needs its own PR and review (see inline).
The cypress-functional failure is unrelated (Auth0 dev /oauth/token returned 403), so a re-run should fix it.
|
Replied inline: the script is a local-only util (needs the operator's own tokens, mirrors the merged dev one, not deployed, bots flagged nothing harmful) and stays in this PR - please re-review. |
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
There was a problem hiding this comment.
🟢 Approval recommended
The focused nil guard matches repository behavior and is covered by a targeted regression test.
0 open findings
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
cc @mlehotskylf @ahmedomosanya
Signed-off-by: Łukasz Gryglicki lgryglicki@cncf.io
Assisted by OpenAI
Assisted by GitHub Copilot
Assisted by Claude