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

ci: use groups of tests in gha #15018

Merged
merged 13 commits into from
Oct 27, 2022
Merged

ci: use groups of tests in gha #15018

merged 13 commits into from
Oct 27, 2022

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Oct 24, 2022

(hold until after 1.4.2)

This PR changes our Core CI Tests GHA to run packages in groups of packages instead of one runner per package.

The plumbing is a bit more complex, so it's now documented in ci/README.md.

Grouping packages this way dramatically cuts down on the number of runners invoked by each push event. We were triggering ~50 concurrent runners; now we should use about 7. Packages are organized into groups as declared in ci/test-core.json. The idea is to create groups that are reasonably well balanced in terms of run time. We can tweak the groups going forward as needed.

The tools/missing tool has been updated to scan ci/test-core.json against Nomad source. It also now serves as a translator for group -> package list.

In a followup PR we can probably have the drivers group run on all platforms, eliminating the need for the Circle test-windows runner.

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I was worried about how long it was going to take but we're bottlenecked on the giant nomad package anyways right now; I can imagine if we were to break that up we'd be able to break up these groups a bit more as well.

contributing/testing.md Outdated Show resolved Hide resolved
Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

🎉

Co-authored-by: Tim Gross <tgross@hashicorp.com>
@shoenig shoenig marked this pull request as ready for review October 27, 2022 14:02
@shoenig shoenig merged commit f715cc1 into main Oct 27, 2022
@shoenig shoenig deleted the gha-groups branch October 27, 2022 14:03
shoenig added a commit that referenced this pull request Oct 27, 2022
* [no ci] use json for grouping packages for testing

* [no ci] able to get packages in group

* [no ci] able to run groups of tests

* [no ci] more

* [no ci] try disable circle unit tests

* ci: use actions/checkout@v3

* ci: rename to quick

* ci: need make dev in mods cache step

* ci: make compile step depend on checks step

* ci: bump consul and vault versions

* ci: need make dev for group tests

* ci: update ci unit testing docs

* docs: spell plumbing correctly

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>
shoenig added a commit that referenced this pull request Oct 27, 2022
* [no ci] use json for grouping packages for testing

* [no ci] able to get packages in group

* [no ci] able to run groups of tests

* [no ci] more

* [no ci] try disable circle unit tests

* ci: use actions/checkout@v3

* ci: rename to quick

* ci: need make dev in mods cache step

* ci: make compile step depend on checks step

* ci: bump consul and vault versions

* ci: need make dev for group tests

* ci: update ci unit testing docs

* docs: spell plumbing correctly

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>
shoenig added a commit that referenced this pull request Oct 27, 2022
* ci: use the same go mod cache across test-core jobs (#15006)

* ci: use the same go mod cache for test-core jobs

* ci: precache go modules

* ci: add a mods precache job

* ci: add -core suffix to mods action (#15015)

Forgot to add this line to the new mods action; without it, it
creates a cache different from the one used by the other jobs.

* ci: use groups of tests in gha (#15018)

* [no ci] use json for grouping packages for testing

* [no ci] able to get packages in group

* [no ci] able to run groups of tests

* [no ci] more

* [no ci] try disable circle unit tests

* ci: use actions/checkout@v3

* ci: rename to quick

* ci: need make dev in mods cache step

* ci: make compile step depend on checks step

* ci: bump consul and vault versions

* ci: need make dev for group tests

* ci: update ci unit testing docs

* docs: spell plumbing correctly

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>

* deps: run go mod tidy

Co-authored-by: Tim Gross <tgross@hashicorp.com>
shoenig added a commit that referenced this pull request Oct 27, 2022
* ci: use the same go mod cache across test-core jobs (#15006)

* ci: use the same go mod cache for test-core jobs

* ci: precache go modules

* ci: add a mods precache job

* ci: add -core suffix to mods action (#15015)

Forgot to add this line to the new mods action; without it, it
creates a cache different from the one used by the other jobs.

* ci: use groups of tests in gha (#15018)

* [no ci] use json for grouping packages for testing

* [no ci] able to get packages in group

* [no ci] able to run groups of tests

* [no ci] more

* [no ci] try disable circle unit tests

* ci: use actions/checkout@v3

* ci: rename to quick

* ci: need make dev in mods cache step

* ci: make compile step depend on checks step

* ci: bump consul and vault versions

* ci: need make dev for group tests

* ci: update ci unit testing docs

* docs: spell plumbing correctly

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>

* deps: run go mod tidy

Co-authored-by: Tim Gross <tgross@hashicorp.com>
shoenig added a commit that referenced this pull request Nov 3, 2022
* ci: backport of gha groups  (#15058)

* ci: use the same go mod cache across test-core jobs (#15006)

* ci: use the same go mod cache for test-core jobs

* ci: precache go modules

* ci: add a mods precache job

* ci: add -core suffix to mods action (#15015)

Forgot to add this line to the new mods action; without it, it
creates a cache different from the one used by the other jobs.

* ci: use groups of tests in gha (#15018)

* [no ci] use json for grouping packages for testing

* [no ci] able to get packages in group

* [no ci] able to run groups of tests

* [no ci] more

* [no ci] try disable circle unit tests

* ci: use actions/checkout@v3

* ci: rename to quick

* ci: need make dev in mods cache step

* ci: make compile step depend on checks step

* ci: bump consul and vault versions

* ci: need make dev for group tests

* ci: update ci unit testing docs

* docs: spell plumbing correctly

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>

* deps: run go mod tidy

Co-authored-by: Tim Gross <tgross@hashicorp.com>

* build: fix makefile conflict

Co-authored-by: Tim Gross <tgross@hashicorp.com>
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants