-
Notifications
You must be signed in to change notification settings - Fork 644
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
Removing blob storage SDK leakage into the code base #9981
Closed
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
018faec
WIP
agr 56ec658
Unused args.
agr 5dda8bf
Removing BlobRequestOptions
agr cf3c800
Less usings.
agr 812662d
BlobContinuationTokens.
agr cb98c41
BLob list details wrapper.
agr ed59f66
BlobProperties
agr 99b4180
CopyState
agr 6d65715
AccessCondition
agr f81cc7f
SAS permissions enum
agr 435d521
Method rename
agr 217c7e6
ContentEncoding property
agr 5526e3d
Overwrite fix.
agr 379d154
Exceptions!
agr d08d4e6
Pulling back nuget.jobs changes.
agr cdf1063
WrapStorageExceptionAsync
agr bfd2449
Missed `?`
agr b919573
Catching more cases of blob/container not found.
agr c747941
Aligning exception checks with old code.
agr 5b72650
NuGet.Jobs version update
agr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
src/NuGetGallery.Core/Extensions/StorageExceptionExtensions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/NuGetGallery.Core/Services/BlobListContinuationToken.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// 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 Microsoft.WindowsAzure.Storage.Blob; | ||
|
||
namespace NuGetGallery | ||
{ | ||
internal class BlobListContinuationToken : IBlobListContinuationToken | ||
{ | ||
public BlobListContinuationToken(BlobContinuationToken continuationToken) | ||
{ | ||
ContinuationToken = continuationToken; | ||
} | ||
public BlobContinuationToken ContinuationToken { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/NuGetGallery.Core/Services/CloudBlobConflictException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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; | ||
|
||
namespace NuGetGallery | ||
{ | ||
public class CloudBlobConflictException : CloudBlobStorageException | ||
{ | ||
public CloudBlobConflictException(Exception innerException) | ||
: base(innerException) | ||
{ | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/NuGetGallery.Core/Services/CloudBlobContainerNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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; | ||
|
||
namespace NuGetGallery | ||
{ | ||
public class CloudBlobContainerNotFoundException : CloudBlobGenericNotFoundException | ||
{ | ||
public CloudBlobContainerNotFoundException(Exception innerException) | ||
: base("Container not found", innerException) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// 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; | ||
using Microsoft.WindowsAzure.Storage.Blob; | ||
|
||
namespace NuGetGallery | ||
{ | ||
internal class CloudBlobCopyState : ICloudBlobCopyState | ||
{ | ||
private readonly CloudBlockBlob _blob; | ||
|
||
public CloudBlobCopyState(CloudBlockBlob blob) | ||
{ | ||
_blob = blob ?? throw new ArgumentNullException(nameof(blob)); | ||
} | ||
public CloudBlobCopyStatus Status => CloudWrapperHelpers.GetBlobCopyStatus(_blob.CopyState.Status); | ||
|
||
public string StatusDescription => _blob.CopyState.StatusDescription; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would have to be updated with a separate PR as NuGet.Jobs release depends on this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems circular. Should we get away from this dependency? (sometime in the future)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes this circular dependency makes hard to reason with runtime issue caused by dependency injection. Not sure exactly what was the actual dll consumed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have jobs in Gallery repo that use base classes from NuGet.Jobs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured it would be something like that--I'll create a task for moving them, although that would also involve nugetizing some additional gallery dependencies to support them, I expect. DI, for one may make this a pipe dream.