Skip to content
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

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

pepone
Copy link
Member

@pepone pepone commented Sep 9, 2024

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 two BuildTelemetryTask classes one in IceRpc.Slice.Tools and another in IceRpc.Protobuf.Tools.

Fixes #4025

@@ -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)),
Copy link
Member Author

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

Copy link
Member

@externl externl left a 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 -->
Copy link
Member

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

@pepone pepone merged commit f2c2cfd into icerpc:main Sep 9, 2024
6 checks passed
Copy link
Member

@InsertCreativityHere InsertCreativityHere left a comment

Choose a reason for hiding this comment

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

Looks good!

Comment on lines +19 to +22
/// <summary>
/// Gets or sets the number of source files in the Slice compilation.
/// </summary>
public int SourceFileCount { get; set; }

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.

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.

Using local slicec-cs to build tools/IceRpc/BuildTelemetry
4 participants