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 to latest ServerCommon (v2.123.0) #10108

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
<EnablePackageVersionOverride>true</EnablePackageVersionOverride>
<NuGetClientPackageVersion>6.9.1</NuGetClientPackageVersion>
<ServerCommonPackageVersion>2.122.0</ServerCommonPackageVersion>
<ServerCommonPackageVersion>2.123.0</ServerCommonPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Autofac.Extensions.DependencyInjection" Version="4.4.0" />
Expand Down
5 changes: 3 additions & 2 deletions src/Gallery.CredentialExpiration/Job.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Expand Down Expand Up @@ -56,6 +56,7 @@ public override void Init(IServiceContainer serviceContainer, IDictionary<string
var storageFactory = new AzureStorageFactory(
storageAccount,
InitializationConfiguration.ContainerName,
enablePublicAccess: false,
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes Gallery.CredentialExpiration. The current dev build is broken because of the mismatch.

LoggerFactory.CreateLogger<AzureStorage>());
Storage = storageFactory.Create();
}
Expand Down Expand Up @@ -182,4 +183,4 @@ protected override void ConfigureJobServices(IServiceCollection services, IConfi
ConfigureInitializationSection<InitializationConfiguration>(services, configurationRoot);
}
}
}
}
1 change: 1 addition & 0 deletions src/GitHubVulnerabilities2Db/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ protected void ConfigureCollectorServices(ContainerBuilder containerBuilder)
return new AzureStorageFactory(
ctx.Resolve<BlobServiceClient>(),
ctx.Resolve<GitHubVulnerabilities2DbConfiguration>().CursorContainerName,
enablePublicAccess: true,
ctx.Resolve<ILogger<AzureStorage>>());
})
.As<StorageFactory>()
Expand Down
1 change: 1 addition & 0 deletions src/GitHubVulnerabilities2v3/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ protected void ConfigureCollectorServices(ContainerBuilder containerBuilder)
return new AzureStorageFactory(
ctx.Resolve<BlobServiceClient>(),
ctx.Resolve<GitHubVulnerabilities2v3Configuration>().V3VulnerabilityContainerName,
enablePublicAccess: true,
ctx.Resolve<ILogger<AzureStorage>>());
})
.As<StorageFactory>()
Expand Down
5 changes: 4 additions & 1 deletion src/Stats.PostProcessReports/Job.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Threading.Tasks;
Expand Down Expand Up @@ -50,6 +50,7 @@ protected override void ConfigureAutofacServices(ContainerBuilder containerBuild
var factory = new AzureStorageFactory(
c.Resolve<BlobServiceClient>(),
cfg.SourceContainerName,
enablePublicAccess: false,
c.Resolve<ILogger<AzureStorage>>(),
cfg.SourcePath + cfg.DetailedReportDirectoryName,
initializeContainer: false);
Expand All @@ -66,6 +67,7 @@ protected override void ConfigureAutofacServices(ContainerBuilder containerBuild
var factory = new AzureStorageFactory(
c.Resolve<BlobServiceClient>(),
cfg.WorkContainerName,
enablePublicAccess: false,
c.Resolve<ILogger<AzureStorage>>(),
cfg.WorkPath,
initializeContainer: false);
Expand All @@ -82,6 +84,7 @@ protected override void ConfigureAutofacServices(ContainerBuilder containerBuild
var factory = new AzureStorageFactory(
c.Resolve<BlobServiceClient>(),
cfg.DestinationContainerName,
enablePublicAccess: true,
c.Resolve<ILogger<AzureStorage>>(),
cfg.DestinationPath,
initializeContainer: false);
Expand Down
6 changes: 5 additions & 1 deletion src/Validation.PackageSigning.ProcessSignature/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ protected override void ConfigureJobServices(IServiceCollection services, IConfi
var config = p.GetRequiredService<IOptionsSnapshot<CertificateStoreConfiguration>>().Value;
var targetStorageAccount = new BlobServiceClient(AzureStorageFactory.PrepareConnectionString(config.DataStorageAccount));

var storageFactory = new AzureStorageFactory(targetStorageAccount, config.ContainerName, LoggerFactory.CreateLogger<AzureStorage>());
var storageFactory = new AzureStorageFactory(
targetStorageAccount,
config.ContainerName,
enablePublicAccess: false,
LoggerFactory.CreateLogger<AzureStorage>());
var storage = storageFactory.Create();

return new CertificateStore(storage, LoggerFactory.CreateLogger<CertificateStore>());
Expand Down
6 changes: 5 additions & 1 deletion src/Validation.PackageSigning.ValidateCertificate/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ protected override void ConfigureJobServices(IServiceCollection services, IConfi
var config = p.GetRequiredService<IOptionsSnapshot<CertificateStoreConfiguration>>().Value;
var targetStorageAccount = new BlobServiceClient(AzureStorageFactory.PrepareConnectionString(config.DataStorageAccount));

var storageFactory = new AzureStorageFactory(targetStorageAccount, config.ContainerName, LoggerFactory.CreateLogger<AzureStorage>());
var storageFactory = new AzureStorageFactory(
targetStorageAccount,
config.ContainerName,
enablePublicAccess: false,
LoggerFactory.CreateLogger<AzureStorage>());
var storage = storageFactory.Create();

return new CertificateStore(storage, LoggerFactory.CreateLogger<CertificateStore>());
Expand Down