Skip to content
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

create builder to use for multiarch #3924

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KPostOffice
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Creates a builder image to use for Kueue-viz multiarch build and then cleans it up after it is done

Which issue(s) this PR fixes:

Fixes #3916

Special notes for your reviewer:

This requires changes to the Prow CI as well, I'm not certain where these changes need to be made, could someone point me in the correct direction here?

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. labels Jan 3, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 3, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @KPostOffice. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 3, 2025
Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 004680e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/677d913e2206ae0008ffdbe3

@mbobrovskyi
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 3, 2025

# Build the kueue-viz dashboard images (frontend and backend)
.PHONY: kueue-viz-image-build
kueue-viz-image-build:
$(IMAGE_BUILD_CMD) \
-t $(IMAGE_REGISTRY)/kueue-viz-backend:$(GIT_TAG) \
-t $(IMAGE_REGISTRY)/kueue-viz-backend:$(RELEASE_BRANCH)-latest \
--platform=$(VIZ_PLATFORMS) \
--platform=$(PLATFORMS) \
Copy link
Contributor

@mbobrovskyi mbobrovskyi Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these changes made?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VIZ_PLATFORMS was added since it wasn't working with multiarch builds. I figured it would be safe to remove and prefer the more generic PLATFORMS environment variable

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see, they are the same. In that case, could you please remove VIZ_PLATFORMS everywhere?

Makefile Outdated
Comment on lines 334 to 339
# Build multiarch kueue-viz image locally
.PHONY: local-kueue-viz-image-build
local-kueue-viz-image-build:
BUILDER=$(shell $(DOCKER_BUILDX_CMD) create --use)
$(MAKE) kueue-viz-image-build PUSH=$(PUSH)
$(DOCKER_BUILDX_CMD) rm $$BUILDER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we apply this changes on kueue-viz-image target?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was just following the semantics done here, but adding it directly to the kueue-viz-image target means that we wouldn't have to update any CI I would guess

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 3, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think

kueue/Makefile

Line 362 in 780675f

kueue-viz-image: VIZ_PLATFORMS=linux/amd64

no need anymore, correct?

Copy link
Contributor

@mbobrovskyi mbobrovskyi Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it to fix an issue: #3883. However, since you're now using docker buildx create --use, that should resolve it if I understand correctly.

@KPostOffice KPostOffice force-pushed the multiArchKueueViz branch 2 times, most recently from 94eb20d to ea7a3a9 Compare January 6, 2025 16:52
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: KPostOffice
Once this PR has been reviewed and has the lgtm label, please assign mimowo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 6, 2025
@KPostOffice KPostOffice force-pushed the multiArchKueueViz branch 2 times, most recently from 8f21173 to 96cd511 Compare January 7, 2025 17:00
Signed-off-by: Kevin <kpostlet@redhat.com>
# Build the kueue-viz dashboard images (frontend and backend)
.PHONY: kueue-viz-image-build
kueue-viz-image-build:
docker run --privileged --rm tonistiigi/binfmt --install all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not obvious to me. Can you add a comment that this is required for emulated builds for docker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes for sure, I'm not even sure this is the best place for this. I put it in quickly because I was having trouble reproducing on my local env.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support linux/arm64 on Kueue visibility
4 participants