Skip to content

Commit

Permalink
chore(ci): switch to small go image (#5099)
Browse files Browse the repository at this point in the history
* chore(ci): switch to small go image

Context: p95 duration for this job over the last 90 days is 2m 17s

Solution: Switch from 2.3Gb image to generic 513mb image.

Fetching the `bastiandoetsch209/cli-build` image can increase
the Job time by ~60 seconds if the image is not cached.

```
Warning: No authentication provided, using CircleCI credentials
for pulls from Docker Hub.
image cache not found on this host, downloading bastiandoetsch209/cli-build:20240214-145818
…
bastiandoetsch209/cli-build:20240214-145818:
  using image bastiandoetsch209/cli-build@sha256:1504fdbb34f02aab15475c3eacf8c0fc82be83059cda435b91327e43a98cb863
pull stats: download 2.279GiB in 23.682s (98.54MiB/s), extract 2.31GiB in 58.549s (40.39MiB/s)
```

Even pipelines run within minutes of each other do not necessarily hit the same image cache.
The caching layer at use here is entirely opaque to me, but the observed affects are
that the `Spin up environment` step can take either 0 or 60 seconds.

Switching to one of the Circle CI provided images which also tend to be smaller could help here.
Perhaps the inscrutable image caching is more likely to be optimised for their own images.

* chore(ci): removes unused dep to speed up feedback cycle
i
The test-go job has dependency on the artifacts generated as
part of the prepare-build job. Running this asap to reduce time
to results.
  • Loading branch information
thisislawatts authored Mar 11, 2024
1 parent 5e1b1b7 commit d9f0491
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ executors:
docker:
- image: ubuntu:latest
resource_class: small
circle-go:
docker:
- image: cimg/go:1.20
resource_class: medium+
docker-amd64:
docker:
- image: bastiandoetsch209/cli-build:20240214-145818
Expand Down Expand Up @@ -399,7 +403,7 @@ workflows:
- nodejs-install
- team_hammerhead-cli
requires:
- prepare-build
- secrets-scan
filters:
branches:
ignore: main
Expand Down Expand Up @@ -911,7 +915,7 @@ jobs:
path: test/reports

test-go:
executor: docker-amd64
executor: circle-go
steps:
- prepare-workspace
- run:
Expand Down

0 comments on commit d9f0491

Please sign in to comment.