Skip to content

Conversation

@benbroadaway
Copy link
Collaborator

@benbroadaway benbroadaway commented Nov 24, 2025

Builds off #1242 and #1243.

Reduce calls to GitHub API by keeping the mapping of github user -> concord user in Concord's database.

This is a generic implementation for the mapping. Initially (the impetus for this PR), it's intended to help resolving github users to concord users. However, it can be used for any such mapping for other services that are integrated.

@benbroadaway benbroadaway requested review from a team, brig and ibodrov November 24, 2025 22:08
@benbroadaway benbroadaway changed the title concord-db, concord-server: cache github app user mapping in database concord-db, concord-server: cache external app user mapping in database Dec 10, 2025
@benbroadaway benbroadaway marked this pull request as ready for review December 19, 2025 21:42
ibodrov
ibodrov previously approved these changes Dec 23, 2025
Copy link
Collaborator

@ibodrov ibodrov left a comment

Choose a reason for hiding this comment

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

Would it make sense to add a config option to enable/disable this behavior? It's an extra DB lookup for each GitHub event, right?
Otherwise, LGTM.

@benbroadaway
Copy link
Collaborator Author

benbroadaway commented Dec 23, 2025

Would it make sense to add a config option to enable/disable this behavior? It's an extra DB lookup for each GitHub event, right?

Not for every event. This is a little bit further downstream. It's for an event that results in a triggered process (x the number of processes), and only when the trigger config has useInitiator: true. Otherwise it skips all the user lookup stuff and the process runs as the local github user.

That being said, a config option to enable/disable is fair. I also just noticed a dumb typo.

@benbroadaway benbroadaway merged commit 65b6b2a into master Dec 29, 2025
4 checks passed
@benbroadaway benbroadaway deleted the github-ldap-email-db-cache branch December 29, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants