Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 25 additions & 45 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -107,9 +104,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -210,9 +204,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: nightly
Expand Down Expand Up @@ -294,9 +285,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand All @@ -322,9 +310,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -366,9 +351,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand All @@ -387,9 +369,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand All @@ -400,12 +379,11 @@ jobs:
run: ./scripts/check-direct-telemetry-macros.sh
working-directory: ./rust/${{ matrix.folder }}

# Verify the workspace builds with --no-default-features to catch broken
# optional feature gates (e.g., dev-tools, crypto-*).
no_default_features_check:
compile_proto:
strategy:
fail-fast: false
matrix:
# Only otap-dataflow has a structure check
Comment thread
luckymachi marked this conversation as resolved.
Outdated
folder: [otap-dataflow]
runs-on: ubuntu-latest
steps:
Expand All @@ -418,6 +396,28 @@ jobs:
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
- name: cargo xtask compile proto
run: cargo xtask compile-proto
working-directory: ./rust/${{ matrix.folder }}
- name: check git diff after compile-proto execution
run: git diff --exit-code rust/otap-dataflow/crates/pdata/src/proto


# Verify the workspace builds with --no-default-features to catch broken
# optional feature gates (e.g., dev-tools, crypto-*).
no_default_features_check:
strategy:
fail-fast: false
matrix:
folder: [otap-dataflow]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
- name: cargo check --no-default-features --workspace
run: cargo check --no-default-features --workspace
working-directory: ./rust/${{ matrix.folder }}
Expand All @@ -444,9 +444,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -558,9 +555,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -603,9 +597,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: nightly
Expand All @@ -626,9 +617,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -658,9 +646,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -696,9 +681,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand All @@ -712,9 +694,6 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
Expand Down Expand Up @@ -772,6 +751,7 @@ jobs:
- deny_required
- docs_required
- structure_check
- compile_proto
- pest-fmt
- no_default_features_check
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportLogsServiceRequest {
#[prost(message, repeated, tag="1")]
#[prost(message, repeated, tag = "1")]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

@luckymachi luckymachi Apr 28, 2026

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

@luckymachi luckymachi Apr 28, 2026

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member

@lalitb lalitb Apr 29, 2026

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable! Is there an specific protoc version that would be preferred for CI? https://github.com/protocolbuffers/protobuf/releases

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd suggest using 34.1, that's the current stable protobuf release - https://github.com/protocolbuffers/protobuf/releases/tag/v34.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Awesome, should be good to go now. Also pinned the version in rust-validation-tests.yml and rust-bench.yml to keep it consistent 👍

pub resource_logs: ::prost::alloc::vec::Vec<super::super::super::logs::v1::ResourceLogs>,
}
#[crate::otlp::qualified("opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportLogsServiceResponse {
#[prost(message, optional, tag="1")]
#[prost(message, optional, tag = "1")]
pub partial_success: ::core::option::Option<ExportLogsPartialSuccess>,
}
#[crate::otlp::qualified("opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportLogsPartialSuccess {
#[prost(int64, tag="1")]
#[prost(int64, tag = "1")]
pub rejected_log_records: i64,
#[prost(string, tag="2")]
#[prost(string, tag = "2")]
pub error_message: ::prost::alloc::string::String,
}
/// Generated client implementations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportMetricsServiceRequest {
#[prost(message, repeated, tag="1")]
#[prost(message, repeated, tag = "1")]
pub resource_metrics: ::prost::alloc::vec::Vec<super::super::super::metrics::v1::ResourceMetrics>,
}
#[crate::otlp::qualified("opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportMetricsServiceResponse {
#[prost(message, optional, tag="1")]
#[prost(message, optional, tag = "1")]
pub partial_success: ::core::option::Option<ExportMetricsPartialSuccess>,
}
#[crate::otlp::qualified("opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportMetricsPartialSuccess {
#[prost(int64, tag="1")]
#[prost(int64, tag = "1")]
pub rejected_data_points: i64,
#[prost(string, tag="2")]
#[prost(string, tag = "2")]
pub error_message: ::prost::alloc::string::String,
}
/// Generated client implementations.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportProfilesServiceRequest {
#[prost(message, repeated, tag="1")]
#[prost(message, repeated, tag = "1")]
pub resource_profiles: ::prost::alloc::vec::Vec<super::super::super::profiles::v1development::ResourceProfiles>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportProfilesServiceResponse {
#[prost(message, optional, tag="1")]
#[prost(message, optional, tag = "1")]
pub partial_success: ::core::option::Option<ExportProfilesPartialSuccess>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportProfilesPartialSuccess {
#[prost(int64, tag="1")]
#[prost(int64, tag = "1")]
pub rejected_profiles: i64,
#[prost(string, tag="2")]
#[prost(string, tag = "2")]
pub error_message: ::prost::alloc::string::String,
}
/// Generated client implementations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportTraceServiceRequest {
#[prost(message, repeated, tag="1")]
#[prost(message, repeated, tag = "1")]
pub resource_spans: ::prost::alloc::vec::Vec<super::super::super::trace::v1::ResourceSpans>,
}
#[crate::otlp::qualified("opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportTraceServiceResponse {
#[prost(message, optional, tag="1")]
#[prost(message, optional, tag = "1")]
pub partial_success: ::core::option::Option<ExportTracePartialSuccess>,
}
#[crate::otlp::qualified("opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportTracePartialSuccess {
#[prost(int64, tag="1")]
#[prost(int64, tag = "1")]
pub rejected_spans: i64,
#[prost(string, tag="2")]
#[prost(string, tag = "2")]
pub error_message: ::prost::alloc::string::String,
}
/// Generated client implementations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,75 +3,75 @@
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnyValue {
#[prost(oneof="any_value::Value", tags="1, 2, 3, 4, 5, 6, 7")]
#[prost(oneof = "any_value::Value", tags = "1, 2, 3, 4, 5, 6, 7")]
pub value: ::core::option::Option<any_value::Value>,
}
/// Nested message and enum types in `AnyValue`.
pub mod any_value {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(string, tag="1")]
#[prost(string, tag = "1")]
StringValue(::prost::alloc::string::String),
#[prost(bool, tag="2")]
#[prost(bool, tag = "2")]
BoolValue(bool),
#[prost(int64, tag="3")]
#[prost(int64, tag = "3")]
IntValue(i64),
#[prost(double, tag="4")]
#[prost(double, tag = "4")]
DoubleValue(f64),
#[prost(message, tag="5")]
#[prost(message, tag = "5")]
ArrayValue(super::ArrayValue),
#[prost(message, tag="6")]
#[prost(message, tag = "6")]
KvlistValue(super::KeyValueList),
#[prost(bytes, tag="7")]
#[prost(bytes, tag = "7")]
BytesValue(::prost::alloc::vec::Vec<u8>),
}
}
#[crate::otlp::qualified("opentelemetry.proto.common.v1.ArrayValue")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArrayValue {
#[prost(message, repeated, tag="1")]
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<AnyValue>,
}
#[crate::otlp::qualified("opentelemetry.proto.common.v1.KeyValueList")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyValueList {
#[prost(message, repeated, tag="1")]
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<KeyValue>,
}
#[crate::otlp::qualified("opentelemetry.proto.common.v1.KeyValue")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyValue {
#[prost(string, tag="1")]
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
#[prost(message, optional, tag = "2")]
pub value: ::core::option::Option<AnyValue>,
}
#[crate::otlp::qualified("opentelemetry.proto.common.v1.InstrumentationScope")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstrumentationScope {
#[prost(string, tag="1")]
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(message, repeated, tag="3")]
#[prost(message, repeated, tag = "3")]
pub attributes: ::prost::alloc::vec::Vec<KeyValue>,
#[prost(uint32, tag="4")]
#[prost(uint32, tag = "4")]
pub dropped_attributes_count: u32,
}
#[crate::otlp::qualified("opentelemetry.proto.common.v1.EntityRef")]
#[derive(crate::otlp::Message)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EntityRef {
#[prost(string, tag="1")]
#[prost(string, tag = "1")]
pub schema_url: ::prost::alloc::string::String,
#[prost(string, tag="2")]
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, repeated, tag="3")]
#[prost(string, repeated, tag = "3")]
pub id_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag="4")]
#[prost(string, repeated, tag = "4")]
pub description_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
Loading
Loading