Skip to content

feat: return email in signup response#1217

Merged
mfrancisc merged 9 commits into
codeready-toolchain:masterfrom
mfrancisc:sendemailtoui
Oct 31, 2025
Merged

feat: return email in signup response#1217
mfrancisc merged 9 commits into
codeready-toolchain:masterfrom
mfrancisc:sendemailtoui

Conversation

@mfrancisc
Copy link
Copy Markdown
Contributor

@mfrancisc mfrancisc commented Oct 20, 2025

tests for codeready-toolchain/registration-service#555

wrt: https://issues.redhat.com/browse/SANDBOX-1439

Summary by CodeRabbit

  • Tests

    • Validate that signup responses now include the user's email.
    • Improve test failure messages to show the actual response body when expected claims are missing.
  • Chores

    • Add make targets to ensure operator publish/install steps are available for end-to-end runs, improving test/deploy consistency.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 20, 2025

Walkthrough

Added an email claim assertion and improved a test failure message in the e2e registration test; and added/declared new phony Make targets (including explicit prerequisites for get-publish-and-install-operators) in make/test.mk. No exported/public signatures changed.

Changes

Cohort / File(s) Summary
E2E test assertion & failure-message update
test/e2e/parallel/registration_service_test.go
Added "email": emailAddress to the expected claims in TestSignupOK. Updated signupHasExpectedClaims to report c.responseBody (the actual response body map) in the failure message when a claim is missing.
Makefile phony targets & prerequisites
make/test.mk
Added phony target declaration lines for e2e-deploy-latest and get-publish-and-install-operators. Introduced get-publish-and-install-operators with explicit prerequisites: get-and-publish-host-operator create-host-resources get-and-publish-member-operator.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Pay attention to:
    • test/e2e/parallel/registration_service_test.go — ensure the expected email claim matches service behavior and the failure message uses the intended response variable.
    • make/test.mk — confirm the newly declared phony lines and the prerequisites for get-publish-and-install-operators are correct and non-duplicative.

Possibly related PRs

Suggested reviewers

  • xcoulon
  • jrosental
  • MatousJobanek

Poem

I hopped through tests with a curious gleam,
I tucked an email into signup's dream 🐇
When claims go missing, the response will show,
A tiny clue for where to look and grow ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: return email in signup response" directly aligns with the main changes in the changeset. The primary modification is in the test file test/e2e/parallel/registration_service_test.go, where the email field is added to the expected signup response in the TestSignupOK test. This matches the title's description of returning email in the signup response. The secondary changes to make/test.mk are supporting infrastructure updates for test targets and do not conflict with the title. The title is specific, concise, and clearly communicates the primary change without being vague or misleading.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd left a comment

Choose a reason for hiding this comment

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

🚀

@mfrancisc
Copy link
Copy Markdown
Contributor Author

/retest

Comment thread make/test.mk Outdated
@echo "Migration tests successfully finished"

.PHONY: e2e-deploy-latest
e2e-deploy-latest: INSTALL_OPERATOR=true
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.

Just a question but do we want to do the same as #1218 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reverted in 6e4ef6c , as that PR got merged now.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
make/test.mk (2)

89-91: Consider removing the duplicate target declaration.

Line 89 declares e2e-deploy-latest: as a standalone target, immediately followed by the same target with its recipe on line 90. While syntactically valid in GNU Make, this pattern is unusual, serves no clear purpose, and is inconsistent with all other targets in this Makefile.

Apply this diff to remove the redundant declaration:

 .PHONY: e2e-deploy-latest
-e2e-deploy-latest:
 e2e-deploy-latest:
 	$(MAKE) get-publish-install-and-register-operators MEMBER_NS=${MEMBER_NS} MEMBER_NS_2=${MEMBER_NS_2} HOST_NS=${HOST_NS} REGISTRATION_SERVICE_NS=${REGISTRATION_SERVICE_NS} ENVIRONMENT=${ENVIRONMENT} INSTALL_OPERATOR=${INSTALL_OPERATOR} DEPLOY_LATEST=true KSCTL_TLS_VERIFY_PARAM=${KSCTL_TLS_VERIFY_PARAM}

317-318: Consider removing the duplicate target declaration.

Line 317 declares get-publish-and-install-operators: as a standalone target, immediately followed by the same target with its prerequisites on line 318. This pattern is unusual and inconsistent with other targets in this Makefile (compare with line 310 for get-publish-install-and-register-operators).

Apply this diff to remove the redundant declaration:

 .PHONY: get-publish-and-install-operators
 # IMPORTANT: The host operator needs to be installed first.
 #			 The reason is that when the host operator is installed, then the logic creates ToolchainConfig CR which
 #			 defines that the webhook should be deployed from the first member instance (and not from the second one).
 #			 This is important to set before the member operators are installed, otherwise, it can lead to flaky e2e tests.
-get-publish-and-install-operators:
 get-publish-and-install-operators: get-and-publish-host-operator create-host-resources get-and-publish-member-operator
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc4b1a5 and 6e4ef6c.

📒 Files selected for processing (1)
  • make/test.mk (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Unit Tests
  • GitHub Check: Build & push Developer Sandbox UI image for UI e2e tests
  • GitHub Check: Build & push operator bundles for e2e tests

@mfrancisc
Copy link
Copy Markdown
Contributor Author

/retest

flaky TestRetargetUserWithSBRByChangingSpaceTargetClusterWhenSpaceIsShared

@mfrancisc
Copy link
Copy Markdown
Contributor Author

/retest

Comment thread make/test.mk Outdated
Comment thread make/test.mk Outdated
mfrancisc and others added 2 commits October 30, 2025 15:49
Co-authored-by: Rafaela Maria Soares da Silva <rsoaresd@redhat.com>
Co-authored-by: Rafaela Maria Soares da Silva <rsoaresd@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

@mfrancisc
Copy link
Copy Markdown
Contributor Author

/retest

flaky:

    space.go:108: 
        	Error Trace:	/go/src/github.com/codeready-toolchain/toolchain-e2e/testsupport/space/space.go:108
        	            				/go/src/github.com/codeready-toolchain/toolchain-e2e/test/e2e/space_autocompletion_test.go:73
        	Error:      	Received unexpected error:
        	            	context deadline exceeded
        	Test:       	TestAutomaticClusterAssignment/set_low_max_number_of_spaces_and_expect_that_space_won't_be_provisioned_but_added_on_waiting_list/increment_the_max_number_of_spaces_and_expect_that_first_space_will_be_provisioned.
=== NAME  TestAutomaticClusterAssignment/set_low_max_number_of_spaces_and_expect_that_space_won't_be_provisioned_but_added_on_waiting_list
    clean.go:87: skipping object cleanup, test=TestAutomaticClusterAssignment/set_low_max_number_of_spaces_and_expect_that_space_won't_be_provisioned_but_added_on_waiting_list failedTimestamp=Oct 30 16:32:14.120
=== NAME  TestAutomaticClusterAssignment
    clean.go:87: skipping object cleanup, test=TestAutomaticClusterAssignment failedTimestamp=Oct 30 16:32:14.168

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Oct 31, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, MatousJobanek, metlos, mfrancisc, rajivnathan, rsoaresd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [MatousJobanek,alexeykazakov,metlos,mfrancisc,rajivnathan,rsoaresd]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mfrancisc mfrancisc merged commit 6b150c2 into codeready-toolchain:master Oct 31, 2025
10 of 12 checks passed
@mfrancisc mfrancisc deleted the sendemailtoui branch October 31, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants