-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Parallelize the CI image builds (continued) #26698
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #26698 +/- ##
=======================================
Coverage 69.48% 69.49%
=======================================
Files 1894 1894
Lines 74151 74151
Branches 8243 8243
=======================================
+ Hits 51527 51528 +1
+ Misses 20555 20554 -1
Partials 2069 2069
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for recovering this!
just a comment
.github/workflows/docker.yml
Outdated
if: needs.config.outputs.has-secrets | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is secrets.DOCKERHUB_USER
.github/workflows/docker.yml
Outdated
|
||
on: | ||
release: | ||
types: [ published ] | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
types: [synchronize, opened, reopened, ready_for_review] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment: pull_request
trigger will use the PR SHA and run any changes made on any PR. PRs from forks don't contain secrets
0c6ea6d
to
f4ad2ce
Compare
.github/workflows/docker.yml
Outdated
type=sha,prefix=,format=long | ||
type=ref,event=pr | ||
type=raw,value=master,enable={{is_default_branch}} | ||
type=raw,value=latest,enable={{is_default_branch}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mistercrunch I updated the docker build at the same time that @sebastianliebscher was writing his initial PR so he didn't have a chance to capture the changes from this PR, but @sfirke and I had updated the docker image latest
tag to point to the latest official release image only and not the latest production master image so that subsequent docker deployments would run from the latest official release instead of master. There's a script that you can use from the PR to get the value for latest, or feel free to update the way that runs, too.
2ea9bf9
to
237caa1
Compare
Ok, starting over and try a different approach |
Request for comments here, given this docker build matrix: strategy:
matrix:
target: ["dev", "lean", "lean310", "lean39", "websocket", "dockerize"]
platform: ["linux/amd64", "linux/arm64"]
fail-fast: false Do we need every combination for each PR and each SHA in |
9df9361
to
f9096a7
Compare
We can probably remove lean39. I added that version as a request from someone in the community who later found a workaround, and it's probably not needed. We can maybe check with @rusackas on data around who is using it, but I don't think we really need to have docker images based on multiple versions of python. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with or without the lean39 image. 👍
I may be missing some requirements, but totally agree, I actually don't see the point on building every flavour on every PR SHA, also on a PR from a fork, images are just built and not pushed so we are just testing them. My take would be to just leave |
2ef8df8
to
49a6f9b
Compare
new approach
originally started from #25564, but got tangled in intricate changes around release tag management that conflicted with the approach used originally, so I started over by
scripts/docker_build_push.sh
, that originally generated a bunch of docker build commands to be executed sequentially, here I move to this bash script running a single command given the parameters, so it can be reused to run multiple build commands in parallel while orchestrating in GitHub actions. I tried to DRY what was in there cautiously