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

Remove Bazel #99561

Merged
merged 7 commits into from Mar 1, 2021
Merged

Remove Bazel #99561

merged 7 commits into from Mar 1, 2021

Conversation

BenTheElder
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Removes the bazel build system, reducing Kubernetes to maintaining one build system for this repo per: kubernetes/enhancements#2420

Which issue(s) this PR fixes:

Fixes #88553

Special notes for your reviewer:

The third commit "hack/update-bazel.sh" is fully automated, and is an enourmous diff. I recommend reviewing this PR commit by commit, skipping that one. The first commit implements the automation to produce this commit.

Explicitly holding this PR, we need to send out a widespread announcement including additional notice of this change and instructions for how contributors should handle this. We need to wait before merging this (will send that tomorrow) given the scope of the change.

This PR also will not merge due to pull-kubernetes-bazel-build and pull-kubernetes-bazel-test which still running on all PRs as Required for now, which will fail.

/hold

All other known technical blockers for this change are resolved. See kubernetes/enhancements#2420 for more details.

Does this PR introduce a user-facing change?

Technically this is not user facing, as our releases have always shipped with make, and is not under our deprecation policies as an API change would be. However those building from source should be aware of this change.

Interested downstream users can still build with bazel themselves if they wish, but we will not be carrying the patch load for this upstream going forward, instead focusing on the single system we use to ship releases.

Remove support for building Kubernetes with bazel.

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

- [KEP]: https://github.com/kubernetes/enhancements/issues/2420

/sig testing
/sig release
(this is going to tag all the SIGs anyhow, since it touches nearly all directories, we should probably remove those?)

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/release Categorizes an issue or PR as relevant to SIG Release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 28, 2021
@BenTheElder
Copy link
Member Author

/cc @dims @liggitt @spiffxp

@BenTheElder
Copy link
Member Author

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 28, 2021
@k8s-ci-robot k8s-ci-robot added area/apiserver area/cloudprovider area/code-generation area/conformance Issues or PRs related to kubernetes conformance tests area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/ipvs area/kubeadm area/kubectl area/kubelet area/provider/gcp Issues or PRs related to gcp provider area/release-eng Issues or PRs related to the Release Engineering subproject labels Feb 28, 2021
@smarterclayton
Copy link
Contributor

/approve as well, thanks for dilligence in closing this out

@serathius
Copy link
Contributor

serathius commented Mar 5, 2021

Hey @BenTheElder, Thanks for your hard work on this. I have one question, SIG Instrumentation depended on bazel for forbidding imports of particular libraries (visible_to), thus ensuring that contributors will use Kubernetes alternatives (context #89267). What is the current replacement for this bazel feature?

@BenTheElder
Copy link
Member Author

BenTheElder commented Mar 5, 2021

Good question, there's not a direct analog, but we have some related alternatives available:

For this particular case of "restrict imports of a vendored library" internal does not apply but import boss should work. I can help sort this out.

EDIT: import boss is pretty close to a direct equivilant, for the purposes of go package imports specifically.

@BenTheElder
Copy link
Member Author

... And apologies for the lapse in coverage in the meantime. Clearly an oversight on my part. I'll look at equivilant rules shortly. Import-Boss is what we typically use to restrict package visibility within the project, but typically for packages within our own sources. It may need some adapation to cover vendor / external packages.

@BenTheElder
Copy link
Member Author

#99876 to track visibility rules -> make verify

@stan1334
Copy link

stan1334 commented Mar 6, 2021

#99876 to track visibility rules -> make verify
I want to know whether the follow-up community build completely cancels bazel, only uses make, and make is a stable build tool for subsequent versions.

@BenTheElder
Copy link
Member Author

BenTheElder commented Mar 6, 2021

Hi all: please direct general discussion to the KEP if possible for better visibility. This PR is only one peice of implementing it. kubernetes/enhancements#2420 (comment)

The KEP answers your questions I think.

kubernetes/enhancements#2420

https://github.com/kubernetes/enhancements/tree/master/keps/sig-testing/2420-reducing-kubernetes-build-maintenance/

Bazel is not in use in this repo from 1.21 / this PR forward. Bazel was not used for releases, only CI and optionally for development. This is discussed in more detail in the KEP.

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. area/apiserver area/cloudprovider area/code-generation area/conformance Issues or PRs related to kubernetes conformance tests area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/ipvs area/kubeadm area/kubectl area/kubelet area/provider/gcp Issues or PRs related to gcp provider area/release-eng Issues or PRs related to the Release Engineering subproject area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

Successfully merging this pull request may close these issues.

Please remove bazel based build infrastructure