-
Notifications
You must be signed in to change notification settings - Fork 216
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
fix: fix cross-platform build image dependency package architecture i… #260
Conversation
…ssues Signed-off-by: wenhuwang <[email protected]>
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.
Cool stuff, TIL about $TARGETPLATFORM
:)
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.
Sorry, I have to block this. It has significantly regressed our ARM image build.
Before:
After:
Build logs here.
@wenhuwang I think this is due to the issue I mentioned in this comment - Go builds on ARM64 are much much slower (10X!) than Go builds on AMD64 targeting ARM64 via GOARCH
. Please adjust these Dockerfile changes so that the Go builds still happen in an AMD64 image and let's see if that resolves the platform issue while keeping the builds fast 🙂
@rbtr The build time is indeed an issue worthy of concern. I looked carefully at the build log and found that most of the time it was downloading dependency packages. I am not sure whether there will be cached data in the build process, and whether the ARM64 platform increases the time because there is no cached data in the first build. |
@wenhuwang I re-queued it but no improvement |
I did a little more investigation here and I think we're not using the cache correctly in |
@rbtr thanks for your help. I will try to fix this issues by building an ARM64 image based on AMD64 |
I tested only set |
Signed-off-by: wenhuwang <[email protected]>
Hey @wenhuwang this architecture issue is showing up in some other scenarios, so I think we will take your fix despite the performance impact on the pipeline. We can try to make that faster again later. |
Signed-off-by: wenhuwang <[email protected]>
@rbtr Reverted to initial |
# Description This should address the arm/amd64 binary errors in the built image while keeping the Go build stage fast by using the BUILDPLATFORM/TARGETPLATFORM and cross-compiling. It also moves the tools stage from bullseye to bookworm: bookworm has clang-14 available in the package manager and directly installable, so all of the manual downloads are removed, and the explicit installations are cut down significantly. Removes some unnecessary Docker cruft which may have been well-intentioned but isn't useful. ## Related Issue This builds on #260 which fixed #130. ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed Please add any relevant screenshots or GIFs to showcase the changes made. ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. --------- Signed-off-by: Evan Baker <[email protected]>
#260) # Description Fixed the issues of retina-controller startup failure caused by abnormal cross-platform build image dependency package architecture. ## Related Issue fixes #130 ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [ ] I have followed the project's style guidelines. - [ ] I have updated the documentation, if necessary. - [ ] I have added tests, if applicable. # Testing Done Built amd64 and arm64 image and deployed amd64 image in K8s cluster nodes agent pod is up and running in the nodes --------- Signed-off-by: wenhuwang <[email protected]>
# Description This should address the arm/amd64 binary errors in the built image while keeping the Go build stage fast by using the BUILDPLATFORM/TARGETPLATFORM and cross-compiling. It also moves the tools stage from bullseye to bookworm: bookworm has clang-14 available in the package manager and directly installable, so all of the manual downloads are removed, and the explicit installations are cut down significantly. Removes some unnecessary Docker cruft which may have been well-intentioned but isn't useful. ## Related Issue This builds on #260 which fixed #130. ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed Please add any relevant screenshots or GIFs to showcase the changes made. ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. --------- Signed-off-by: Evan Baker <[email protected]>
Description
Fixed the issues of retina-controller startup failure caused by abnormal cross-platform build image dependency package architecture.
Related Issue
fixes #130
Checklist
git commit -S -s ...
). See this documentation on signing commits.Testing Done
Built amd64 and arm64 image and deployed amd64 image in K8s cluster nodes
agent pod is up and running in the nodes