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

Allow fast builds on ppc64le #105399

Merged
merged 1 commit into from
Oct 12, 2021
Merged

Conversation

mopsfelder
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

On a ppc64le host, fast build was failing:

# make KUBE_FASTBUILD=true quick-release
+++ [0908 15:56:36] Verifying Prerequisites....
+++ [0908 15:56:36] Building Docker image kube-build:build-fd009aaa81-5-v1.23.0-go1.17-buster.0
+++ [0908 15:56:44] Syncing sources to container
+++ [0908 15:56:48] Running build command...
+++ [0908 15:56:56] Building go targets for linux/ppc64le:
    ./vendor/k8s.io/code-generator/cmd/prerelease-lifecycle-gen
> non-static build: k8s.io/kubernetes/./vendor/k8s.io/code-generator/cmd/prerelease-lifecycle-gen
touch: cannot touch '_output/bin/prerelease-lifecycle-gen': No such file or directory
make[2]: *** [Makefile.generated_files:209: _output/bin/prerelease-lifecycle-gen] Error 1
make[1]: *** [Makefile:552: generated_files] Error 2
make: *** [Makefile:512: cross] Error 1
!!! [0908 15:56:58] Call tree:
!!! [0908 15:56:58]  1: build/../build/common.sh:476 kube::build::run_build_command_ex(...)
!!! [0908 15:56:58]  2: build/release.sh:36 kube::build::run_build_command(...)
make: *** [Makefile:454: quick-release] Error 1

This error happened because the _output/bin/ directory didn't exist at
the moment the file _output/bin/prerelease-lifecycle-gen was touched, so
the path didn't exist.

The _output/bin symlink was not created by kube::golang::place_bins()
because kube::golang::setup_platforms() assumed
KUBE_CLIENT_PLATFORMS=linux/amd64 despite being on a ppc64le host.

Fix build error by not assuming host_arch=amd64 when on ppc64le in
kube::golang::setup_platforms().

Which issue(s) this PR fixes:

Fixes #105398

Special notes for your reviewer:

This is a minor fix to allow building fast builds on a ppc64le host. Change does not affect other architectures.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

On a ppc64le host, fast build was failing:

    # make KUBE_FASTBUILD=true quick-release
    +++ [0908 15:56:36] Verifying Prerequisites....
    +++ [0908 15:56:36] Building Docker image kube-build:build-fd009aaa81-5-v1.23.0-go1.17-buster.0
    +++ [0908 15:56:44] Syncing sources to container
    +++ [0908 15:56:48] Running build command...
    +++ [0908 15:56:56] Building go targets for linux/ppc64le:
        ./vendor/k8s.io/code-generator/cmd/prerelease-lifecycle-gen
    > non-static build: k8s.io/kubernetes/./vendor/k8s.io/code-generator/cmd/prerelease-lifecycle-gen
    touch: cannot touch '_output/bin/prerelease-lifecycle-gen': No such file or directory
    make[2]: *** [Makefile.generated_files:209: _output/bin/prerelease-lifecycle-gen] Error 1
    make[1]: *** [Makefile:552: generated_files] Error 2
    make: *** [Makefile:512: cross] Error 1
    !!! [0908 15:56:58] Call tree:
    !!! [0908 15:56:58]  1: build/../build/common.sh:476 kube::build::run_build_command_ex(...)
    !!! [0908 15:56:58]  2: build/release.sh:36 kube::build::run_build_command(...)
    make: *** [Makefile:454: quick-release] Error 1

This error happened because the _output/bin/ directory didn't exist at
the moment the file _output/bin/prerelease-lifecycle-gen was touched, so
the path didn't exist.

The _output/bin symlink was not created by kube::golang::place_bins()
because kube::golang::setup_platforms() assumed
KUBE_CLIENT_PLATFORMS=linux/amd64 despite being on a ppc64le host.

Fix build error by not assuming host_arch=amd64 when on ppc64le in
kube::golang::setup_platforms().

Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 1, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @mopsfelder!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @mopsfelder. Thanks for your PR.

I'm waiting for a kubernetes 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/test-infra 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 1, 2021
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

looks like arm64 for fast build was added explicitly here:
f719624

unclear if it is desired to add more platforms.

/sig release

@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 1, 2021
@neolit123
Copy link
Member

looks like this is a missing feature and not a bug.
/kind feature
/remove-kind bug

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Oct 1, 2021
@BenTheElder
Copy link
Member

@dims
Copy link
Member

dims commented Oct 11, 2021

@BenTheElder @neolit123 - with https://github.com/kubernetes/release/pull/1853/files - ppc64le should work fine (kube-cross), so i think this ok.

/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 Oct 11, 2021
@dims
Copy link
Member

dims commented Oct 11, 2021

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 11, 2021
@dims
Copy link
Member

dims commented Oct 11, 2021

/approve
/assign @saschagrunert @mkumatag
(for lgtm)

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2021
Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold for others to review

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Oct 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, mkumatag, mopsfelder

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

The pull request process is described 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

@BenTheElder
Copy link
Member

@dims
Copy link
Member

dims commented Oct 11, 2021

https://github.com/kubernetes/kubernetes/pull/97743/files#r586161189 stands

yep, for the other platforms, the yard stick would be to ensure kube-cross works first

@dims
Copy link
Member

dims commented Oct 11, 2021

/retest

@BenTheElder
Copy link
Member

yep, for the other platforms, the yard stick would be to ensure kube-cross works first

I don't see why we should actively prohibit building on them without a patch though, as opposed to which we choose to ship in our official releases.

@dims
Copy link
Member

dims commented Oct 11, 2021

@BenTheElder oh if it works, sure. the use case here was ... doing a build on arm64 or ppc64le (and that would fail on other platforms). if someone can confirm that it works, then sure!

@mkumatag
Copy link
Member

The build did go through on ppc64le platform and here is the log. -Thanks

@BenTheElder
Copy link
Member

/priority important-longterm
/triage accepted

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 12, 2021
@BenTheElder
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit a7c67c0 into kubernetes:master Oct 12, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fast build fails on a ppc64le host
7 participants