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 a scheduled workflow #1391

Merged

Conversation

WilliamJamieson
Copy link
Contributor

@WilliamJamieson WilliamJamieson commented Feb 19, 2023

I have noticed a few things have being occurring since we began splitting off the 2.15.x development for ASDF:

  1. A lot of unnecessary workflow runs have taken place; namely, downstream and s390x workflows seem to be getting run on every push to the master and 2.15.x branches. Essentially this results in a lot of duplicated CI runs. In turn we seem to be running out of runners for our actual PRs, so we end up waiting for CI to run. Since both downstream and s390x both take a long time to complete (for some of their jobs) and are intended as "smoke" testing, they do not need to be run on every merge to master or 2.15.x. In reality, they only need to be run on a schedule, when called for by the appropriate label in on a PR, or when we push a tag for a release.
  2. Our CI, cannot be automatically run on a schedule for the 2.15.x branch. The way cron (scheduled) jobs work in GitHub actions is that they are only triggered on the default branch of the repo. Meaning our current cron jobs only run on master at the current time. This means 2.15.x will only have tests run on it when changes are made to the branch, which will become an issue once the release is finalized.

This PR intends to fix both of these problems by introducing a scheduled workflow, which at heart is a workflow which triggers the: ci, downstream, and s390x workflows on both master and 2.15.x branches(later release branches can be added). This means the cron only needs to be in the scheduled workflow and not in any of our other workflows. Also, since we can ensure the downstream and s390x workflows are properly triggered by scheduled workflow, we can reduce the running of downstream and s390x on all merges to the master and 2.15.x branches, instead limiting them to the schedule, when called for within a PR, and on new tags.

Note that these changes were based on the discussion in OpenAstronomy/github-actions-workflows#108, with the scheduled workflow largely based on https://github.com/sunpy/sunpy/blob/main/.github/workflows/scheduled_builds.yml.

  • add the correct token to the ASDF secrets as WORKFLOW_TOKEN when this PR is merged.

@WilliamJamieson
Copy link
Contributor Author

@ConorMacBride, based on our conversation in OpenAstronomy/github-actions-workflows#108, what is does scheduled.yml look good to you. Unfortunately, there is not a good way to directly test this workflow within this PR, so hopefully I made this correctly.

@WilliamJamieson
Copy link
Contributor Author

Note I added the Downstream CI and s390x labels to demonstrate that they can still be label triggered.

@WilliamJamieson WilliamJamieson marked this pull request as ready for review February 20, 2023 14:59
@WilliamJamieson WilliamJamieson requested a review from a team as a code owner February 20, 2023 14:59
Copy link
Member

@zacharyburnett zacharyburnett left a comment

Choose a reason for hiding this comment

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

This looks good to me, should fail-fast be true though?

@WilliamJamieson
Copy link
Contributor Author

WilliamJamieson commented Feb 20, 2023

This looks good to me, should fail-fast be true though?

It might as well be since this workflow just executes other workflows, meaning those workflows will show up as their own runs under Actions not inside this workflow's run. Effectively, if one of these workflows fails to run they all will (because it means the token has stopped working).

@WilliamJamieson WilliamJamieson merged commit 8a03522 into asdf-format:master Feb 20, 2023
@WilliamJamieson WilliamJamieson deleted the feature/schedule_CI branch February 20, 2023 15:45
meeseeksmachine pushed a commit to meeseeksmachine/asdf that referenced this pull request Feb 20, 2023
@WilliamJamieson
Copy link
Contributor Author

This was successfully triggered manually: https://github.com/asdf-format/asdf/actions/runs/4225027648/jobs/7336904936

Copy link

@ConorMacBride ConorMacBride left a comment

Choose a reason for hiding this comment

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

Yeah, the schedule workflow looks great. Glad you got it working.

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