diff --git a/src/Microsoft.SourceIndexer.Tasks/DownloadStage1Index.cs b/src/Microsoft.SourceIndexer.Tasks/DownloadStage1Index.cs index 6336c37..81df9c6 100644 --- a/src/Microsoft.SourceIndexer.Tasks/DownloadStage1Index.cs +++ b/src/Microsoft.SourceIndexer.Tasks/DownloadStage1Index.cs @@ -73,7 +73,7 @@ private void ExecuteCore() } else { - credential = new ManagedIdentityCredential(ClientId); + credential = new ManagedIdentityCredential(ManagedIdentityId.FromUserAssignedClientId(ClientId)); } BlobServiceClient blobServiceClient = new( @@ -84,7 +84,7 @@ private void ExecuteCore() Pageable blobs; try { - blobs = containerClient.GetBlobs(prefix: RepoName + "/"); + blobs = containerClient.GetBlobs(traits: BlobTraits.None, states: BlobStates.None, prefix: RepoName + "/", cancellationToken: default); } catch (AuthenticationFailedException e) { diff --git a/src/SourceBrowser.hash b/src/SourceBrowser.hash index 5c0036e..12e3de4 100644 Binary files a/src/SourceBrowser.hash and b/src/SourceBrowser.hash differ diff --git a/src/SourceBrowser/src/BinLogToSln/BinLogToSln.csproj b/src/SourceBrowser/src/BinLogToSln/BinLogToSln.csproj index 9266e02..5320d9c 100644 --- a/src/SourceBrowser/src/BinLogToSln/BinLogToSln.csproj +++ b/src/SourceBrowser/src/BinLogToSln/BinLogToSln.csproj @@ -12,9 +12,9 @@ + - diff --git a/src/SourceBrowser/src/Directory.Packages.props b/src/SourceBrowser/src/Directory.Packages.props index 3f0123a..b641170 100644 --- a/src/SourceBrowser/src/Directory.Packages.props +++ b/src/SourceBrowser/src/Directory.Packages.props @@ -7,10 +7,10 @@ - - - - + + + + @@ -28,59 +28,52 @@ - - - - - - - + + + + + + + - + - + - - + - - - - - + - + - + - - - - - - - - - + + + + + + + - - + + - + - + diff --git a/src/SourceBrowser/src/HtmlGenerator/HtmlGenerator.csproj b/src/SourceBrowser/src/HtmlGenerator/HtmlGenerator.csproj index 70aa8f6..7bafcba 100644 --- a/src/SourceBrowser/src/HtmlGenerator/HtmlGenerator.csproj +++ b/src/SourceBrowser/src/HtmlGenerator/HtmlGenerator.csproj @@ -43,18 +43,8 @@ - - - - - - - - - - diff --git a/src/SourceBrowser/src/SourceIndexServer/Models/AzureBlobFileSystem.cs b/src/SourceBrowser/src/SourceIndexServer/Models/AzureBlobFileSystem.cs index 9e10b4b..b4107bc 100644 --- a/src/SourceBrowser/src/SourceIndexServer/Models/AzureBlobFileSystem.cs +++ b/src/SourceBrowser/src/SourceIndexServer/Models/AzureBlobFileSystem.cs @@ -21,7 +21,7 @@ public AzureBlobFileSystem(string uri) var clientId = Environment.GetEnvironmentVariable("AZURE_CLIENT_ID"); credential = string.IsNullOrEmpty(clientId) ? new AzureCliCredential() - : new ManagedIdentityCredential(clientId); + : new ManagedIdentityCredential(ManagedIdentityId.FromUserAssignedClientId(clientId)); container = new BlobContainerClient(new Uri(uri), credential); @@ -41,7 +41,7 @@ public IEnumerable ListFiles(string dirName) dirName += "/"; } - return container.GetBlobsByHierarchy(prefix: dirName) + return container.GetBlobsByHierarchy(traits: BlobTraits.None, states: BlobStates.None, delimiter: null, prefix: dirName) .Where(item => item.IsBlob) .Select(item => item.Blob.Name) .ToList(); diff --git a/src/UploadIndexStage1/Program.cs b/src/UploadIndexStage1/Program.cs index 3b3d82a..f091284 100644 --- a/src/UploadIndexStage1/Program.cs +++ b/src/UploadIndexStage1/Program.cs @@ -84,7 +84,7 @@ static async Task Main(string[] args) else { System.Console.WriteLine("Trying to use ManagedIdentityCredential with ClientID"); - credential = new ManagedIdentityCredential(clientId); + credential = new ManagedIdentityCredential(ManagedIdentityId.FromUserAssignedClientId(clientId)); } BlobServiceClient blobServiceClient = new( @@ -142,7 +142,7 @@ void AddFolder(string path) } Console.WriteLine("Cleaning up old blobs"); - List blobs = containerClient.GetBlobs(prefix: repoName + "/").ToList(); + List blobs = containerClient.GetBlobs(traits: BlobTraits.None, states: BlobStates.None, prefix: repoName + "/", cancellationToken: default).ToList(); List toDelete = blobs.OrderByDescending(b => b.Name).Skip(10).ToList(); foreach (BlobItem d in toDelete) {