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 5 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).

@iampat
Copy link

iampat commented May 20, 2025

@hharrisd @johanbrandhorst
Thanks for working on this PR. I am very excited to have in the BCR. Please let me know if I can help to have grpc-gateway in BCR sooner. Thanks.

@johanbrandhorst
Copy link
Collaborator

I don't know what the status of this PR is, I asked Beto a question in my last comment, maybe he missed it?

@iampat
Copy link

iampat commented May 21, 2025

If you and @hharrisd are ok, I can try answering your question on the PR.

@johanbrandhorst
Copy link
Collaborator

Sure, go for it.

@hharrisd
Copy link
Contributor Author

Hi @johanbrandhorst, @iampat.

This PR is pending the test of the customManagers configuration in renovate.json.
One minor change is to add Johan's suggested OS to the platform list.

@iampat, if you can help us with that, you are welcome to do so.

One last comment: a few weeks ago, the functionality to publish to the module using GitHub Actions was added to Publish to BCR. We can still utilize either the plugin approach or the GH Action method.

@johanbrandhorst
Copy link
Collaborator

I think I'd be more comfortable using a Github Action than the Github App, as it will be more familiar and integrated with our existing CI system. Could you (@hharrisd) rewrite this to use the Action? If you are unable to help at this point, @iampat please create a new PR with the necessary changes.

@johanbrandhorst
Copy link
Collaborator

What's left to do here? It looks like it doesn't have the github action added yet?

@hharrisd
Copy link
Contributor Author

What's left to do here? It looks like it doesn't have the github action added yet?

Hi @johanbrandhorst, I'm working on adapting the GitHub action. I expect to add this tomorrow.

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.

3 participants