Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 3cf09c6

Browse files
authored
Include dotnet version in info response (#2693)
* Include dotnet info in version response * Python code requires non-null
1 parent 4af4f93 commit 3cf09c6

File tree

1 file changed

+7
-1
lines changed
  • src/ApiService/ApiService/Functions

1 file changed

+7
-1
lines changed

src/ApiService/ApiService/Functions/Info.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.IO;
22
using System.Reflection;
3+
using System.Runtime.InteropServices;
34
using System.Threading;
45
using Microsoft.Azure.Functions.Worker;
56
using Microsoft.Azure.Functions.Worker.Http;
@@ -33,11 +34,16 @@ public Info(IEndpointAuthorization auth, IOnefuzzContext context) {
3334
var buildId = ReadResource(asm, "ApiService.onefuzzlib.build.id");
3435
var versionString = context.ServiceConfiguration.OneFuzzVersion;
3536

37+
var dotnetVersionString = $"{RuntimeInformation.FrameworkDescription} ({RuntimeInformation.RuntimeIdentifier})";
38+
3639
return new InfoResponse(
3740
ResourceGroup: resourceGroup,
3841
Subscription: subscription,
3942
Region: region,
40-
Versions: new Dictionary<string, InfoVersion> { { "onefuzz", new(gitVersion, buildId, versionString) } },
43+
Versions: new Dictionary<string, InfoVersion> {
44+
{ "onefuzz", new(gitVersion, buildId, versionString) },
45+
{ "dotnet", new("", "", dotnetVersionString) },
46+
},
4147
InstanceId: await _context.Containers.GetInstanceId(),
4248
InsightsAppid: config.ApplicationInsightsAppId,
4349
InsightsInstrumentationKey: config.ApplicationInsightsInstrumentationKey);

0 commit comments

Comments
 (0)