Skip to content

Commit e85a8de

Browse files
One more update
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
1 parent 80e854e commit e85a8de

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

cla-backend-legacy/internal/api/handlers.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9465,8 +9465,7 @@ func (h *Handlers) GetReturnUrlV2(w http.ResponseWriter, r *http.Request) {
94659465
if returnURL := getAttrString(sig, "signature_return_url"); returnURL != "" {
94669466
projectID := getAttrString(sig, "signature_project_id")
94679467
refType := strings.ToLower(strings.TrimSpace(getAttrString(sig, "signature_reference_type")))
9468-
// if parity.EnableReturnURLCompanyManagerWait && projectID != "" && refType == "company" && h.projects != nil && h.companies != nil && h.userService != nil && h.projectCLAGroups != nil {
9469-
if projectID != "" && refType == "company" && h.projects != nil && h.companies != nil && h.userService != nil && h.projectCLAGroups != nil {
9468+
if !parity.DisableReturnURLCompanyManagerWait && projectID != "" && refType == "company" && h.projects != nil && h.companies != nil && h.userService != nil && h.projectCLAGroups != nil {
94709469
proj, pFound, pErr := h.projects.GetByID(ctx, projectID)
94719470
if pErr == nil && pFound {
94729471
version := strings.ToLower(strings.TrimSpace(getAttrString(proj, "version")))

cla-backend-legacy/internal/parity/flags.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ var (
4242
// EASYCLA_PARITY_FLAG: when true, require role scope across every project mapping in the CLA group.
4343
FixUserServiceHasRoleAllMappings = envBool("EASYCLA_FIX_USER_SERVICE_HAS_ROLE_ALL_MAPPINGS")
4444

45-
// EASYCLA_PARITY_FLAG: when true, wait in GET /v2/return-url/{signature_id} until v2 company CLA managers
46-
// have visible cla-manager role scopes before redirecting. Disabled by default because it is a user-visible
47-
// latency source; the handler redirects regardless, so skipping the wait preserves the final response.
48-
EnableReturnURLCompanyManagerWait = envBool("EASYCLA_ENABLE_RETURN_URL_COMPANY_MANAGER_WAIT")
45+
// EASYCLA_PARITY_FLAG: when true, skip waiting in GET /v2/return-url/{signature_id} until v2 company CLA managers
46+
DisableReturnURLCompanyManagerWait = envBool("EASYCLA_DISABLE_RETURN_URL_COMPANY_MANAGER_WAIT")
4947

5048
// EASYCLA_PARITY_FLAG: when true, return signature_id instead of preserving the legacy project_id error key bug.
5149
FixAddClaManagerV1NotFoundErrorKey = envBool("EASYCLA_FIX_ADD_CLA_MANAGER_V1_NOT_FOUND_ERROR_KEY")

0 commit comments

Comments
 (0)