Improve update_protobufs workflow - #971
Conversation
…n in commit, and allow specifying a version, as well as allowing dispatch from other repositories.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe workflow supports manual and ChangesProtobuf update automation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Trigger
participant Workflow
participant ProtobufTags
participant ProtobufSubmodule
participant Repository
Trigger->>Workflow: Provide version input or dispatch payload
Workflow->>ProtobufTags: Resolve latest tag when needed
ProtobufTags-->>Workflow: Return protobuf tag
Workflow->>Workflow: Validate selected tag
Workflow->>ProtobufSubmodule: Check out selected tag
Workflow->>Repository: Commit update with protobuf version
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #971 +/- ##
=======================================
Coverage 67.42% 67.42%
=======================================
Files 25 25
Lines 4762 4762
=======================================
Hits 3211 3211
Misses 1551 1551
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/update_protobufs.yml:
- Around line 52-55: Update the tag validation and resolution flow in the
protobuf update workflow: use git show-ref --verify --quiet with
refs/tags/${target} to require an exact tag name, then resolve
refs/tags/${target}^{commit} for checkout. When target is unset, select the
latest release explicitly rather than relying on git describe from the
checked-out submodule commit.
- Around line 49-50: Update the no-version fallback in the workflow’s
tag-resolution logic to search all fetched tags, select the newest tag matching
the protobuf release pattern, and fail explicitly when no matching tag exists;
do not use git describe’s reachability-based selection.
- Around line 44-47: Update the workflow’s version handling to pass
github.event.inputs.version and github.event.client_payload.version through the
step environment, then read them via quoted shell variables before validation so
command substitutions cannot execute. Also pass the step output through env at
the steps around lines 65 and 90, and replace direct output interpolation with
printf when writing GITHUB_OUTPUT.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: effd5e01-2894-4c4f-91ef-e0ccf5aebef7
📒 Files selected for processing (1)
.github/workflows/update_protobufs.yml
(to use release versions, put versio…n in commit, and allow specifying a version, as well as allowing dispatch from other repositories)
Summary by CodeRabbit