-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update build telemetry to use the local IceRpc packages #4040
Conversation
@@ -66,8 +65,25 @@ | |||
|
|||
BuildTelemetry buildTelemetry = idl.ToLower() switch | |||
{ | |||
"slice" => new BuildTelemetry.Slice(new SliceTelemetryData(version, compilationHash, containsSlice1, containsSlice2, sourceFileCount, referenceFileCount)), | |||
"protobuf" => new BuildTelemetry.Protobuf(new ProtobufTelemetryData(version, compilationHash, sourceFileCount)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworked the code to use the generated constructor, and remove the other constructor that hardcodes the defaults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. We should test a published nugget to make sure this works in production.
@@ -20,12 +20,12 @@ | |||
<SliceCompilerPath | |||
Condition="'$(Configuration)' == 'Release'" | |||
>$(MSBuildThisFileDirectory)../slicec-cs/target/release</SliceCompilerPath> | |||
<IceRpcBuildTelemetryScriptPath | |||
>$(MSBuildThisFileDirectory)../IceRpc.BuildTelemetry.Reporter/bin/$(Configuration)/net8.0/</IceRpcBuildTelemetryScriptPath> | |||
<!-- Build telemetry is not supported with source builds --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would update the comment to:
Disable build telemetry when using a source build of slicec-cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
/// <summary> | ||
/// Gets or sets the number of source files in the Slice compilation. | ||
/// </summary> | ||
public int SourceFileCount { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should say protobuf
instead of Slice
compilation.
Also, I'm not sure whether making a distinction of "source" files is meaningful/correct with Protobuf,
unlike in Slice.
This PR updates
IceRpc.BuildTelemetry.Reporter
package to use the local IceRPC packages, previously it was build against the published NuGet packages.It also splits the
TelemetryTask
in twoBuildTelemetryTask
classes one inIceRpc.Slice.Tools
and another inIceRpc.Protobuf.Tools
.Fixes #4025