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

Fix Echidna dry-run logic #1857

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Fix Echidna dry-run logic #1857

merged 2 commits into from
Dec 18, 2024

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented Dec 17, 2024

No description provided.

@dschuff dschuff requested a review from tlively December 17, 2024 23:02
Comment on lines +68 to +69
${{ !((github.event_name == 'workflow_dispatch' && !inputs.dry-run) ||
(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main')) }}
Copy link
Member

Choose a reason for hiding this comment

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

I think this is slightly clearer if we distribute the ! a bit:

Suggested change
${{ !((github.event_name == 'workflow_dispatch' && !inputs.dry-run) ||
(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main')) }}
${{ (github.event_name != 'workflow_dispatch' || inputs.dry-run) &&
!(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main')) }}

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe. It's written like this because dry-run is already "inverted", and it was easier to think of it as "publish for real if these conditions are met". Another option is to actually reflect that in the variable name in this file, and then invert it when passing through to echidna's curl request as dry-run status. The downside of that is that we'd have to do the logic inversion of "true" to "false" in Makefile shell syntax, which seems worse than doing it in the GH script syntax here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a comment. If you still think this suggestion is better, I don't really mind switching it.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

Works for me 👍

@dschuff dschuff merged commit 1463895 into main Dec 18, 2024
7 of 9 checks passed
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