Skip to content

clean error outputs#72

Merged
domenkozar merged 2 commits intocachix:masterfrom
zimbatm:clean-errors
Jan 5, 2021
Merged

clean error outputs#72
domenkozar merged 2 commits intocachix:masterfrom
zimbatm:clean-errors

Conversation

@zimbatm
Copy link
Copy Markdown
Contributor

@zimbatm zimbatm commented Jan 2, 2021

On error, just mark the error with core.setFailed, this is enough to
kill the process (apparently).

Replace child_process.execFileSync with '@actions/exec'.exec to be async
all the way and remove the UnhandledPromiseRejectionWarning backtrace.

Before:
image

After:
image

On error, just mark the error with `core.setFailed`, this is enough to
kill the process.

Replace child_process.execFileSync with '@actions/exec'.exec to be async
all the way.
@zimbatm
Copy link
Copy Markdown
Contributor Author

zimbatm commented Jan 2, 2021

A good follow-up would be to clean the error reported by the cachix CLI so that it's not just a pretty-printed object.

@zimbatm zimbatm marked this pull request as ready for review January 2, 2021 21:43
}
function upload() {
return __awaiter(this, void 0, void 0, function* () {
core.startGroup('Cachix: upload');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this: I wouldn't expect Upload to be logged when it's not uploading (also it's called pushing)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue I was trying to avoid is core.stopGroup not being called on exception.

I'm thinking of this as a category, and then the actions inside would vary if there is something to upload or not. I could rename it push so it doesn't sound like it's actually pushing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to Cachix: push

@domenkozar domenkozar merged commit 33a8b9c into cachix:master Jan 5, 2021
@zimbatm zimbatm deleted the clean-errors branch January 5, 2021 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants