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

Need to fetch the license file from Dev0 rather than Devlegacy for DEV. #6881

Merged
merged 3 commits into from Feb 12, 2019

Conversation

@zhhyu
Copy link
Contributor

zhhyu commented Feb 8, 2019

For DEV blob storage, we have separate locations as "nugetdev0" and "nugetdevlegacy". V3 job will put the package with license file at "nugetdev0". However, gallery will go to "nugetdevlegacy" to fetch the license file, which is not there. So there is a need to let the gallery get the license file from "nugetdev0" in DEV.
Fix: NuGet/Engineering#2119

Create<RevalidationStateService, IRevalidationStateService>(configuration.AzureStorage_Revalidation_ConnectionString, isSingleInstance: false),
Create<FeatureFlagFileStorageService, IFeatureFlagStorageService>(configuration.AzureStorage_Content_ConnectionString, isSingleInstance: true)
Create<FeatureFlagFileStorageService, IFeatureFlagStorageService>(configuration.AzureStorage_Content_ConnectionString, isSingleInstance: true),
Create<CoreLicenseFileService, ICoreLicenseFileService>(configuration.AzureStorage_Flatcontainer_ConnectionString, isSingleInstance: false)

This comment has been minimized.

@joelverhagen

joelverhagen Feb 8, 2019

Member

Are there unit tests around this that need to be enhanced?

@joelverhagen

This comment has been minimized.

Copy link
Member

joelverhagen commented Feb 9, 2019

Please add the configuration to our .cscfg files before merging this PR. The .cscfg files are in our internal NuGetDeployment repository.

In general the least risky approach to adding config is to first add it to the .cscfg then add it to gallery. Gallery doesn't care if there are config names that are unused. In other words, adding to the .cscfgs is backwards compatible.

@@ -795,7 +795,7 @@ private static void ConfigureForAzureStorage(ContainerBuilder builder, IGalleryC

var registration = builder.RegisterType(dependent.ImplementationType)
.WithParameter(new ResolvedParameter(
(pi, ctx) => pi.ParameterType == typeof(IFileStorageService),
(pi, ctx) => pi.ParameterType.IsAssignableFrom(typeof(IFileStorageService)),

This comment has been minimized.

@scottbommarito

scottbommarito Feb 11, 2019

Member

Is this necessary? I don't see any changes to IFileStorageService in this PR.

Furthermore, we have a couple other instances of similar code in this file that use == instead of IsAssignableFrom.

This comment has been minimized.

@joelverhagen

joelverhagen Feb 11, 2019

Member

ICoreFileStorageService needs to match this ResolvedParameter. IsAssignableFrom does this.

Show resolved Hide resolved src/NuGetGallery/App_Start/StorageDependent.cs Outdated
@agr

agr approved these changes Feb 12, 2019

@zhhyu zhhyu merged commit 8184cc7 into dev Feb 12, 2019

3 checks passed

NuGetGallery - CI #49800 succeeded
Details
NuGetGallery - Queue NuGetDeployment CI #49801 succeeded
Details
license/cla All CLA requirements met.
Details

@zhhyu zhhyu deleted the zhhyu-connect-flatcontainer branch Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment