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

gazelle -proto=default mysteriously removing go srcs and rules #907

Closed
ixdy opened this issue Oct 12, 2017 · 2 comments
Closed

gazelle -proto=default mysteriously removing go srcs and rules #907

ixdy opened this issue Oct 12, 2017 · 2 comments

Comments

@ixdy
Copy link
Contributor

ixdy commented Oct 12, 2017

In kubernetes/test-infra, I updated our rules_go and gazelle dependencies to 0cd983e, and then updated all of our BUILD files, first with -proto=legacy, then without (separating this into two commits).

When I ran gazelle -mode=fix without -proto=legacy, it did weird things to testgrid/config/BUILD (see commit), removing all of the go sources and go_binary rule, but leaving an invalid go_test rule.

I have no idea why it did this, and whether it's something weird we're doing or a bug in gazelle.

@jayconrod
Copy link
Contributor

This is confusing behavior, but it's actually working as intended.

When Gazelle finds source files in a directory that declare different packages, it normally prints an error and skips processing that directory. As a special case, if one of the packages matches the base name of the directory, that Gazelle will generate rules for that package and ignore source files belonging to other packages. This is common with libraries that also have helper tools in package main. Generally, people want the library and not the tool, so we avoid emitting an error and ignore the tool.

With the new support for proto rules, .proto files are treated as sources that are part of a package. If the proto has option go_package or package statements, the package name is derived from those. If not, the package name is derived from the filename. This is intended to match what protoc does.

This directory, test-infra/config, contains .go files in package main. It also has config.proto, which doesn't specify its package. So Gazelle determines that config.proto belongs to package config. Since that matches the directory name, it will ignore files belonging to the main package. It will generate proto_library, go_proto_library, and go_library rules for config and will delete empty rules (go_binary). It would delete the go_test as well, but that contains a manually written data attribute, so it doesn't completely remove it.


I'm not sure how the proto is used in this directory. It wasn't mentioned in the BUILD file before, so if you don't need it, perhaps it's best to add # gazelle:exclude config.proto before running gazelle fix. # gazelle:proto disable would also do the trick. If you want to generate code from it, you could add something like option go_package = "k8s.io/test-infra/testgrid/config;main"; to force it to be in the main package.


I'm not sure there's an immediate fix for this. This is the confusing result of several behaviors overlapping in an unsual way. Eventually, Gazelle will support multiple packages in each directory, and then we won't have to choose between them like this.

k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder
sttts pushed a commit to sttts/apimachinery that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/api that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/client-go that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/apiserver that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/kube-aggregator that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/sample-apiserver that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/metrics that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
sttts pushed a commit to sttts/code-generator that referenced this issue Oct 16, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
@jayconrod
Copy link
Contributor

Closing old Gazelle issues. Support for multiple packages is bazelbuild/bazel-gazelle#7. Please open a new issue at bazelbuild/bazel-gazelle if something isn't covered though.

dims pushed a commit to dims/openstack-cloud-controller-manager that referenced this issue Jan 13, 2018
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder
dims pushed a commit to dims/utils that referenced this issue Oct 19, 2018
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder
tamalsaha pushed a commit to kmodules/shared-informer that referenced this issue Aug 13, 2020
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
erikwilson pushed a commit to erikwilson/rancher-k3s that referenced this issue Aug 24, 2020
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e4
tamalsaha pushed a commit to gomodules/jsonpath that referenced this issue Apr 21, 2021
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
tamalsaha pushed a commit to gomodules/jsonpath that referenced this issue Apr 21, 2021
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
tamalsaha pushed a commit to gomodules/encoding that referenced this issue Aug 10, 2021
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
akhilerm pushed a commit to akhilerm/apimachinery that referenced this issue Sep 20, 2022
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (bazelbuild/rules_go#888, bazelbuild/rules_go#900, bazelbuild/rules_go#907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder

Kubernetes-commit: 77b83e446b4e655a71c315ad3f3890dc2a220ccf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants