Docker: Address build file CI warnings#19363
Conversation
Signed-off-by: Matt Lord <mattalord@gmail.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
c7bdbd2 to
b79a121
Compare
b79a121 to
639118e
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
639118e to
a6071ab
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates Vitess’ Docker build definitions to eliminate Dockerfile linter warnings by removing hard-coded FROM --platform=linux/amd64 values and switching legacy ENV key value syntax to ENV key=value in the lite images.
Changes:
- Replace constant
--platform=linux/amd64with--platform=${BUILDPLATFORM}across multiple Dockerfiles. - Update
ENVstatements indocker/lite/*Dockerfiles to the non-legacykey=valueformat. - Add a default
BUILDPLATFORMexport tobuild.env.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| docker/vttestserver/Dockerfile.mysql84 | Switches FROM --platform to ${BUILDPLATFORM} for builder and final stages. |
| docker/vttestserver/Dockerfile.mysql80 | Switches FROM --platform to ${BUILDPLATFORM} for builder and final stages. |
| docker/lite/Dockerfile.percona84 | Switches FROM --platform to ${BUILDPLATFORM}; updates ENV to key=value. |
| docker/lite/Dockerfile.percona80 | Switches FROM --platform to ${BUILDPLATFORM}; updates ENV to key=value. |
| docker/lite/Dockerfile.mysql84 | Switches FROM --platform to ${BUILDPLATFORM}; updates ENV to key=value. |
| docker/lite/Dockerfile.mysql80 | Switches FROM --platform to ${BUILDPLATFORM}; updates ENV to key=value. |
| docker/lite/Dockerfile | Switches FROM --platform to ${BUILDPLATFORM}; updates ENV to key=value. |
| docker/bootstrap/Dockerfile.percona84 | Switches FROM --platform to ${BUILDPLATFORM}. |
| docker/bootstrap/Dockerfile.percona80 | Switches FROM --platform to ${BUILDPLATFORM}. |
| docker/bootstrap/Dockerfile.mysql84 | Switches FROM --platform to ${BUILDPLATFORM}. |
| docker/bootstrap/Dockerfile.mysql80 | Switches FROM --platform to ${BUILDPLATFORM}. |
| docker/bootstrap/Dockerfile.common | Switches FROM --platform to ${BUILDPLATFORM}. |
| build.env | Exports BUILDPLATFORM with a default of linux/amd64. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
57bcd5b to
3ba53b0
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
3ba53b0 to
f3c2e7b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This addresses the warnings, but I'm not sure I like the solution. 😅 How do you feel about adding I also noticed that Percona actually publishes official ARM builds for their packages, so I guess we could publish amd64 and arm64 builds for those container images (not as part of this PR, of course). |
What don't you like? What do you think would be better? Note that we do currently have this in the Makefile: You're suggesting we move the platform flag there for the amd64 builds as well? I'm good with that too. Let me know if I misunderstood. We'd have to do that in a few other places too, but not a big deal: We know that we want to support ARM64, that has been an ongoing thing that I thought we might finally do for v24 (but the contact I was working with on the ARM side has gone quiet). This work resolves the linter warnings and removes our usage of deprecated things (which could be removed at any point), while also adding an ENV variable that can be used to build for other target platforms such as ARM64. |
Signed-off-by: Matt Lord <mattalord@gmail.com>
|
I think the failures will be fixed by #19371. |
Signed-off-by: Matt Lord <mattalord@gmail.com>
e444e2c to
8440651
Compare
8440651 to
8331387
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19363 +/- ##
==========================================
- Coverage 69.67% 69.65% -0.02%
==========================================
Files 1613 1614 +1
Lines 216459 216700 +241
==========================================
+ Hits 150807 150937 +130
- Misses 65652 65763 +111 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Description
This addresses the following warnings that we've been getting for our docker files:
Related Issue(s)
Checklist