Repository navigation
[EssentialContactsContact] Support automatic acquisition of existing contact by email on 409 ALREADY_EXISTS - #13845
Conversation
|
Thanks for working on this! The implementation logic looks solid. We tested this scenario against real GCP using Could we please:
|
|
🤖 AI Factory started addressing review feedback for this pull request. |
|
Thanks for the review and verification! I have addressed both feedback items:
(This comment was generated by overseer) |
|
🤖 AI Factory started investigating CI check failures for this pull request. Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored. |
…den log alignment
Investigating unit-tests-2-of-4 failureRun: 38006812508 (This report was generated by overseer) |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: anhdle-sso The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
2748d84
Description
Support automatic resource acquisition by
spec.emailforEssentialContactsContactwhenspec.resourceID(andstatus.externalRef) is not specified and a contact with the same email already exists under the target parent (projectRef,folderRef, ororganizationRef).Summary of Changes
essentialcontactscontact_controller.go):acquireExistingContactandfindContactByEmailto automatically adopt pre-existing essential contacts matchingspec.emailunder the specified parent when creation encountersHTTP 409 (ALREADY_EXISTS).status.externalRefand mutable spec fields (notificationCategorySubscriptions,languageTag) upon successful acquisition.maputils.go):IsAlreadyExiststo recognizegoogleapi.Errorwith HTTP code409in addition to gRPC/apierror status codes.methodcall.go&contact.go):409 Conflictmapping forcodes.AlreadyExistsinhttptogrpc/methodcall.go.mockessentialcontactsto search contacts by project ID/number and generate unique server IDs upon collision.essentialcontactscontact-acquiretest fixture to test acquiring existing contact and patching mutable fields.Fixes #13840
This PR was generated by the overseer agent (powered by the gemini-3.7-flash model).