Skip to content

Org search limit, atomic e-mails add, lens e-mails, import tool, qs - prod - #5335

Merged
lukaszgryglicki merged 1 commit into
mainfrom
unicron-730-1953-3796-prod
Nov 25, 2026
Merged

lukaszgryglicki merged 1 commit into
mainfrom
unicron-730-1953-3796-prod

Conversation

@lukaszgryglicki

Copy link
Copy Markdown
Member

prod version of: #5334

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

… 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)
@lukaszgryglicki lukaszgryglicki self-assigned this Nov 25, 2026
@lukaszgryglicki
lukaszgryglicki requested a review from a team as a code owner November 25, 2026 12:18
Copilot AI max review requested due to automatic review settings November 25, 2026 12:18
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 71f56a8e-474b-4f4c-a413-fdbbec0c2275

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@lfx-one

lfx-one commented Nov 25, 2026 •

Copy link
Copy Markdown

@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 re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.


Hello Łukasz,

Summary

This pull request caps the organization search at one 1,000-organization page, adds an atomic AddUserEmails for the verified GitHub e-mails, and makes the CLA manager e-mail lens links use the CLA Group of the request. It also reports grants of users who no longer exist on the platform in the import tool and raises qs to ^6.16.1. The changes are well tested, and I found no real problems.

Decision

✅ Approved with minor comments

⚪ 1 nit

Details

Overall impression: Each change is small and targeted, and each has focused tests: the result-limit tests, the DynamoDB ADD request shape, the lens-link rendering and the dropped-grants report. The atomic ADD ... SET date_modified with attribute_exists(user_id) fixes the lost-update race and cannot create phantom user records. forCLAGroup falls back to the project lookup when the sender names no CLA Group. The userGone handling in copyGrants and deleteOldGrants drops and reports the grant instead of failing the organization, and also records a grant that was deleted although the delete call failed. yarn.lock now resolves one qs version.

⚪ 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 DCO check passed on 48a2470.

Documentation reminder: changed cla-org-lens-base-{stage}, /v3/organization/search, CLA manager e-mails. Please check product pages and external docs; the author and maintainers own those updates.

Rule files: read CLAUDE.md; skipped none

Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues

@lfx-one lfx-one left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread cla-backend-go/v2/company/handlers.go Resolved
@lukaszgryglicki
lukaszgryglicki merged commit e735c48 into main Nov 25, 2026
13 checks passed
@lukaszgryglicki
lukaszgryglicki deleted the unicron-730-1953-3796-prod branch November 25, 2026 12:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 file
  • cla-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 qs at 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

Comment on lines +924 to +925
if org, orgErr := organization_service.GetClient().GetOrganization(ctx, company.CompanyExternalID); orgErr == nil {
upstream = org
Comment on lines +92 to +95
if sender.CLAGroupID != "" {
claParams.CLAGroupID = sender.CLAGroupID
if sender.CLAGroupName != "" {
claParams.CLAGroupName = sender.CLAGroupName
Comment on lines 288 to +290
created, ensureErr := r.ensureGrant(ctx, g, gr, have)
moving := heldElsewhere(gr, ensureErr)
if ensureErr != nil && !moving {
if ensureErr != nil && !moving && !goneUser(ensureErr) {
Comment on lines +44 to +46
var notFound *ssmtypes.ParameterNotFound
if errors.As(err, &notFound) {
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) {

This branch was previously deployed

1 inactive deployment
dev — 48a24702 Deployed Nov 25, 2026 by lukaszgryglicki via License Header Check #1470
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants