Skip to content

Exit on CI workflow dispatch failures#7502

Merged
mrcasals merged 3 commits intodevelopfrom
ci/exit-on-dispatch-failure
Mar 2, 2021
Merged

Exit on CI workflow dispatch failures#7502
mrcasals merged 3 commits intodevelopfrom
ci/exit-on-dispatch-failure

Conversation

@oliverbarnes
Copy link
Copy Markdown
Contributor

@oliverbarnes oliverbarnes commented Mar 2, 2021

🎩 What? Why?

Workflow dispatches currently fail silently on error, and their steps show as successful on the CI. This PR configures curl to send an exit signal when that happens, forcing the step to fail.

Also cleans up the branch constraint by removing the conditional and configuring it at the top of the workflow.

📌 Related Issues

In response to #7360 (comment)

Testing

This was tested by switching the workflow to pull_request, turning off the branch restriction, commenting out the existing curl and running:

curl --fail --show-error https://httpbin.org/status/403

(there's a new --fail-with-body option, but it's not available on Github runner's current curl version)

To test the actual updated workflow, you can delete the PAT secret to force an auth error.

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

Screen Shot 2021-03-02 at 2 46 13 PM

@oliverbarnes oliverbarnes force-pushed the ci/exit-on-dispatch-failure branch from a0cd63b to ba7cb8b Compare March 2, 2021 12:20
@oliverbarnes oliverbarnes force-pushed the ci/exit-on-dispatch-failure branch from ba7cb8b to 4a354c9 Compare March 2, 2021 14:32
@oliverbarnes oliverbarnes changed the title WIP exit on dispatch failures Exit on CI workflow dispatch failures Mar 2, 2021
@oliverbarnes oliverbarnes marked this pull request as ready for review March 2, 2021 16:53
@oliverbarnes oliverbarnes requested a review from mrcasals March 2, 2021 16:53
Comment on lines +4 to 7
branches:
- develop
paths:
- 'docs/**'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't know if this would behave as an OR or as an AND, that's why I restricted it from the step level, but since the job does not appear here it means it works as an AND! Thanks!

@mrcasals mrcasals merged commit fee1047 into develop Mar 2, 2021
@mrcasals mrcasals deleted the ci/exit-on-dispatch-failure branch March 2, 2021 16:57
@mrcasals
Copy link
Copy Markdown
Contributor

mrcasals commented Mar 4, 2021

I noticed the Docker builds were not triggered when the 0.24.0.rc1 version was published. I triggered them manually in the docker repo.

Maybe they didn't trigger because I marked the version as a pre-release? @oliverbarnes

@mrcasals
Copy link
Copy Markdown
Contributor

mrcasals commented Mar 4, 2021

Ah, no: it looks like the job was triggered successfully, but it was in a moment when GitHub Actions was semi-down, so it's in a weird state:

image

All fine, I guess!

entantoencuanto added a commit that referenced this pull request Mar 4, 2021
* develop:
  Update the workflow cleanup action to the latest version (#7535)
  Don't schedule CI jobs for locales PRs (#7534)
  Fix record encryptor trying to decrypt or decode non-String values (#7536)
  Add Votings landing page to the design app (#7527)
  New Crowdin updates (#7530)
  Fix non-unique IDs element in filter hash cash (#7531)
  New Crowdin updates (#7485)
  Add statistics cell to votings landing page and reuse it in other places (#7413)
  Add Votings landing page layout (#7440)
  Add share modal to budgets (#7519)
  Do not change the global test app configs during specs (#7525)
  Change the order of attachments in budgets (#7524)
  Remove console warnings from the conversations views (#7523)
  Don't allow filtering meetings by user group if setting is disabled (#7514)
  Remove duplicated migration (#7517)
  New Admin users cannot accept Terms and conditions (#7516)
  Let installations delay TranslatorJob initialization (#7507)
  Exit on CI workflow dispatch failures (#7502)
  Invalidate all user sessions when destroying the account (#7506)
  Audit vote (#7442)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants