Update and consolidate package references (#911)

* Update and consolidate package references

* Update storage SDK
This commit is contained in:
Jacob Viau 2024-10-29 14:34:33 -07:00 коммит произвёл GitHub
Родитель 2e7550f723
Коммит c7a6b809a8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
24 изменённых файлов: 68 добавлений и 146 удалений

Просмотреть файл

@ -6,24 +6,13 @@
<LangVersion>latest</LangVersion>
<NoWarn>$(NoWarn);8002</NoWarn>
<DocumentationFile></DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -31,7 +31,8 @@ namespace ExtensionsSample
{
webJobsBuilder
.AddAzureStorageCoreServices()
.AddAzureStorage()
.AddAzureStorageBlobs()
.AddAzureStorageQueues()
.AddFiles(o =>
{
o.RootPath = filesTestPath;

Просмотреть файл

@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.Azure.Storage.Blob;
using Azure.Storage.Blobs;
using Microsoft.Azure.WebJobs;
namespace ExtensionsSample
@ -15,11 +15,11 @@ namespace ExtensionsSample
// container then deleted.
public static async Task ImportFile(
[FileTrigger(@"import/{name}", "*.dat", autoDelete: true)] Stream file,
[Blob(@"processed/{name}")] CloudBlockBlob output,
[Blob(@"processed/{name}")] BlobClient output,
string name,
TextWriter log)
{
await output.UploadFromStreamAsync(file);
await output.UploadAsync(file);
file.Close();
log.WriteLine(string.Format("Processed input file '{0}'!", name));

Просмотреть файл

@ -19,10 +19,10 @@
<WarningsAsErrors />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.41.0" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.37" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.4" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.45.0" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.41" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.6" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="StyleCop.Analyzers" Version="1.1.118" />

Просмотреть файл

@ -30,7 +30,7 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Formatters.Json" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.2.2" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.32" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.41" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -20,8 +20,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Mobile.Client" Version="4.0.2" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.32" />
<PackageReference Include="Microsoft.Azure.Mobile.Client" Version="4.1.2" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.41" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -20,7 +20,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.32" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.41" />
<PackageReference Include="SendGrid" Version="9.10.0" />
</ItemGroup>

Просмотреть файл

@ -22,8 +22,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.22.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.6" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -21,7 +21,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.32" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.41" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.34.0" />
<PackageReference Include="Twilio" Version="6.2.5" />
</ItemGroup>

Просмотреть файл

@ -22,7 +22,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.32" />
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.41" />
<PackageReference Include="ncrontab.signed" Version="3.3.3" />
</ItemGroup>

Просмотреть файл

@ -174,7 +174,8 @@ namespace Microsoft.Azure.WebJobs.Extensions.CosmosDB.Tests
.ConfigureWebJobs(builder =>
{
builder
.AddAzureStorage()
.AddAzureStorageBlobs()
.AddAzureStorageQueues()
.AddCosmosDB();
})
.ConfigureAppConfiguration(c =>

Просмотреть файл

@ -422,8 +422,10 @@ namespace Microsoft.Azure.WebJobs.Extensions.CosmosDB.Tests
IHost host = new HostBuilder()
.ConfigureWebJobs(builder =>
{
builder.AddAzureStorage()
.AddCosmosDB();
builder
.AddAzureStorageBlobs()
.AddAzureStorageQueues()
.AddCosmosDB();
})
.ConfigureAppConfiguration(c =>
{

Просмотреть файл

@ -8,19 +8,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.37" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.3" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.TestCommon" Version="3.0.30" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.3" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.TestCommon" Version="3.0.41" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -25,8 +25,8 @@ namespace Microsoft.Azure.WebJobs.Extensions.Tests.Extensions.Http
private const string UserNameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name";
private const string UserRoleClaimType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role";
private const string UserAuthType = "aad";
private const string UserNameClaimValue = "Connor McMahon";
private const string UserRoleClaimValue = "Software Engineer";
private const string UserNameClaimValue = "Some User";
private const string UserRoleClaimValue = "Test Asset";
private JobHost GetJobHost(INameResolver resolver = null)
{
@ -48,9 +48,9 @@ namespace Microsoft.Azure.WebJobs.Extensions.Tests.Extensions.Http
{
o.SetResponse = SetResultHook;
})
.AddAzureStorageCoreServices()
.AddTimers()
.AddAzureStorage();
.AddAzureStorageBlobs()
.AddAzureStorageQueues()
.AddTimers();
}, typeof(TestFunctions))
.Build();

Просмотреть файл

@ -6,9 +6,8 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Azure.Storage.Blobs;
using Microsoft.AspNetCore.Http;
using Microsoft.Azure.Storage;
using Microsoft.Azure.Storage.Blob;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Extensions.Tests.Common;
using Microsoft.Extensions.Hosting;
@ -32,7 +31,8 @@ namespace Microsoft.Azure.WebJobs.Extensions.Tests.Extensions.Http
{
o.SetResponse = SetResultHook;
})
.AddAzureStorage();
.AddAzureStorageBlobs()
.AddAzureStorageQueues();
}, typeof(TestFunctions))
.Build();
_jobHost = _host.GetJobHost();
@ -116,14 +116,13 @@ namespace Microsoft.Azure.WebJobs.Extensions.Tests.Extensions.Http
// verify blob was written
string blobName = $"test-{testId}-{testSuffix}";
var account = CloudStorageAccount.Parse(Environment.GetEnvironmentVariable("AzureWebJobsStorage"));
CloudBlobClient client = account.CreateCloudBlobClient();
CloudBlobContainer container = client.GetContainerReference("test-output");
var blobRef = await container.GetBlobReferenceFromServerAsync(blobName);
await TestHelpers.Await(() => blobRef.ExistsAsync());
var client = new BlobServiceClient(Environment.GetEnvironmentVariable("AzureWebJobsStorage"));
var container = client.GetBlobContainerClient("test-output");
var blobRef = container.GetBlobClient(blobName);
await TestHelpers.Await(async () => await blobRef.ExistsAsync());
MemoryStream stream = new MemoryStream();
await blobRef.DownloadToStreamAsync(stream);
await blobRef.DownloadToAsync(stream);
stream.Seek(0, SeekOrigin.Begin);
string result;

Просмотреть файл

@ -8,19 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.0-beta.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.3" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -310,7 +310,9 @@ namespace Microsoft.Azure.WebJobs.Extensions.Tests.Extensions.MobileApps
IHost host = new HostBuilder()
.ConfigureWebJobs(builder =>
{
builder.AddAzureStorage()
builder
.AddAzureStorageBlobs()
.AddAzureStorageQueues()
.AddMobileApps(o =>
{
if (configUri != null)

Просмотреть файл

@ -8,15 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.3" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -7,17 +7,6 @@
<RootNamespace>Microsoft.Azure.WebJobs.Extensions.SendGrid.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WebJobs.Extensions.SendGrid\WebJobs.Extensions.SendGrid.csproj" />
<ProjectReference Include="..\WebJobs.Extensions.Tests.Common\WebJobs.Extensions.Tests.Common.csproj" />

Просмотреть файл

@ -24,6 +24,12 @@ namespace Microsoft.Azure.WebJobs.Extensions.Tests.Common
_jobActivator = jobActivator;
}
// $$$ Meant to simplify some tests - is this worth it?
public interface IProgramWithResult<TResult>
{
TaskCompletionSource<TResult> TaskSource { get; set; }
}
public Task CallAsync(string methodName, object arguments)
{
return CallAsync(typeof(TProgram).GetMethod(methodName), arguments);
@ -72,10 +78,4 @@ namespace Microsoft.Azure.WebJobs.Extensions.Tests.Common
Assert.True(false, "Invoker should have failed");
}
}
// $$$ Meant to simplify some tests - is this worth it?
public interface IProgramWithResult<TResult>
{
TaskCompletionSource<TResult> TaskSource { get; set; }
}
}

Просмотреть файл

@ -6,19 +6,23 @@
<AssemblyName>Microsoft.Azure.WebJobs.Extensions.Tests.Common</AssemblyName>
<RootNamespace>Microsoft.Azure.WebJobs.Extensions.Tests.Common</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="System.Drawing.Common" Version="4.7.3" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
<PackageReference Include="System.Text.Json" Version="6.0.10" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -9,14 +9,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.1" />
<PackageReference Update="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
@ -30,9 +24,4 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Update="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="Microsoft.Azure.WebJobs.Host.Storage" Version="5.0.0-beta.1" />
</ItemGroup>
</Project>

Просмотреть файл

@ -7,16 +7,6 @@
<RootNamespace>Microsoft.Azure.WebJobs.Extensions.Timers.Storage.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WebJobs.Extensions.Timers.Storage\WebJobs.Extensions.Timers.Storage.csproj" />
<ProjectReference Include="..\WebJobs.Extensions.Tests.Common\WebJobs.Extensions.Tests.Common.csproj" />

Просмотреть файл

@ -7,22 +7,6 @@
<RootNamespace>Microsoft.Azure.WebJobs.Extensions.Twilio.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WebJobs.Extensions.Twilio\WebJobs.Extensions.Twilio.csproj" />
<ProjectReference Include="..\WebJobs.Extensions.Tests.Common\WebJobs.Extensions.Tests.Common.csproj" />