Repository navigation
Org search limit, atomic e-mails add, lens e-mails, import tool, qs - prod - #5335
Conversation
… prod 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)
|
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
|
|
@lukaszgryglicki I'm starting review 1 of this pull request now (started 2026-11-25 12:18 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by Hello Łukasz, SummaryThis pull request caps the organization search at one 1,000-organization page, adds an atomic Decision✅ Approved with minor comments ⚪ 1 nit DetailsOverall impression: Each change is small and targeted, and each has focused tests: the result-limit tests, the DynamoDB ⚪ Nit: 1 issue: Configure doc comment now sits above the new constant Other reviewers and CI checks: CodeRabbit skipped this review because the base branch is not the default branch. The required Documentation reminder: changed Rule files: read Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues |
lfx-one
left a comment
There was a problem hiding this comment.
Automated review found no blocking or minor issues; one doc-comment nit is inline. Org-search cap, atomic e-mail add, CLA Group-aware lens links, gone-user grant reporting and the qs bump all trace correctly and have tests.
Documentation
This pull request changes behavior that may also be described outside this repository, such as product pages or an external docs site. I can't read those, so please check them; the author and maintainers own those updates. Changed here:
cla-org-lens-base-{stage}(SSM setting now also read by cla-backend-legacy for the approval-request e-mail link)/v3/organization/search(results capped at 1,000 organizations)- CLA manager e-mails (lens link uses the CLA Group of the request)
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved correctness issues can discard signing options, produce incorrect email links or project context, and permanently lose deleted-grant audit records during interrupted imports.
5 open issues
2 files not reviewed
cla-backend-go/users/mocks/mock_repo.go: Generated filecla-backend-go/v2/signatures/mock_users/mock_service.go: Generated file
What changed in this PR
Promotes the follow-up fixes from #5334 to production across EasyCLA’s primary backend, legacy API, organization-import tool, and deployment dependencies.
Changes:
- Bound organization searches to 1,000 results and add verified GitHub emails atomically.
- Preserve the requested CLA Group in manager-email links and add legacy Organization lens support.
- Report missing users’ dropped import grants and consolidate
qsat version 6.16.1.
| File | Description |
|---|---|
cla-backend/yarn.lock |
Consolidate qs resolutions at 6.16.1. |
cla-backend/package.json |
Raise the qs resolution range. |
cla-backend-legacy/internal/api/org_lens.go |
Add lens configuration and URL helpers. |
cla-backend-legacy/internal/api/org_lens_test.go |
Test lens URLs and Console fallback. |
cla-backend-legacy/internal/api/handlers.go |
Add lens links to legacy approval-request emails. |
cla-backend-legacy/internal/api/email_field_test.go |
Adapt email-escaping tests to the lens parameter. |
cla-backend-go/v2/signatures/mock_users/mock_service.go |
Refresh mocks for the user-service interface. |
cla-backend-go/v2/self_serve_sign/service.go |
Expose atomic email additions through the interface. |
cla-backend-go/v2/self_serve_sign/service_test.go |
Extend the signing user-service fake. |
cla-backend-go/v2/self_serve_sign/github_emails.go |
Add newly verified emails without replacing the set. |
cla-backend-go/v2/self_serve_sign/github_emails_test.go |
Check atomic-add inputs and skipped refreshes. |
cla-backend-go/v2/organization-service/client.go |
Add a bounded, single-page organization search. |
cla-backend-go/v2/company/handlers.go |
Bound organization lookups for company-name fallback. |
cla-backend-go/v2/cla_manager/requests.go |
Pass the selected CLA Group into notification templates. |
cla-backend-go/users/service.go |
Add email-addition service logic and audit events. |
cla-backend-go/users/service_emails_test.go |
Test email-addition audit-event behavior. |
cla-backend-go/users/repository.go |
Add emails using an atomic DynamoDB set update. |
cla-backend-go/users/repository_emails_test.go |
Check atomic update requests and normalization. |
cla-backend-go/users/mocks/mock_repo.go |
Add the repository email-addition mock. |
cla-backend-go/orgimport/steps.go |
Handle missing platform users during grant migration. |
cla-backend-go/orgimport/org_scope_grants_test.go |
Test dropped grants and interrupted-delete recovery. |
cla-backend-go/emails/params.go |
Preserve sender-supplied CLA Group identity. |
cla-backend-go/emails/org_lens_links_test.go |
Test links retaining the sender’s CLA Group. |
cla-backend-go/emails/cla_manager_templates.go |
Apply sender-selected groups when rendering emails. |
cla-backend-go/company/service.go |
Limit searches and handle recent companies beyond the page. |
cla-backend-go/company/resolve_company_test.go |
Test search limits and recent-company fallback. |
cla-backend-go/cmd/refresh_stored_username_test.go |
Update the user-service stub for interface compatibility. |
cla-backend-go/cmd/org_import/README.md |
Document reporting grants belonging to missing users. |
cla-backend-go/cla_manager/service.go |
Include the selected group in manager-added emails. |
cla-backend-go/cla_manager/handlers.go |
Include the selected group in access-request notifications. |
Review effort: Max
| if org, orgErr := organization_service.GetClient().GetOrganization(ctx, company.CompanyExternalID); orgErr == nil { | ||
| upstream = org |
| if sender.CLAGroupID != "" { | ||
| claParams.CLAGroupID = sender.CLAGroupID | ||
| if sender.CLAGroupName != "" { | ||
| claParams.CLAGroupName = sender.CLAGroupName |
| created, ensureErr := r.ensureGrant(ctx, g, gr, have) | ||
| moving := heldElsewhere(gr, ensureErr) | ||
| if ensureErr != nil && !moving { | ||
| if ensureErr != nil && !moving && !goneUser(ensureErr) { |
| var notFound *ssmtypes.ParameterNotFound | ||
| if errors.As(err, ¬Found) { | ||
| orgLensBaseLoaded = true |
| // or "" when no lens base is set or the company id is not a Salesforce Account id | ||
| func orgLensURL(base, companySFID, claGroupID string) string { | ||
| base, companySFID, claGroupID = strings.TrimSpace(base), strings.TrimSpace(companySFID), strings.TrimSpace(claGroupID) | ||
| if base == "" || !orgLensAccountID.MatchString(companySFID) { |

prodversion of: #5334Fix https://github.com/linuxfoundation/lfx-self-serve-ops/issues/730 -
/v3/organization/searchreads one page of the Organization Service (1,000 organizations) instead of all of them -$filterstays (the Contributor Console uses it) and is bounded by the same limit.https://github.com/linuxfoundation/lfx-self-serve-ops/issues/1953 - the verified GitHub e-mails are added to
user_emailswith one atomicADD(newAddUserEmails), so a concurrent change cannot be lost.TASK: Link CLA manager emails to the Organization lens instead of the Corporate Console lfx-self-serve#3796 - the lens link of the CLA manager e-mails takes its CLA Group from the request, not from the project lookup - the one Corporate Console link left in
cla-backend-legacygets the lens-or-Console branch - no change whilecla-org-lens-base-{stage}is unset.Import tool, for TASK: Import non-member companies in prod, in tranches lfx-self-serve#3957 - a role of a user who no longer exists on the platform is reported in
dropped_grants.csvinstead of failing the organization.qsresolution raised to^6.16.1incla-backend- oneqsversion in the lock, closes theqsDependabot alerts there.Follow-up of #5332 - these are the review notes that were skipped there.
cc @mlehotskylf @ahmedomosanya
Signed-off-by: Łukasz Gryglicki lgryglicki@cncf.io
Assisted by OpenAI
Assisted by GitHub Copilot
Assisted by Claude