Fix EasyCLA new backend outage#5037
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Pull request overview
This PR addresses a production outage/regression during the Python→Go port by (1) preventing DynamoDB type coercion bugs caused by InterfaceMapToItem’s numeric-string heuristic and (2) fixing GitHub org-based approval checks to use a permissions-safe endpoint that matches the legacy Python behavior.
Changes:
- Avoid
InterfaceMapToItemround-trips for project create/update by constructing and patching DynamoDBAttributeValuemaps directly. - Avoid
InterfaceMapToItemround-trips in the legacy GitHub OAuth “get-or-create user” path; preserve the pre-cutover JSON wire shape foruser_github_id. - Fix CCLA org-approval logic to check a user’s public org memberships via
GET /users/<user>/orgsinstead of an endpoint that commonly returns 403 for customer orgs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cla-backend-legacy/internal/api/handlers.go | Builds/patches DynamoDB items directly for project create/update to prevent numeric-string coercion of string fields. |
| cla-backend-legacy/internal/api/github_oauth.go | Updates user create/update to operate on raw DynamoDB AttributeValue maps and preserves legacy user_github_id response type. |
| cla-backend-go/signatures/service.go | Fixes org approval checks to use public org listing, preventing false negatives caused by 403s on membership endpoints. |
| cla-backend-go/github/github_org.go | Adds ListUserPublicOrgs helper to list a user’s publicly visible org memberships using the legacy-compatible endpoint. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
1000d46
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
Fixes prod outage (which is already reverted, but we want to retry porting
py->go).