CI adjustments#3535
Conversation
127556a to
4650e5d
Compare
fdbf2ac to
c32df15
Compare
| test-unit: | ||
| # Supposed to work: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-returning-a-json-data-type | ||
| # Apparently does not | ||
| # timeout-minutes: ${{ fromJSON(env.SHORT_TIMEOUT) }} |
There was a problem hiding this comment.
I wish that worked. Anyone has insight?
| max_attempts: 2 | ||
| retry_on: error | ||
| command: docker run -t --rm --privileged test-integration | ||
| run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=false |
There was a problem hiding this comment.
Split the two steps.
| echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", "experimental": true, "ip6tables": true}' | sudo tee /etc/docker/daemon.json | ||
| sudo systemctl restart docker | ||
| - name: "Prepare integration test environment" | ||
| run: docker build -t test-integration-ipv6 --target test-integration-ipv6 --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} . |
There was a problem hiding this comment.
No need for the extra stage that has nothing specific. It is just an extra arg.
| max_attempts: 2 | ||
| retry_on: error | ||
| command: docker run --network host -t --rm --privileged test-integration-ipv6 | ||
| run: docker run --network host -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-ipv6 |
| cache: true | ||
| check-latest: true | ||
| - name: "Cross" | ||
| - name: "build" |
There was a problem hiding this comment.
Better display. This is not "cross-compilation" it is building for different versions of go.
| } else if !base.EnableKubernetes && base.KubernetesCompatible { | ||
| t.Skip("runner skips Kubernetes compatible tests in the non-Kubernetes environment") | ||
| } | ||
| if !GetFlakyEnvironment() && !GetEnableKubernetes() && !GetEnableIPv6() { |
There was a problem hiding this comment.
This is the part that keep the legacy tests into the "retry" part.
|
Oh docker, I... |
33e89d5 to
fd7528d
Compare
dc52901 to
f4954f0
Compare
|
That was quite a trek. @AkihiroSuda @djdongjin at your convenience. |
| fi | ||
| done | ||
|
|
||
| if [ "$needsudo" != "" ]; then |
There was a problem hiding this comment.
This can cause a confusion when WITH_SUDO is set to "0", "false", etc.
There was a problem hiding this comment.
Fair. I'll restrict it.
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
NOTE: this is pending #3572, #3573, #3574, #3575This is the next part of the test rework effort.
The most important change here
Is that we will now have two separate steps for every integration test run:
Note that the above split does NOT apply to ipv6, nor kube, tests. These are considered safe.
Right now, the balance is about 286 (rootful, no retry) vs. 500 (with retry).
Hopefully, as we fix and migrate more tests, and address bugs in nerdctl, it will shift.
Note that running legacy tests without retries is currently very painful and does surface a lot of conditions that have been previously unseen / ignored for a long time. As a lot of bugs have been recently fixed with regards to concurrency, underlying issues are also starting to crop up, and these very likely run deep / are involved to fix.
These are chiefly:
This is the reason why we are - conservatively - leaving the pre-existing, legacy tests in the "with retries" bucket.
There is now a helper script,
test-integration.sh.When ran without any argument, if will run both steps in order:
If you want to run ONLY the first step (aka "safe tests"), call:
test-integration.sh -test.only-flaky=falseIf you want to run ONLY the second step, call:
test-integration.sh -test.only-flaky=trueThat works as well with gotestsum, or go test, evidently:
Note though that the default in that case is
-test.only-flaky=false:Other CI changes