-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
dynamic circleci config for streamlining test execution #6561
Conversation
529ec90
to
51e51d1
Compare
c207665
to
da96414
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, just 1 comment
The nice thing is that |
@raulk : this is awesome.
If I'm understanding this right, I think we need to do this now. I don't think we should check anything into the codebase the relies on "best intentions" to get right. |
… the gen-check CI target.
@BigLep agree with your reasoning. Based on what @magik6k said above, this is already taken into account by running |
Bingo! @BigLep @magik6k the TODOs and review comments are all addressed. |
… to test the gen-check CI target." This reverts commit 6017715.
@magik6k work here is done. |
This PR introduces dynamic CircleCI config generation to speed up our CI. Concretely, it generates scoped integration and unit test jobs, all of which run in parallel.
An integration test job is generated for every file in itest. We use the
go test <file>
invocation form, which has the limitation that itests cannot reference other symbols in the same package (they can of course reference symbols from other packages, likeitests/kit
), but that's a fair tradeoff because itests are supposed to be self-contained anyway.Unit test jobs are generated as per configuration. I tried to respect the old grouping of suites. All other top-level directories that are NOT grouped under a suite get run under the
rest
suite.I explored using CircleCI dynamic configuration, which enables you to generate the CircleCI config on their CI, and then re-submit it for execution. I found this introduced a head-of-line latency of around 1min, which I didn't like. So I removed it in favour of a make target.
Therefore, developers are responsible for regenerating the CircleCI config on their workstations, using
make circleci
. They should do this every time they add a new itest, or a new top-level package with unit tests.go mod tidy
.To parallelise things further, all you need to do is break up itest files containing many/slow tests into more itest files. This is for integration tests. For unit tests, you can create new groups.
I've removed the dependency between the build jobs and the test-short job. Didn't really make much sense.