Skip to content

Cache Github status token #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 3, 2025
Merged

Cache Github status token #6

merged 6 commits into from
Mar 3, 2025

Conversation

zyla
Copy link
Collaborator

@zyla zyla commented Feb 28, 2025

Currently we're requesting a Github installation access token for every github status update requests.
That's quite spammy for an authentication endpoint. The token is supposed to be cached.

The token is cached in an environment variable.

There was another attempt: #7 , which involved moving all the status updates to one process and caching in memory. However, after implementing it I discovered (via our existing test suite, yay!) that it can't work: we rely on being able to leak the request pipe FD to subprocesses, so we can't wait for commandHandler to finish. So I implemented it the other way.

This PR also adds a mock Github API server and some tests for the commit status functionality. Note: the server doesn't verify any authentication tokens.

@zyla zyla requested a review from kozak February 28, 2025 14:10
@zyla zyla merged commit ccc6c8f into main Mar 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants