From 544ebed5fbfb3ff66399377f5f800d4902a92329 Mon Sep 17 00:00:00 2001 From: David Federman Date: Wed, 29 Nov 2023 22:47:28 -0800 Subject: [PATCH] Update BuildXL packages --- Directory.Packages.props | 5 +---- src/AzureBlobStorage/MSBuildCacheAzureBlobStoragePlugin.cs | 7 ++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 66d0ff0..bf4c37d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,10 +2,7 @@ 19.230.34229-buildid23092045 - - - 0.1.0-20230922.1 - + 0.1.0-20231128.3 17.8.3 diff --git a/src/AzureBlobStorage/MSBuildCacheAzureBlobStoragePlugin.cs b/src/AzureBlobStorage/MSBuildCacheAzureBlobStoragePlugin.cs index 93417aa..941e075 100644 --- a/src/AzureBlobStorage/MSBuildCacheAzureBlobStoragePlugin.cs +++ b/src/AzureBlobStorage/MSBuildCacheAzureBlobStoragePlugin.cs @@ -16,6 +16,7 @@ using BuildXL.Cache.ContentStore.Interfaces.Stores; using BuildXL.Cache.ContentStore.Interfaces.Tracing; using BuildXL.Cache.ContentStore.Logging; +using BuildXL.Cache.ContentStore.Tracing.Internal; using BuildXL.Cache.MemoizationStore.Distributed.Stores; using BuildXL.Cache.MemoizationStore.Interfaces.Caches; using BuildXL.Cache.MemoizationStore.Interfaces.Sessions; @@ -72,7 +73,7 @@ protected override async Task CreateCacheClientAsync(PluginLoggerB logger.LogMessage($"Using cache namespace '{cacheContainer}' as '{cacheContainerHash}'."); #pragma warning disable CA2000 // Dispose objects before losing scope. Expected to be disposed by TwoLevelCache - ICache remoteCache = CreateRemoteCache(cacheContainerHash); + ICache remoteCache = CreateRemoteCache(new OperationContext(context, cancellationToken), cacheContainerHash); #pragma warning restore CA2000 // Dispose objects before losing scope ICacheSession remoteCacheSession = await StartCacheSessionAsync(context, remoteCache, "remote"); @@ -98,7 +99,7 @@ protected override async Task CreateCacheClientAsync(PluginLoggerB Settings.AsyncCacheMaterialization); } - private static ICache CreateRemoteCache(string cacheUniverse) + private static ICache CreateRemoteCache(OperationContext context, string cacheUniverse) { string? connectionString = Environment.GetEnvironmentVariable(AzureBlobConnectionStringEnvVar); if (string.IsNullOrEmpty(connectionString)) @@ -113,7 +114,7 @@ private static ICache CreateRemoteCache(string cacheUniverse) Universe: cacheUniverse, Namespace: "0", RetentionPolicyInDays: null); - return AzureBlobStorageCacheFactory.Create(cacheConfig, new StaticBlobCacheSecretsProvider(credentials)); + return AzureBlobStorageCacheFactory.Create(context, cacheConfig, new StaticBlobCacheSecretsProvider(credentials)); } private static async Task StartCacheSessionAsync(Context context, ICache cache, string name)