Skip to content

Add metadata and configuration templates for publishing to BCR #5455

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hharrisd
Copy link
Contributor

@hharrisd hharrisd commented Apr 9, 2025

References to other Issues or PRs

This PR is part of the work to publish grpc-gateway in BCR, described in this issue.

Have you read the Contributing Guidelines?

Yes

Brief description of what is fixed or changed

This PR seeks to add the required files for the publish-to-bcr plugin, which will publish the gRPC Gateway project as a module in the Bazel Central Registry.

The plugin aims to eliminate a manual publishing process for the module and initiate the process when a release is created.

The configuration consists of three files placed in the .bcr directory:

  • .bcr/metadata.template.json: that describes the repository and maintainers' information.
  • .bcr/presubmit.yml: describes the targets that will be built and tested on specific platforms and bazel versions to test the module.
  • .bcr/source.template.json: that will automatically substitute values for the repository, owner, and tag based on the repository and release data.

The final result of this process is the creation of a PR in the BCR repository to publish the released version.

Other comments

Once this configuration is added to the repo, the publish-to-bcr should be configured as described here.


CC: @AlejoAsd for awareness.

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.

Cool! Do we have a fork of the registry set up already or do you need me to fork it in the grpc-ecosystem org?

module_path: "MODULE.bazel"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x, 8.x]
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do we keep this list updated? We use dependabot and renovate to update our Bazel version generally (see #5277).

bcr_test_module:
module_path: "MODULE.bazel"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do we keep this list updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For platforms, what is the source of truth for the supported platform list?

I was searching, and I found a list of the supported platforms on the Bazel Continuous Integration documentation.

I would like to know if you have a specific list of platforms on which you are interested in testing the gRPC-Gateway module.

Would you happen to have any recommendations on this matter?

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 sounds like a reasonable setting (though, maybe lets use ubuntu2404 and debian11)? Also lets throw in macos_arm64?

@@ -9,6 +9,18 @@
"postUpdateOptions": [
"gomodTidy"
],
"customManagers": [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@johanbrandhorst, I added this configuration following what I saw in the documentation to keep the Bazel version up to date in the presubmit.yml file.

I don't have experience with renovate.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm, I haven't ever used this either, so I have no idea if this will work. Is there any way we can test it?

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.

2 participants