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

add callback to log the ERROR status for the error job #14

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

gnarf
Copy link
Collaborator

@gnarf gnarf commented Mar 27, 2024

Noticed that there was a possibility of logging the ERROR status in the current app deploy so upgrading the new workflow to have a branch near the end to log ERROR instead of COMPLETED

@gnarf gnarf requested a review from jugglinmike March 27, 2024 18:08
Copy link
Member

@jugglinmike jugglinmike left a comment

Choose a reason for hiding this comment

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

I've been wondering if we could do something like this! I can't say I'm a fan of how GitHub defines these semantics (specifically, in the absence of a directive named "continue-on-error", I would expect the Workflow to abort on error), but a quick review of the relevant docs suggests that this is indeed how one is supposed to express this logic.

@@ -193,6 +201,7 @@ jobs:

- name: upload *.{log,png}
uses: actions/upload-artifact@v4
if: always()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if: always()
if: ${{ always() }}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I actually believe it's preferred to not use the expression syntax for always by itself.

https://github.com/w3c/aria-at-app/pull/961/files#diff-fcc964e27d1e22339051a8ce39304eb2c721e3d96ab72d9fb20b4a2192f74b60R47

I seem to recall reading old issues saying that using the expression syntax with one of these alone was actually causing errors

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

My preference is for the most consistent syntax even at the expense of verbosity for the same reason I don't lean on ASI when writing JS--honoring the exceptions results in more cognitive load and more risk than I think is warranted. I'm willing to be flexible on a few lines, though.

@jugglinmike jugglinmike merged commit cb2e325 into main Mar 28, 2024
1 check failed
@jugglinmike jugglinmike deleted the log-error-state branch March 28, 2024 20:02
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