Open Swatinem opened 2 months ago
Apart from making the token resolution on-demand, I am also wondering whether the cache we have in place for those tokens is actually effective.
I have seen multiple traces where multiple calls to get_repo_provider_service
in one task (deduplicating these is a separate issue)
re-resolve the access token in every call, instead of making use of a cache.
As is visible in this trace, there is a
POST
tohttps://api.github.com/app/installations/XYZ/access_tokens
, even though no other call out to GitHub is happening within that trace.In such a case, the access token should not be resolved. It should only be resolved when it is needed for subsequent calls to the GitHub API, like in this trace