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

refactor(ci/github): run weaver tests on schedule, re-use workflows #3437

Conversation

jenniferlianne
Copy link

@jenniferlianne jenniferlianne commented Jul 23, 2024

Primary change:

Creates a central workflow to run all 13 weaver test workflows from either a
push, a pull request, a github command, or a schedule.

Passes a 'run_all' boolean to sub-workflows to specify if all tests should be run, not
just those with changes.

Secondary changes:

  • update concurrency groups to allow triggering from central workflow
  • remove ability to run the 13 workflows individually to declutter ci menu

Notes:

Depends on #3446

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • [x ] Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • [ x] Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

@jenniferlianne jenniferlianne force-pushed the allow_running_weaver_tests_if_code_unchanged branch from fc746d5 to 2fd322f Compare July 23, 2024 18:23
@jenniferlianne jenniferlianne changed the title chore(test) allow running weaver tests on schedule chore(test): allow running weaver tests on schedule Jul 23, 2024
Copy link
Member

@sandeepnRES sandeepnRES left a comment

Choose a reason for hiding this comment

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

LGTM, just one optional change if you want to, i.e. rename Test Weaver to Weaver_CI , just like Cactus_CI just to be consistent in naming.
But this is optional just aesthetic, I don't have much issue with current one also.

@jenniferlianne jenniferlianne force-pushed the allow_running_weaver_tests_if_code_unchanged branch 3 times, most recently from 1a81c91 to ae5d5ea Compare July 24, 2024 20:14
Copy link
Member

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@jenniferlianne Agreed, the actionlint looks bugged out. Could you please try to upgrade the actionlint version to the current latest instead of whatever we are using at the moment? I'm hoping that this bug was discovered and fixed a while back!

Also plus one for the rename that @sandeepnRES mentioned above.

@sandeepnRES
Copy link
Member

sandeepnRES commented Jul 25, 2024

I've removed all weaver checks from required ones from branch protection rules (an exception for this PR as it is refactoring the CI itself), as it was blocking the PR to be merged.
@jenniferlianne please investigate about ActionLint as @petermetz suggested, and once the PR is merged please ping me I'll add new CI checks as required in branch protection rules.

@jenniferlianne jenniferlianne force-pushed the allow_running_weaver_tests_if_code_unchanged branch 2 times, most recently from df6b2a6 to c3c2895 Compare July 25, 2024 17:39
@jenniferlianne
Copy link
Author

@petermetz I have updated the ActionLint version to the latest, but it still fails. The linter might be a getting stuck on a permissions issue between repos. (Settings->General->Actions Permissions). Mine is set to run all.

@petermetz
Copy link
Member

@jenniferlianne Now I remember! We didn't have time to fix all the linter errors in certain yaml files at the introduction of the ActionLint job and there was no documented way to ignore them so the ActionLint job deletes a list of the yaml files that we wanted to ignore as a workaround. I've just pushed a potential fix, but let's see if it actually works.

@petermetz petermetz force-pushed the allow_running_weaver_tests_if_code_unchanged branch 7 times, most recently from ea0a0a9 to a1834cb Compare July 26, 2024 19:34
@petermetz petermetz changed the title chore(test): allow running weaver tests on schedule refactor(ci/github): run weaver tests on schedule, re-use workflows Jul 26, 2024
@petermetz
Copy link
Member

@jenniferlianne I've put the fix here: #3446 once that gets merged to main and this one rebased onto main then the ActionLint job will start passing on this PR as well.

Primary change:

Creates a central workflow to
run all 13 weaver test workflows from either a
push, a pull request, a github command,
or a schedule.

Passes a 'run_all' boolean to sub-workflows
to specify if all tests should be run, not
just those with changes.

Secondary changes:
- update concurrency groups to allow triggering
  from central workflow
- remove ability to run the 13 workflows
  individually to declutter ci menu

check whether RUN_ALL can be calculated in the environment instead of as a job

rename weaver test file

update actionlint to latest

Depends on hyperledger#3446

Signed-off-by: Jennifer Bell <[email protected]>
@sandeepnRES sandeepnRES force-pushed the allow_running_weaver_tests_if_code_unchanged branch from a1834cb to e8763fd Compare August 7, 2024 06:59
@github-actions github-actions bot removed the dependent label Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

This PR/issue depends on:

@sandeepnRES sandeepnRES enabled auto-merge (rebase) August 7, 2024 07:07
@sandeepnRES sandeepnRES merged commit aa90ec6 into hyperledger:main Aug 7, 2024
141 of 144 checks passed
@jenniferlianne jenniferlianne deleted the allow_running_weaver_tests_if_code_unchanged branch September 5, 2024 17:09
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.

4 participants