Skip to content

Commit

Permalink
Implemented Track 2 storage extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocav committed Jul 14, 2021
1 parent ceddf5e commit 37d3f63
Show file tree
Hide file tree
Showing 19 changed files with 356 additions and 426 deletions.
542 changes: 278 additions & 264 deletions DotNetWorker.sln

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ jobs:
displayName: "Setup E2E tests"
env:
CORE_TOOLS_URL: $(CORE_TOOLS_URL)

- bash: |
sudo npm install -g azurite
sudo mkdir azurite
sudo azurite --silent --location azurite --debug azurite\debug.log &
displayName: 'Install and Run Azurite'
- task: DotNetCoreCLI@2
displayName: 'Run E2E tests'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;

[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.Storage", "4.0.4")]
[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.Storage.Blobs", "5.0.0-beta.4")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs</AssemblyName>
<RootNamespace>Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs</RootNamespace>
<Description>Azure Blob Storage extensions for .NET isolated functions</Description>

<!--Version information-->
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>-beta.4</VersionSuffix>

<!--Temporarily opting out of documentation. Pending documentation-->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

<Import Project="..\..\build\Extensions.props" />

<ItemGroup>
<ProjectReference Include="..\Worker.Extensions.Abstractions\Worker.Extensions.Abstractions.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;

[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.Storage.Queues", "5.0.0-beta.4")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues</AssemblyName>
<RootNamespace>Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues</RootNamespace>
<Description>Azure Queue Storage extensions for .NET isolated functions</Description>

<!--Version information-->
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>-beta.4</VersionSuffix>

<!--Temporarily opting out of documentation. Pending documentation-->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

<Import Project="..\..\build\Extensions.props" />

<ItemGroup>
<ProjectReference Include="..\Worker.Extensions.Abstractions\Worker.Extensions.Abstractions.csproj" />
</ItemGroup>

</Project>
83 changes: 0 additions & 83 deletions extensions/Worker.Extensions.Storage/Tables/TableInputAttribute.cs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@
<Description>Azure Storage extensions for .NET isolated functions</Description>

<!--Version information-->
<VersionPrefix>4.0.4</VersionPrefix>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>-beta.4</VersionSuffix>

<!--Temporarily opting out of documentation. Pending documentation-->
<GenerateDocumentationFile>false</GenerateDocumentationFile>

<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<Import Project="..\..\build\Extensions.props" />

<ItemGroup>
<ProjectReference Include="..\Worker.Extensions.Abstractions\Worker.Extensions.Abstractions.csproj" />
<ProjectReference Include="..\Worker.Extensions.Storage.Blobs\Worker.Extensions.Storage.Blobs.csproj" />
<ProjectReference Include="..\Worker.Extensions.Storage.Queues\Worker.Extensions.Storage.Queues.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<!-- Please add your release notes in the following format:
- My change description (#PR/#issue)
-->
- Updated behavior of the HttpHeadersCollection implementation to avoid double validation of headers processed by the host.
- Implementation of new (Track 2) Azure Storage SDK extensions (Blobs and Queues)
3 changes: 2 additions & 1 deletion samples/FunctionApp/FunctionApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.0.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.3.0-local202106220952" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.0.3-local202106220952" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/E2ETests/E2ETests/Fixtures/FunctionAppFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ await TestUtility.RetryAsync(async () =>
_logger.LogInformation($" Current state: process starting");
return false;
}
});
}, userMessageCallback: ()=> "The host startup process failed." );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ public void StorageFunctions()

AssertDictionary(extensions, new Dictionary<string, string>
{
{ "Microsoft.Azure.WebJobs.Extensions.Storage", "4.0.4" }
{ "Microsoft.Azure.WebJobs.Extensions.Storage.Queues", "5.0.0-beta.4" },
{ "Microsoft.Azure.WebJobs.Extensions.Storage.Blobs", "5.0.0-beta.4" },
});

void ValidateQueueTrigger(ExpandoObject b)
Expand Down Expand Up @@ -263,7 +264,8 @@ public void MultiOutput_OnReturnType()

AssertDictionary(extensions, new Dictionary<string, string>
{
{ "Microsoft.Azure.WebJobs.Extensions.Storage", "4.0.4" }
{ "Microsoft.Azure.WebJobs.Extensions.Storage.Queues", "5.0.0-beta.4" },
{ "Microsoft.Azure.WebJobs.Extensions.Storage.Blobs", "5.0.0-beta.4" },
});

void ValidateQueueTrigger(ExpandoObject b)
Expand Down Expand Up @@ -325,7 +327,7 @@ public void MultiOutput_OnReturnType_WithHttp()

AssertDictionary(extensions, new Dictionary<string, string>
{
{ "Microsoft.Azure.WebJobs.Extensions.Storage", "4.0.4" }
{ "Microsoft.Azure.WebJobs.Extensions.Storage.Queues", "5.0.0-beta.4" }
});

void ValidateHttpTrigger(ExpandoObject b)
Expand Down
9 changes: 6 additions & 3 deletions test/SdkE2ETests/PublishTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ private async Task RunPublishTest(string outputDir, string additionalParams = nu
new Extension("Startup",
"Microsoft.Azure.WebJobs.Extensions.FunctionMetadataLoader.Startup, Microsoft.Azure.WebJobs.Extensions.FunctionMetadataLoader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=551316b6919f366c",
@"./.azurefunctions/Microsoft.Azure.WebJobs.Extensions.FunctionMetadataLoader.dll"),
new Extension("AzureStorage",
"Microsoft.Azure.WebJobs.Extensions.Storage.AzureStorageWebJobsStartup, Microsoft.Azure.WebJobs.Extensions.Storage, Version=4.0.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
@"./.azurefunctions/Microsoft.Azure.WebJobs.Extensions.Storage.dll")
new Extension("AzureStorageBlobs",
"Microsoft.Azure.WebJobs.Extensions.Storage.AzureStorageBlobsWebJobsStartup, Microsoft.Azure.WebJobs.Extensions.Storage.Blobs, Version=5.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8",
@"./.azurefunctions/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.dll"),
new Extension("AzureStorageQueues",
"Microsoft.Azure.WebJobs.Extensions.Storage.AzureStorageQueuesWebJobsStartup, Microsoft.Azure.WebJobs.Extensions.Storage.Queues, Version=5.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8",
@"./.azurefunctions/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.dll")
}
});
Assert.True(JToken.DeepEquals(extensionsJsonContents, expected), $"Actual: {extensionsJsonContents}{Environment.NewLine}Expected: {expected}");
Expand Down

0 comments on commit 37d3f63

Please sign in to comment.