-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: early exit process so node doesn't wait for hanging promises #182
Conversation
oh my... i misspelled wait to want |
Would it be possible to reconsider merging this PR? Rebasing the changes made on main before? I'm trying to add this action to save a bit of time in CI, but I'm loosing more time in the post step than the little time saved + overhead |
As said in the issue: I happily merge it once the test-failures are resolved. If @chirag-droid lost interest, maybe you can take over? |
I can take up this issue again. I am diagnosing the failed tests |
https://github.com/hendrikmuhs/ccache-action/actions/runs/7697481224/job/22066139179?pr=182 I need help with this test case. And why it's failing. |
@chirag-droid not sure about that exact failure, but process exit codes should be positive numbers. 0 means success, non-0 for failure. Generally, |
src/save.ts
Outdated
// A failure to save cache shouldn't prevent the entire CI run from | ||
// failing, so do not call setFailed() here. | ||
core.warning(`Saving cache failed: ${error}`); |
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.
According to this comment, should I return 0 even if the caching fails
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.
Yes, I think so, this change was introduced in #59
Thank you @chirag-droid. The 1 failing test doesn't matter. I can fix that manually. I will merge this PR in the afternoon. |
Do we need to make a new release? @hendrikmuhs |
Is there an update on when we can expect this to be released @hendrikmuhs ? |
This is a workaround for me before a new version is released: - uses: hendrikmuhs/ccache-action@ff9f6cc67d49b9acaa9e102f80d1ea8a0c86a6dd |
sorry, didn't had time to make a release. Will do it now. |
…ndrikmuhs#182) fix: early exit process so node doesn't want for hanging promises
Issue
fixes: #181
Proposed Changes
Since Node waits for hanging http requests we early exit by calling
process.exit
. This doesn't affect the existing API but we can specify optional parameterearlyExit
that would apply this fix.This is related to nodejs/node#47228