Avoid updating Ubuntu Docker image in PR builds#15840
Avoid updating Ubuntu Docker image in PR builds#15840MiguelWeezardo wants to merge 3 commits intotrinodb:masterfrom
Conversation
6ce5da2 to
aae073a
Compare
452dd7c to
973f8d0
Compare
|
I'm also thinking about running buildx for multiple platforms in parallel: https://github.com/MiguelWeezardo/trino/tree/docker_buildx_parallel |
Cool, but this is out of the scope of this PR. We're trying to improve resiliency against network issues. Let's get this working and merged first, and we can improve the duration of these jobs later. |
973f8d0 to
3d9d200
Compare
|
CI hit this: I started wondering if it'll actually be more reliable. Also, it doesn't look like it's using separate cache entries for every architecture. If it overwrites the cache for every arch, it won't be able to use it at all. WDYT on how to continue? |
f903b5d to
868b736
Compare
I'd like to check if an approach using inline caching will work. It seems to work locally on my laptop. |
245bf87 to
2cfc118
Compare
2cfc118 to
0efe9a7
Compare
Some issues with stability of Ubuntu repositories have surfaced lately. Our Dockerfile tries to update packages in the base Ubuntu image, and when that fails, the entire `maven-checks` job fails. We can use layers from the latest trino image to avoid running these updates.
ce010b4 to
905095f
Compare
a8753db to
d147775
Compare
4d3b580 to
d147775
Compare
|
It seems that Docker cache cuts down the step time from ~9 minutes to ~7. |
Use GitHub Actions cache in Docker BuildX
d147775 to
4fcdc7b
Compare
@MiguelWeezardo could this be an issue? |
| platforms: arm64,ppc64le | ||
| - name: Test Docker Image | ||
| run: core/docker/build.sh | ||
| run: core/docker/build.sh -c |
There was a problem hiding this comment.
Some issues with stability of Ubuntu repositories have surfaced lately.
Our Dockerfile tries to update packages in the base Ubuntu image, and
when that fails, the entiremaven-checksjob fails.
Updates are not necessary (per Docker's philosophy, updates to the base image should be part of base image lifecycle), but we install new stuff too.
We can use layers from the latest trino image to avoid running
these updates.
We already have some retries
Lines 29 to 30 in 257c2a5
are these not sufficient?
what can we do to make them sufficient?
This change may get CI working, but we cannot rely on that for automated releases (once we have them), so would be nice to have some more self-contained solution
There was a problem hiding this comment.
BTW this means CI won't see any updates to eclipse-temurin:17-jdk image only until we do a release.
So if eclipse-temurin:17-jdk updates affects us in any way, we won't know about that until our users know about that.
| - uses: docker/setup-qemu-action@v2 | ||
| with: | ||
| platforms: arm64,ppc64le | ||
| - name: Set up Docker Buildx |
There was a problem hiding this comment.
I am not well-versed in buildx.
if you want me to continue the review of this PR, I would recommend splitting this out to a follow-up
Yes, that's the problem this PR is trying to solve by caching. |
|
I'm also considering adding more apt mirrors before running |
Testing of that approach continues in MiguelWeezardo#14 |
|
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
|
@MiguelWeezardo and @nineinchnick .. is this work still ongoing and valid or do we want to close this PR? |
|
We paused the work for now. We got some initial feedback from Piotr that we need to address. We can close this now and reopen later. |
|
The cache doesn't reliably solve the flaky Ubuntu repos issue. This approach might be useful for speeding up builds. |
Description
Some issues with stability of Ubuntu repositories have surfaced lately.
Our Dockerfile tries to update packages in the base Ubuntu image, and when that fails, the entire
maven-checksjob fails.We can use a build cache to avoid running these updates.
Additional context and related issues
#15807 (comment)
https://github.com/trinodb/trino/actions/runs/4004028582/jobs/6872683430
Release notes
(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: