Skip to content

Improve update_protobufs workflow - #971

Merged
ianmcorvidae merged 2 commits into
meshtastic:masterfrom
ianmcorvidae:improve-update-protobufs
Aug 11, 2026
Merged

Improve update_protobufs workflow#971
ianmcorvidae merged 2 commits into
meshtastic:masterfrom
ianmcorvidae:improve-update-protobufs

Conversation

@ianmcorvidae

@ianmcorvidae ianmcorvidae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

(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

  • New Features
    • Added manual version selection for protobuf updates.
    • Added support for automated protobuf release events.
    • Validates and applies the selected protobuf version during updates.
    • Includes the selected version in update commit messages.

…n in commit, and allow specifying a version, as well as allowing dispatch from other repositories.
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e4e45ee4-366a-433d-9179-7472ed289e9f

📥 Commits

Reviewing files that changed from the base of the PR and between e45e59a and 33840e2.

📒 Files selected for processing (1)
  • .github/workflows/update_protobufs.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/update_protobufs.yml

📝 Walkthrough

Walkthrough

The workflow supports manual and repository_dispatch protobuf releases. It resolves and validates a target tag, checks out that tag in the submodule, and includes the selected version in the commit message.

Changes

Protobuf update automation

Layer / File(s) Summary
Version resolution and workflow triggers
.github/workflows/update_protobufs.yml
The workflow accepts a manual version input and protobufs-release dispatch events. It resolves the version from input, payload, or the latest tag, then validates and publishes it.
Tagged update and commit recording
.github/workflows/update_protobufs.yml
Checkout no longer persists credentials. The submodule checks out the resolved protobuf tag. The commit message includes the selected version.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change to the update_protobufs workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.42%. Comparing base (ae71047) to head (33840e2).

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           
Flag Coverage Δ
unittests 67.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between ae71047 and e45e59a.

📒 Files selected for processing (1)
  • .github/workflows/update_protobufs.yml

Comment thread .github/workflows/update_protobufs.yml Outdated
Comment thread .github/workflows/update_protobufs.yml Outdated
Comment thread .github/workflows/update_protobufs.yml Outdated
@ianmcorvidae
ianmcorvidae merged commit 445e17d into meshtastic:master Aug 11, 2026
16 checks passed
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