caioq opened a new pull request, #8136: URL: https://github.com/apache/incubator-devlake/pull/8136
### Summary - According to [github documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app) the installation access token expire after 1 hour. This commit generates a new installation access token at the start of each gitextractor task avoiding the auth error that happens for pipelines that last more than 1 hour. ### Does this close any open issues? Closes https://github.com/apache/incubator-devlake/issues/7958 ### Screenshots Before the fix: <img width="1461" alt="image" src="https://github.com/user-attachments/assets/37725c81-a8a4-4369-9ede-b22a13bc9df9"> After the fix: The pipeline lasts more than 1 hour and the gitextractor tasks keep working <img width="801" alt="image" src="https://github.com/user-attachments/assets/80e09387-69e6-46b5-8fd4-b26e18771fcb"> ### Other Information I understand that this solution is not the most efficient, since for each gitextractor task it will generate new tokens even when the current token is still valid. However, I believe it can be used as a temporary solution to enable the use of Github App without problems. For a more efficient solution, we could generate a new token only when it has reached its expiration time. Analyzing the code, I believe that the expiration time of this token needs to be persisted in the database in order to be accessed when preparing the task. What do you think? I may be evolving this solution in another new PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
