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

bazel: bump Bazel repositories versions #3413

Merged
merged 3 commits into from
Jul 24, 2023
Merged

Conversation

adambabik
Copy link
Collaborator

References to other Issues or PRs

Hopefully fixes #3407

Brief description of what is fixed or changed

I had a problem to generate Bazel build files from main and noticed #3407. I bumped both rules_go and gazelle which resulted in getting rid of @go_googleapis references as expected.

One more problem I had after bumping rules_proto, which was also outdated, was that Bazel used older C++ standard by default. I enforced the C++14 with BAZEL_CXXOPTS="-std=c++14" bazel run :buildifier, however, there might be a better way to achieve this.

@adambabik adambabik marked this pull request as draft July 21, 2023 19:57
@adambabik
Copy link
Collaborator Author

I moved it to drafts as there are more problems to fix.

@adambabik adambabik marked this pull request as ready for review July 23, 2023 06:51
@@ -19,6 +19,18 @@ buildifier(
# gazelle:go_proto_compilers //:go_apiv2
# gazelle:go_grpc_compilers //:go_apiv2, //:go_grpc
# gazelle:go_naming_convention import_alias
# gazelle:resolve proto proto google/api/annotations.proto @googleapis//google/api:annotations_proto
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure if this is the best place for these directives.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I will defer to @achew22 on this

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is the correct place for them

@@ -19,7 +19,7 @@ docker run -itv $(pwd):/grpc-gateway -w /grpc-gateway --entrypoint /bin/bash --r
ghcr.io/grpc-ecosystem/grpc-gateway/build-env:1.19 -c '\
bazel run :gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories && \
bazel run :gazelle && \
bazel run :buildifier'
BAZEL_CXXOPTS="-std=c++14" bazel run :buildifier'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Alternatively, we could put .bazelrc in the project root. I found that in ci.yml we are setting exactly the same env.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have various environment specific options like the CPU and memory limiters that shouldn't go in .bazelrc, but this option does seem like a reasonable thing to put in a repo wide .bazelrc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would probably drop it in the .bazelrc,

build --cxxopt='-std=c++14'

but I have a pathological aversion to environment variables.

Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

🙏🏻 thank you for this. I will give Andrew a chance to look at this before merging, but it LGTM.

@@ -19,6 +19,18 @@ buildifier(
# gazelle:go_proto_compilers //:go_apiv2
# gazelle:go_grpc_compilers //:go_apiv2, //:go_grpc
# gazelle:go_naming_convention import_alias
# gazelle:resolve proto proto google/api/annotations.proto @googleapis//google/api:annotations_proto
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is the correct place for them

@@ -19,7 +19,7 @@ docker run -itv $(pwd):/grpc-gateway -w /grpc-gateway --entrypoint /bin/bash --r
ghcr.io/grpc-ecosystem/grpc-gateway/build-env:1.19 -c '\
bazel run :gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories && \
bazel run :gazelle && \
bazel run :buildifier'
BAZEL_CXXOPTS="-std=c++14" bazel run :buildifier'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would probably drop it in the .bazelrc,

build --cxxopt='-std=c++14'

but I have a pathological aversion to environment variables.

load("@googleapis//:repository_rules.bzl", "switched_rules_by_language")

switched_rules_by_language(
name = "com_google_googleapis_imports",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@adambabik adambabik Jul 24, 2023

Choose a reason for hiding this comment

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

It seems we don't need this, because we use @googleapis only in proto_library. Go deps are resolved to @org_golang_google_genproto_googleapis_api.

I suppose that I could change:

# gazelle:resolve proto go google/api/annotations.proto  @org_golang_google_genproto_googleapis_api//annotations

to

# gazelle:resolve proto go google/api/annotations.proto  @googleapis//google/api:annotations_go_proto

then go = True would be necessary. But I am not sure if it gives us any benefits. @org_golang_google_genproto_googleapis_api was recommended in go_rules and gazelle.

@adambabik adambabik merged commit 78aa6e4 into main Jul 24, 2023
18 checks passed
@adambabik adambabik deleted the fix-bazel-go_googleapis branch July 24, 2023 20:24
michaelkedar referenced this pull request in google/osv.dev Sep 11, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/grpc-ecosystem/grpc-gateway/v2](https://togithub.com/grpc-ecosystem/grpc-gateway)
| require | minor | `v2.16.0` -> `v2.18.0` |
|
[google.golang.org/protobuf](https://togithub.com/protocolbuffers/protobuf-go)
| require | minor | `v1.30.0` -> `v1.31.0` |
|  |  | lockFileMaintenance | All locks refreshed |
| [jekyll-feed](https://togithub.com/jekyll/jekyll-feed) | | minor |
`0.15.1` -> `0.17.0` |

---

### Release Notes

<details>
<summary>grpc-ecosystem/grpc-gateway
(github.com/grpc-ecosystem/grpc-gateway/v2)</summary>

###
[`v2.18.0`](https://togithub.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.18.0)

[Compare
Source](https://togithub.com/grpc-ecosystem/grpc-gateway/compare/v2.17.1...v2.18.0)

#### What's Changed

- Enable a few more golangci-lint linters by
[@&#8203;pkwarren](https://togithub.com/pkwarren) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3546](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3546)
- Add .golangci.yml config by
[@&#8203;pkwarren](https://togithub.com/pkwarren) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3548](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3548)
- Fix: path item objects become block scalars
\[[#&#8203;3557](https://togithub.com/grpc-ecosystem/grpc-gateway/issues/3557)]
by [@&#8203;qawatake](https://togithub.com/qawatake) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3566](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3566)
- Add remove_internal_comments option by
[@&#8203;same-id](https://togithub.com/same-id) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3560](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3560)

#### New Contributors

- [@&#8203;benjx1990](https://togithub.com/benjx1990) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3552](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3552)
- [@&#8203;qawatake](https://togithub.com/qawatake) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3566](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3566)

**Full Changelog**:
grpc-ecosystem/grpc-gateway@v2.17.1...v2.18.0

###
[`v2.17.1`](https://togithub.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.17.1)

[Compare
Source](https://togithub.com/grpc-ecosystem/grpc-gateway/compare/v2.17.0...v2.17.1)

#### What's Changed

- genopenapi: set source code info explicitly by
[@&#8203;johanbrandhorst](https://togithub.com/johanbrandhorst) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3544](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3544)
- Record the filename of files that are missing SourceCodeInfo by
[@&#8203;ebilling](https://togithub.com/ebilling) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3545](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3545)

#### New Contributors

- [@&#8203;ebilling](https://togithub.com/ebilling) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3545](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3545)

**Full Changelog**:
grpc-ecosystem/grpc-gateway@v2.17.0...v2.17.1

###
[`v2.17.0`](https://togithub.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.17.0)

[Compare
Source](https://togithub.com/grpc-ecosystem/grpc-gateway/compare/v2.16.2...v2.17.0)

#### What's Changed

- Fix renovate.yml overwriting .bazelrc by
[@&#8203;adambabik](https://togithub.com/adambabik) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3451](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3451)
- fix: successful typo by
[@&#8203;testwill](https://togithub.com/testwill) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3510](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3510)
- Update example buf.gen.yaml by
[@&#8203;pkwarren](https://togithub.com/pkwarren) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3522](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3522)
- fix(deps): replace all uses of golang/protobuf/protobuf by
[@&#8203;aimuz](https://togithub.com/aimuz) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3516](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3516)
- Feature/issue 3051 swagger preserve rpc order by
[@&#8203;CemGurhan](https://togithub.com/CemGurhan) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3500](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3500)

#### New Contributors

- [@&#8203;testwill](https://togithub.com/testwill) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3510](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3510)
- [@&#8203;pkwarren](https://togithub.com/pkwarren) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3522](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3522)
- [@&#8203;aimuz](https://togithub.com/aimuz) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3516](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3516)
- [@&#8203;CemGurhan](https://togithub.com/CemGurhan) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3500](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3500)

**Full Changelog**:
grpc-ecosystem/grpc-gateway@v2.16.2...v2.17.0

###
[`v2.16.2`](https://togithub.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.16.2)

[Compare
Source](https://togithub.com/grpc-ecosystem/grpc-gateway/compare/v2.16.1...v2.16.2)

#### What's Changed

- chore: replace the Goreleaser's deprecated option `--rm-dist` to
`--clean` by
[@&#8203;suzuki-shunsuke](https://togithub.com/suzuki-shunsuke) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3438](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3438)
- chore: stop using the deprecated field `archives.replacements` by
[@&#8203;suzuki-shunsuke](https://togithub.com/suzuki-shunsuke) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3436](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3436)

#### New Contributors

- [@&#8203;suzuki-shunsuke](https://togithub.com/suzuki-shunsuke) made
their first contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3438](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3438)

**Full Changelog**:
grpc-ecosystem/grpc-gateway@v2.16.1...v2.16.2

###
[`v2.16.1`](https://togithub.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.16.1)

[Compare
Source](https://togithub.com/grpc-ecosystem/grpc-gateway/compare/v2.16.0...v2.16.1)

#### What's Changed

- Rename LICENSE.txt to LICENSE by
[@&#8203;pgmitche](https://togithub.com/pgmitche) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3345](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3345)
- feat: message supports enum field option for query params by
[@&#8203;zhb127](https://togithub.com/zhb127) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3352](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3352)
- remove glog from a bunch of spots by
[@&#8203;kn100](https://togithub.com/kn100) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3361](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3361)
- Improve AIP support in field_configuration.path_param_name containing
by [@&#8203;same-id](https://togithub.com/same-id) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3364](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3364)
- Hide comments on omitted enum default values by
[@&#8203;same-id](https://togithub.com/same-id) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3366](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3366)
- fix(docs): correcting mux routing error code example by
[@&#8203;tjasko](https://togithub.com/tjasko) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3409](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3409)
- Fix the place where format property in placed for repeated fields by
[@&#8203;far4599](https://togithub.com/far4599) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3410](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3410)
- Handle httpbody not having data to return by
[@&#8203;achew22](https://togithub.com/achew22) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3415](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3415)
- bazel: bump Bazel repositories versions by
[@&#8203;adambabik](https://togithub.com/adambabik) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3413](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3413)

#### New Contributors

- [@&#8203;pgmitche](https://togithub.com/pgmitche) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3345](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3345)
- [@&#8203;zhb127](https://togithub.com/zhb127) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3352](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3352)
- [@&#8203;kn100](https://togithub.com/kn100) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3361](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3361)
- [@&#8203;tjasko](https://togithub.com/tjasko) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3409](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3409)
- [@&#8203;far4599](https://togithub.com/far4599) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/3410](https://togithub.com/grpc-ecosystem/grpc-gateway/pull/3410)

**Full Changelog**:
grpc-ecosystem/grpc-gateway@v2.16.0...v2.16.1

</details>

<details>
<summary>protocolbuffers/protobuf-go
(google.golang.org/protobuf)</summary>

###
[`v1.31.0`](https://togithub.com/protocolbuffers/protobuf-go/releases/tag/v1.31.0)

[Compare
Source](https://togithub.com/protocolbuffers/protobuf-go/compare/v1.30.0...v1.31.0)

#### Notable changes <a name="v1.31-notable-changes"></a>

**New Features**

-   [CL/489316](https://go.dev/cl/489316): types/dynamicpb: add NewTypes
- Add a function to construct a dynamic type registry from a
protoregistry.Files
- [CL/489615](https://go.dev/cl/489615): encoding: add MarshalAppend to
protojson and prototext

**Minor performance improvements**

- [CL/491596](https://go.dev/cl/491596): encoding/protodelim: If
UnmarshalFrom gets a bufio.Reader, try to reuse its buffer instead of
creating a new one
- [CL/500695](https://go.dev/cl/500695): proto: store the size of tag to
avoid multiple calculations

**Bug fixes**

- [CL/497935](https://go.dev/cl/497935): internal/order: fix sorting of
synthetic oneofs to be deterministic
- [CL/505555](https://go.dev/cl/505555): encoding/protodelim: fix
handling of io.EOF

</details>

<details>
<summary>jekyll/jekyll-feed (jekyll-feed)</summary>

###
[`v0.17.0`](https://togithub.com/jekyll/jekyll-feed/blob/HEAD/History.markdown#0170--2022-10-14)

[Compare
Source](https://togithub.com/jekyll/jekyll-feed/compare/v0.16.0...v0.17.0)

##### Documentation

- Update CI status badge
([#&#8203;363](https://togithub.com/jekyll/jekyll-feed/issues/363))

##### Development Fixes

- Add Ruby 3.1 to the CI matrix
([#&#8203;365](https://togithub.com/jekyll/jekyll-feed/issues/365))

##### Minor Enhancements

- Allow disabling of jekyll-feed while in development
([#&#8203;370](https://togithub.com/jekyll/jekyll-feed/issues/370))

###
[`v0.16.0`](https://togithub.com/jekyll/jekyll-feed/blob/HEAD/History.markdown#0160--2022-01-03)

[Compare
Source](https://togithub.com/jekyll/jekyll-feed/compare/v0.15.1...v0.16.0)

##### Minor Enhancements

- Add support for `page.description` in front matter to become entry
`<summary>`
([#&#8203;297](https://togithub.com/jekyll/jekyll-feed/issues/297))

##### Bug Fixes

- Fold private methods into the `:render` method as local variables
([#&#8203;327](https://togithub.com/jekyll/jekyll-feed/issues/327))
- Check `post.categories` instead of `post.category`
([#&#8203;357](https://togithub.com/jekyll/jekyll-feed/issues/357))
- Switched xml_escape for `<![CDATA[]]>` for post content
([#&#8203;332](https://togithub.com/jekyll/jekyll-feed/issues/332))

##### Development Fixes

- Add Ruby 3.0 to CI
([#&#8203;337](https://togithub.com/jekyll/jekyll-feed/issues/337))
- Lock RuboCop to v1.18.x
([#&#8203;348](https://togithub.com/jekyll/jekyll-feed/issues/348))
- Add workflow to release gem via GH Action
([#&#8203;355](https://togithub.com/jekyll/jekyll-feed/issues/355))

##### Documentation

- Use `.atom` extension in documented examples since we write an Atom
feed ([#&#8203;359](https://togithub.com/jekyll/jekyll-feed/issues/359))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on wednesday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/google/osv.dev).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi42OC4xIiwidXBkYXRlZEluVmVyIjoiMzYuODMuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rules_go 0.41.0 upgrade breaking on missing go_googleapis
3 participants