🐛 fix[gitlab]: add assignee sync diagnostics#115356
Open
iamrajjoshi wants to merge 1 commit into
Open
Conversation
dd53ec7 to
d3b924f
Compare
Comment on lines
+126
to
+130
| if external_actor.external_id: | ||
| try: | ||
| gitlab_user_id = int(external_actor.external_id) | ||
| except ValueError: | ||
| logger.warning("assignee-outbound.invalid-external-id", extra=log_context) |
Member
There was a problem hiding this comment.
This case will never execute. We don't set external ID for any of our GitLab mappings, so I'm not sure if this changes anything.
|
|
||
| # Search for the GitLab user by username to get their user ID | ||
| try: | ||
| users = client.search_users(gitlab_username) or [] |
Member
There was a problem hiding this comment.
I hand tested this API with my GitLab user, and this request should have returned a single user, so I can vouch that this is correct at least. Also, this API only returns a single username when a username is passed as query param, so the previous logic was slightly more correct: https://docs.gitlab.com/api/users/#as-a-regular-user
d3b924f to
82a466e
Compare
82a466e to
0e3ed16
Compare
0e3ed16 to
ef898a1
Compare
GabeVillalobos
approved these changes
May 19, 2026
ef898a1 to
8b0e4f7
Compare
Contributor
Backend Test FailuresFailures on
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
I am not fully certain we have the root cause of the GitLab assignment sync failures yet. Based on review and hand testing, this no longer changes assignee matching to prefer mapped external IDs or stricter username matching; it keeps the existing GitLab username search behavior.
This adds lifecycle context around inbound and outbound assignment sync so the next failure has enough detail to diagnose the mapping/search path. It preserves the existing no-op return behavior for GitLab outbound cases that previously returned early, including missing mapped external actors, invalid issue keys, GitLab user search failures, and empty GitLab user search results.
Test plan
Considerations
This is intentionally diagnostic: it preserves the current GitLab username resolution path while adding enough context to confirm or disprove the current assignment-sync hypothesis.