chore(ci): isolate Docker-dependent acceptance tests - #7007
Conversation
Run Docker daemon coverage in one dedicated Linux acceptance job instead of provisioning Remote Docker for every Docker and Alpine shard. Keep the remaining acceptance matrix free of Docker daemon commands and remove the unused Docker package from Alpine setup.
Install and verify a pinned Docker Compose plugin in the dedicated daemon job, then invoke proxy fixtures through the supported docker compose command. This makes the relocated proxy-authentication tests execute instead of failing because the build image lacks the legacy docker-compose binary.
Copy the proxy setup scripts into the fixture image instead of bind-mounting a path that is unavailable on CircleCI's remote Docker VM. Copy the generated Kerberos credentials back into the test workspace with docker cp so the CLI can still consume them.
Keep proxy-authentication coverage in its existing conditional suite because CircleCI Remote Docker does not provide the two-way networking that fixture requires. Remove the Compose and fixture changes so the dedicated Remote Docker job runs only the container daemon tests targeted by this optimization.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
PR Reviewer Guide 🔍
|
|
|
||
| jest.setTimeout(1000 * 300); | ||
|
|
||
| describe('snyk container with a local Docker daemon', () => { |
There was a problem hiding this comment.
This may lead to problems when executing the tests directly with jest (locally)
before
- windows safe guard (container.spec.ts:132)
describeIf(!isWindows)('test', () => {
- macos safe guard (lines 348, 408)
-
if (os.platform() === 'darwin') { return; }
-
after
- tests were moved under this line
describe('snyk container with a local Docker daemon', () => {- no safeguards for windows nor macos (apparently, please correct me if I am wrong)
Could you please address or elaborate on this (apparent) issue?
Thanks, good job
|
|
||
| const execAsync = promisify(exec); | ||
|
|
||
| jest.setTimeout(1000 * 300); |
There was a problem hiding this comment.
should each it have a timeout as well to be set?
There was a problem hiding this comment.
yes, maybe more granular will be better
| requires: | ||
| - build linux amd64 |
There was a problem hiding this comment.
should these tests consider only Linux?
I wonder if we should consider Windows as well. I see that before they were being ignored on MacOS.
There was a problem hiding this comment.
docker tests are currently running just for linux if I am not mistaken
Measured impact
A successful before-and-after comparison reduced both CircleCI usage and PR validation time:
Comparison runs:
What changed
The acceptance workflow previously started Remote Docker for every Docker and Alpine shard, creating 36 Remote Docker environments per PR. Only two container tests use the Docker daemon.
This change moves those two tests into one dedicated Remote Docker job. The other 134 acceptance specs keep their existing platform coverage without starting Remote Docker. It also removes the unused Docker package from the Alpine test setup.
Tracking ticket: IDP-6
Validation
make formatmake lintmake build