-
Notifications
You must be signed in to change notification settings - Fork 151
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
(chore): Fix the token expiry and move release version update code to a composite action. #1132
(chore): Fix the token expiry and move release version update code to a composite action. #1132
Conversation
… composite action Token expiry fix: The installation token generated through the GH app has a validity of 1 hour. ref: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app So the issue is, when waiting for e2e tests(github checks) which runs for more than 1 hr to finish, the token gets expired and then the gh action is no longer able to do other tasks(such as creating a pr) In order to fix this, we can use the GITHUB_TOKEN that is generated for each workflow. ref: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret The GITHUB_TOKEN expires when a job finishes or after a maximum of 24 hours. Move version update to composite action: There are 2 sets of steps in the job that does almost the same task. Instead of duplicating the steps, move it to a composite action and reuse the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Sara4994, VaishnaviHire The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d3cec13
into
opendatahub-io:incubation
… composite action (red-hat-data-services#1132) Token expiry fix: The installation token generated through the GH app has a validity of 1 hour. ref: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app So the issue is, when waiting for e2e tests(github checks) which runs for more than 1 hr to finish, the token gets expired and then the gh action is no longer able to do other tasks(such as creating a pr) In order to fix this, we can use the GITHUB_TOKEN that is generated for each workflow. ref: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret The GITHUB_TOKEN expires when a job finishes or after a maximum of 24 hours. Move version update to composite action: There are 2 sets of steps in the job that does almost the same task. Instead of duplicating the steps, move it to a composite action and reuse the same.
… composite action (red-hat-data-services#1132) Token expiry fix: The installation token generated through the GH app has a validity of 1 hour. ref: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app So the issue is, when waiting for e2e tests(github checks) which runs for more than 1 hr to finish, the token gets expired and then the gh action is no longer able to do other tasks(such as creating a pr) In order to fix this, we can use the GITHUB_TOKEN that is generated for each workflow. ref: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret The GITHUB_TOKEN expires when a job finishes or after a maximum of 24 hours. Move version update to composite action: There are 2 sets of steps in the job that does almost the same task. Instead of duplicating the steps, move it to a composite action and reuse the same.
Description
Token expiry fix:
The installation token generated through the GH app has a validity of 1 hour. ref: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app So the issue is, when waiting for e2e tests(github checks) which runs for more than 1 hr to finish, the token gets expired and then the gh action is no longer able to do other tasks(such as creating a pr)
In order to fix this, we can use the GITHUB_TOKEN that is generated for each workflow. ref: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret The GITHUB_TOKEN expires when a job finishes or after a maximum of 24 hours.
Move version update to composite action:
There are 2 sets of steps in the job that does almost the same task. Instead of duplicating the steps, move it to a composite action and reuse the same.
JIRA: https://issues.redhat.com/browse/RHOAIENG-10059
How Has This Been Tested?
Both release actions were able to run successfully in my local: