Skip to content
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

post-action warning on revoke failure in case token already expired #140

Closed
danra opened this issue Jun 4, 2024 · 4 comments · Fixed by #147
Closed

post-action warning on revoke failure in case token already expired #140

danra opened this issue Jun 4, 2024 · 4 comments · Fixed by #147
Labels

Comments

@danra
Copy link

danra commented Jun 4, 2024

I'm seeing the following warning in the post job cleanup step:

Post job cleanup.
Warning: Token revocation failed: Bad credentials - https://docs.github.com/rest

Probably because the token was already invalidated, because the job took more than 1h to run (see #121).

No issue here other than there shouldn't be any warning in this case.

@gr2m
Copy link
Contributor

gr2m commented Jun 7, 2024

We do already check for expiration time, maybe we got it implemented wrong though?

const expiresAt = core.getState("expiresAt");
if (expiresAt && tokenExpiresIn(expiresAt) < 0) {
core.info("Token expired, skipping token revocation");
return;
}

@dboriichuk
Copy link

I just want to +1 to this issue.
It happens in jobs, which runs for several hours.

@gr2m
Copy link
Contributor

gr2m commented Jun 14, 2024

thanks for letting us know @dboriichuk. That suggests that our expiration check is not working. I'll add more logs to get to the bottom of it

@gr2m gr2m closed this as completed in #147 Jun 26, 2024
@gr2m gr2m closed this as completed in 66a7045 Jun 26, 2024
create-app-token-action-releaser bot pushed a commit that referenced this issue Jun 26, 2024
## [1.10.2](v1.10.1...v1.10.2) (2024-06-26)

### Bug Fixes

* do not revoke token if already expired ([#147](#147)) ([66a7045](66a7045)), closes [#140](#140) [#95](#95)
@create-app-token-action-releaser

🎉 This issue has been resolved in version 1.10.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants