Skip to content

feat(proto): publish protos on BSR#162

Draft
Vritra4 wants to merge 4 commits intomainfrom
feat/proto-actions
Draft

feat(proto): publish protos on BSR#162
Vritra4 wants to merge 4 commits intomainfrom
feat/proto-actions

Conversation

@Vritra4
Copy link
Contributor

@Vritra4 Vritra4 commented Sep 17, 2025

Description

to publish proto definitions on BSR.
fyi disabled many features like fmt, lint and check-breaking as it is initial commit for the action.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • Chores
    • Added a CI workflow "Protobuf" to run Buf operations and publish protobufs on pushes to main, version tags, releases, and PRs touching proto files; job runs on Ubuntu with a short timeout and repository write permissions.
    • Updated protobuf module metadata (normalized module name) and added external proto dependencies to the module configuration.

@Vritra4 Vritra4 requested a review from a team as a code owner September 17, 2025 05:20
@coderabbitai
Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

Adds a new GitHub Actions workflow to run Buf on protobuf sources and updates the Buf module metadata to lowercase name and additional external proto dependencies.

Changes

Cohort / File(s) Summary
CI/CD: Protobuf workflow
.github/workflows/proto.yml
Adds "Protobuf" workflow triggered on push to main, tags v*, release events, and PRs touching proto/**; runs buf-action@v1 on ubuntu-latest with a 5m timeout; checks out repo, uses BUF_TOKEN, disables format/lint/breaking checks, enables push to buf.build, grants contents: write.
Proto: buf module and deps
proto/buf.yaml
Renames module identifier from buf.build/initia-labs/OPinit to buf.build/initia-labs/opinit (lowercase) and adds dependencies buf.build/cosmos/gogo-proto and buf.build/googleapis/googleapis to deps alongside existing entries.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer (push/tag/release/PR)
  participant GH as GitHub Actions
  participant Runner as Runner (ubuntu-latest)
  participant BufAction as buf-action@v1
  participant Registry as buf.build

  Dev->>GH: Push/Tag(v*)/Release/PR touching proto/**
  GH->>Runner: Start buf-build job (timeout 5m)
  Runner->>Runner: actions/checkout@v5
  Runner->>BufAction: Run with inputs (proto, BUF_TOKEN, format/lint/breaking=false, push=true)
  BufAction->>Registry: Push proto module
  Registry-->>BufAction: Acknowledge
  BufAction-->>Runner: Complete
  Runner-->>GH: Job result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I hop through proto fields at dawn,
Lowercase name and deps are drawn.
A workflow pushes, soft and fleet,
Buf carries packets, tidy, neat.
Carrots of CI — a rabbit's treat. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the primary change of the pull request by indicating the addition of a feature to publish proto definitions on BSR via the new workflow. It directly relates to the GitHub Actions setup in proto.yml and the buf.yaml updates to support registry publishing. The conventional commit style prefix “feat(proto)” clearly signals a feature addition. Therefore, the title accurately and concisely summarizes the main intent of the changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/proto-actions

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 1cb4ab2 and 6101293.

📒 Files selected for processing (1)
  • proto/buf.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: spellcheck
  • GitHub Check: Analyze (go)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
.github/workflows/proto.yml (5)

2-4: Comment contradicts actual triggers and disabled checks

The header says this runs fmt/lint/breaking and “only when a .proto file has been changed”, but the workflow disables those checks and also triggers on tags and releases (which aren’t path-filtered). Update the comment or adjust triggers accordingly.


13-17: Release trigger likely does nothing with current config

With format/lint/breaking disabled and push intended for Git pushes only, the release event won’t meaningfully execute buf-action. Remove it or add specific steps for releases. (github.com)


24-26: Timeout may be too tight

Pushing/BSR ops can exceed 5 minutes on cold runners or larger modules. Consider 10–15 minutes.

-    timeout-minutes: 5
+    timeout-minutes: 10

28-35: buf-action inputs: good start; harden by disabling PR comments and preventing accidental BSR repo creation

  • token/input keys are correct for buf-action@v1.
  • Add pr_comment: false to avoid needing PR write perms.
  • Consider push_disable_create: true to avoid creating BSR repos implicitly. (github.com)

Apply this diff:

       - uses: bufbuild/buf-action@v1
         with:
           input: proto
           token: ${{ secrets.BUF_TOKEN }}
           format: false
           lint: false
           breaking: false
           push: true
+          pr_comment: false
+          push_disable_create: true

35-35: Add newline at EOF

YAMLlint flags the missing trailing newline.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 1c8ee7f and 1cb4ab2.

📒 Files selected for processing (1)
  • .github/workflows/proto.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/proto.yml

[error] 35-35: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: spellcheck
  • GitHub Check: Analyze (go)
🔇 Additional comments (2)
.github/workflows/proto.yml (2)

27-27: actions/checkout@v5 is valid

v5 exists and is the current major. Keep it. (github.com)


28-32: Secret setup check

Ensure repository/org secret BUF_TOKEN is present and scoped to this repo/environment; without it, pushes to BSR will fail.

@Vritra4 Vritra4 marked this pull request as draft September 26, 2025 05:13
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.

1 participant