-
Notifications
You must be signed in to change notification settings - Fork 67
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 deprecated aarch image #563
Fix deprecated aarch image #563
Conversation
Signed-off-by: mpeiffer <[email protected]>
b67cae9
to
98c42be
Compare
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 fantastic! Nice work. Approved
Where is the Makefile change? |
Signed-off-by: mpeiffer <[email protected]>
Whoops, forgot to commit that file! It's added now. |
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.
Nice use of --build-arg
in the Makefile and Dockerfile
Approved
@mpeiffer The build pipeline is failing with:
The intermediate build stage is called |
I always run the |
While you are preparing another commit, can you also rebase to the |
Ah, sorry about that! Unfortunately I won't have my laptop until this Friday, as I will be out of town but I will fix it as soon as I get back. Do you want me to close the PR until then and reopen it after I make the fix? |
No worries. We'll keep it open and warm until you get back and ready to tackle it again. |
Signed-off-by: mpeiffer <[email protected]>
7f4572f
to
9886cca
Compare
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.
All good now. Merging.
Hmm The pipeline test build failed. I need to run it on my system to understand better. https://github.com/open-horizon/examples/actions/runs/3353298023/jobs/5556541067 Will hold off on the merge until Monday. |
Using the Dockerfile and Makefile from this PR, I successfully built all three arch {amd64, arm, arm64} containers on my Fedora system. I manually tested the containers on devices running those three architectures. They ran successfully. I don't why the test pipeline has a problem (Its running @mpeiffer FROM golang:1.19-alpine as go_build
LABEL stage=builder and modified the Makefile to prune the intermediate stage after each build:
docker build --build-arg ARCH=$(ARCH) --platform linux/$(ARCH) -t $(DOCKER_IMAGE_BASE)_$(ARCH):$(SERVICE_VERSION) -f ./Dockerfile .
@docker image prune --filter label=stage=builder --force You might want to add the above and see if that helps the |
@jonwalicki Thank you for manually testing on your end! I was also able to build and run all three arch containers on windows. I'll try adding those changes and see if it fixes anything. |
Signed-off-by: mpeiffer <[email protected]>
I think the error is in the GHA Build / test pipeline, not the code here. |
That sounds good to me. Would it be possible to add the hacktoberfest-accepted label to this while we try to resolve the issue? If it turns out there's something on my end that needs to get done I can continue working on it past October. |
@mpeiffer @johnwalicki I'll add |
@t-fine Thanks for looking into it! A label was added but for it to be counted it should be hacktoberfest-accepted, not hacktoberfest-approved. |
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.
@johnwalicki @mpeiffer I figured it out! The problem was the arm
arch build reusing the golang:1.19-alpine
image that is built in the amd64
run and not rebuilding it for arm
. You can see it's built on line 520 for amd64 then reused on line 659 for the arm build
Successful GitHub action build with the following changes.
@t-fine Thanks for the investigation and fix. Let's merge. |
Signed-off-by: Troy Fine <[email protected]>
Will do! Pushed the changes. Merging once the Github action passes again. |
@johnwalicki @t-fine Thank you for looking over this and for pushing the fix! |
Summary of Changes
Addresses Issue #559
Testing
Running make build: