Isolation of setup-protoc jobs from RUST-CI#2772
Isolation of setup-protoc jobs from RUST-CI#2772drewrelmas merged 5 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2772 +/- ##
==========================================
- Coverage 86.09% 86.09% -0.01%
==========================================
Files 694 694
Lines 263421 263421
==========================================
- Hits 226789 226786 -3
- Misses 36108 36111 +3
Partials 524 524
🚀 New features to boost your workflow:
|
| #[derive(Clone, PartialEq, ::prost::Message)] | ||
| pub struct ExportLogsServiceRequest { | ||
| #[prost(message, repeated, tag="1")] | ||
| #[prost(message, repeated, tag = "1")] |
There was a problem hiding this comment.
Can I assume that these changes to the .rs files are actually formatting changes missing in the main branch?
I assume it has been a while since someone ran and committed compile-proto and some tooling has updated resulting in these changes?
There was a problem hiding this comment.
Yes, all changes related to src/proto/ are formatting ones; they all tackle specifically changing x=y to x = y, none of the content has been altered
There was a problem hiding this comment.
Interestingly I tried the compile-proto on my machine from main branch and it didn't produce any diff. Perhaps the CI machine uses a different version/tool than I have... Did you get this diff when running locally?
There was a problem hiding this comment.
Locally compile-proto did produce a diff for me (the exact ones in this commit) because my /proto dir got updated accordingly. In theory it should give the diff right now because main has the old x=y format; perhaps it could be good to add an extra cargo fmt within compile-proto?
There was a problem hiding this comment.
I'd be careful about adding cargo fmt here. compile-proto already turns off formatting on purpose - xtask/src/genproto.rs sets cfg.format(false) . The intent seems to be that the committed .rs files should match the raw generator output exactly.
There was a problem hiding this comment.
One small suggestion: it might be worth pinning the protoc version in arduino/setup-protoc so CI uses a stable compiler and a future upstream default change can't cause unrelated failures here.
Side note - since Cargo.lock isn't checked in (which is fine), prost-build and tonic-prost-build can also pick different versions on different machines. That's probably why compile-proto gives a diff for some people but not others. Pinning protoc won't fully fix that, but it's one less thing that can drift.
There was a problem hiding this comment.
Sounds reasonable! Is there an specific protoc version that would be preferred for CI? https://github.com/protocolbuffers/protobuf/releases
There was a problem hiding this comment.
I'd suggest using 34.1, that's the current stable protobuf release - https://github.com/protocolbuffers/protobuf/releases/tag/v34.1
There was a problem hiding this comment.
Awesome, should be good to go now. Also pinned the version in rust-validation-tests.yml and rust-bench.yml to keep it consistent 👍
Co-authored-by: Drew Relmas <drewrelmas@gmail.com>
6ead2ef to
4147797
Compare
drewrelmas
left a comment
There was a problem hiding this comment.
LGTM, provided protoc action is removed in additional places it is not needed
| @@ -49,6 +50,7 @@ jobs: | |||
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |||
| with: | |||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |||
| version: "34.1" | |||
There was a problem hiding this comment.
I don't think we need protoc in the rust-bench workflow for same reason, can you please remove?
| - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| version: "34.1" |
There was a problem hiding this comment.
Same here, potentially don't need it
There was a problem hiding this comment.
Great points; just committed a new version removing protoc from both files 👍
4147797 to
f2b8ca6
Compare
Change Summary
As mentioned in issue 2768,
setup-protocjobs are dropped in favour of a targetedcompile_protojob.What issue does this PR close?
This issue closes issue 2768