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: improve running time of GitHub actions #615

Merged
merged 3 commits into from
Dec 6, 2024
Merged

Conversation

hmlanigan
Copy link
Member

@hmlanigan hmlanigan commented Oct 22, 2024

After moving to self-hosted runners on PS6, the GitHub actions could take 1-2+ hours. Caused in part by how the runners were configured and how the GitHub actions were constructed.

The PS6 self-hosted runners are optimized for larger jobs. Turn around time on recreating a runner could be 15-30 minutes.

Steps taken in the optimization:

  • Move very quick jobs back to using GitHub runners. e.g. static analysis and clarity
  • Tests requiring the build job, are moved to the same workflow to reduce the number of times we run the build job
  • Remove the unit test job, this is being done by github-check-merge-juju-terraform-provider-juju
  • Add a parallelization of 10 to the tests

The matrix for running the integration tests has also been reduced in size by 2/3rds. Old versions of the terraform client will no longer be tested, only the most recent. We have never seen a difference in test results caused by different client versions.

Only the x64 runners will be used until the acceptance tests can be updated with new tests which run on both architectures.

@hmlanigan hmlanigan added the hint/do-not-merge requires additional efforts, no merge label Oct 22, 2024
PS6 runners are better suited to longer running jobs due to turn around
time needed for refreshing a runner. Currently 15-30 minutes each.

Small jobs will move back to using github runners to speed up the
overall time for github actions to take.

Tests requiring the build job, are moved to the same workflow to reduce
the number of times we run the build job.

Integration tests will be run on PS6 runners using a test
parallelization of 10.
It is a duplication of github-check-merge-juju-terraform-provider-juju
and the actual merge job, thus will be required to be successful.
Not all of the charms in the acceptance tests have arm64 versions. Only
use the x64 self-hosted runners until new charms can be found.
@hmlanigan hmlanigan changed the title chore: investigate parallel test run issues fix: improve running time of GitHub actions Dec 4, 2024
@hmlanigan hmlanigan removed the hint/do-not-merge requires additional efforts, no merge label Dec 4, 2024
Copy link
Member

@alesstimec alesstimec left a comment

Choose a reason for hiding this comment

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

LGTM

strategy:
fail-fast: false
matrix:
terraform: ["1.7.*", "1.8.*", "1.9.*"]
terraform: ["1.9.*"]
Copy link
Member

Choose a reason for hiding this comment

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

nice

@hmlanigan
Copy link
Member Author

/merge

1 similar comment
@hmlanigan
Copy link
Member Author

/merge

@jujubot jujubot merged commit 3e0ca8d into juju:main Dec 6, 2024
16 of 19 checks passed
@hmlanigan hmlanigan deleted the parallel branch December 6, 2024 21:39
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.

3 participants