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

Comment workflows and Mergify config a bit better #10359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

geekosaur
Copy link
Collaborator

@geekosaur geekosaur commented Sep 15, 2024

If you have any "favorite" confusing places in the workflows or Mergify config, please comment on them here so I can try to do something about them. Also, I need some clarification myself, in particular on why we're redundantly using always() in a number of places and why it seems to be important to use it on doc-skip post jobs when cancellation will correctly fail the workflow and post-job anyway.

Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • [ ] Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions). it's just comments, not worth it unless we think it'll lead to merge conflicts later

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

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

Maybe add a note to CONTRIBUTING.md saying that the Mergify config includes extensive comments explaining how things are setup?..

@@ -79,6 +79,7 @@ jobs:
# This way we can use it exclusively in branch protection rules
# and abstract away the concrete jobs of the workflow, including their names
bootstrap-post-job:
# This conditional overrides job cancellation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be good to hint why we want this override.

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'll do that when I figure it out. 🙃 (There's at least one place where the comment asks why we're doing it there; based on GHA docs, it seems inappropriate.)

Copy link
Collaborator Author

@geekosaur geekosaur Sep 15, 2024

Choose a reason for hiding this comment

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

BTW, best I can figure is that it's used in jobs that are marked "required" in branch protection rules and are part of the documentation-skip hack. Except that

  1. it seems redundant, since cancellation of the job should already fail the required post-job;
  2. there's those few places that aren't part of branch protection or the doc-skip hack and don't seem to gain anything at all from running on cancellation, notably the one in validate.yml that dumps the GHCup configuration.

@@ -145,6 +145,7 @@ jobs:
run: make doc/buildinfo-fields-reference.rst
- name: Cache dependencies
uses: actions/cache/save@v4
# 'always()' here overrides job cancellation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks clumsy that the same thing is phrased differently than in bootstrap.yml

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Still sorting out how best to put it, and addition of above about why it's wanted. These will all change, probably by explaining it in one place and referencing it in the others.

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.

2 participants