Skip to content

Commit

Permalink
Merge pull request #17 from microsoft/bxl-update
Browse files Browse the repository at this point in the history
Update BuildXL packages
  • Loading branch information
johnterickson authored Nov 30, 2023
2 parents 162c8e1 + 544ebed commit f827277
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
<Project>
<PropertyGroup>
<ArtifactsPackageVersion>19.230.34229-buildid23092045</ArtifactsPackageVersion>

<!-- see https://www.nuget.org/packages/Microsoft.VisualStudio.Services.PipelineCache.WebApi/19.230.34229-buildid23092045 -->
<BuildXLPackageVersion>0.1.0-20230922.1</BuildXLPackageVersion>

<BuildXLPackageVersion>0.1.0-20231128.3</BuildXLPackageVersion>
<MSBuildPackageVersion>17.8.3</MSBuildPackageVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions src/AzureBlobStorage/MSBuildCacheAzureBlobStoragePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -72,7 +73,7 @@ protected override async Task<ICacheClient> 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");
Expand All @@ -98,7 +99,7 @@ protected override async Task<ICacheClient> 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))
Expand All @@ -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<ICacheSession> StartCacheSessionAsync(Context context, ICache cache, string name)
Expand Down

0 comments on commit f827277

Please sign in to comment.