Skip to content

Commit

Permalink
Bump sdk, pin dependency versions. (#455)
Browse files Browse the repository at this point in the history
* Bump sdk, pin dependency version.

* Bump to 8.0.0

* Add timer around package metadata parsing

---------

Co-authored-by: Sebastian Gomez <segomez@microsoft.com>
  • Loading branch information
sebasgomez238 and sebasgomez238 authored Dec 4, 2023
1 parent 29cb02d commit a9a920a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PackageVersion>
</ItemDefinitionGroup>
<PropertyGroup>
<ComponentDetectionPackageVersion>4.0.6</ComponentDetectionPackageVersion>
<ComponentDetectionPackageVersion>4.0.8</ComponentDetectionPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="AutoMapper" Version="10.1.1" />
Expand All @@ -21,6 +21,7 @@
<PackageVersion Include="Microsoft.ComponentDetection.Detectors" Version="$(ComponentDetectionPackageVersion)" />
<PackageVersion Include="Microsoft.ComponentDetection.Orchestrator" Version="$(ComponentDetectionPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100-rc.2.23502.2",
"version": "8.0.100",
"rollForward": "latestMajor"
}
}
1 change: 1 addition & 0 deletions src/Microsoft.Sbom.Api/Microsoft.Sbom.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageReference Include="Microsoft.ComponentDetection.Detectors" />
<PackageReference Include="Microsoft.ComponentDetection.Orchestrator" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.Configuration" />
<PackageReference Include="packageurl-dotnet" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.ComponentDetection.Contracts.BcdeModels;
using Microsoft.ComponentDetection.Contracts.TypedComponent;
using Microsoft.Sbom.Api.Output.Telemetry;
using Microsoft.Sbom.Api.Utils;
using Serilog;

namespace Microsoft.Sbom.Api.PackageDetails;
Expand All @@ -34,9 +35,12 @@ public PackageDetailsFactory(ILogger log, IRecorder recorder, IPackageManagerUti

public IDictionary<(string Name, string Version), PackageDetails> GetPackageDetailsDictionary(IEnumerable<ScannedComponent> scannedComponents)
{
var packageDetailsLocations = GetPackageDetailsLocations(scannedComponents);
using (recorder.TraceEvent(Events.SBOMParseMetadata))
{
var packageDetailsLocations = GetPackageDetailsLocations(scannedComponents);

return ExtractPackageDetailsFromFiles(packageDetailsLocations);
return ExtractPackageDetailsFromFiles(packageDetailsLocations);
}
}

private List<string> GetPackageDetailsLocations(IEnumerable<ScannedComponent> scannedComponents)
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.Sbom.Api/Utils/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ internal static class Events
{
#region Generation
internal const string SBOMGenerationWorkflow = "Total generation time";
internal const string SBOMParseMetadata = "Total metadata parsing time";
internal const string FilesGeneration = "Files generation time";
internal const string PackagesGeneration = "Packages generation time";
internal const string RelationshipsGeneration = "Relationships generation time";
Expand Down

0 comments on commit a9a920a

Please sign in to comment.