Skip to content

Commit 07ca85b

Browse files
VpOfEngineeringyojagadbrettsamazfuncgh
authored
4.17.5 hotfix (#9258)
* Initial commit. * installing .net core 3.1 in CI (#9231) * 4.17.5 Hotfix --------- Co-authored-by: Yogesh <[email protected]> Co-authored-by: Brett Samblanet <[email protected]> Co-authored-by: azfuncgh <[email protected]>
1 parent f63094b commit 07ca85b

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<LangVersion>latest</LangVersion>
66
<MajorVersion>4</MajorVersion>
77
<MinorVersion>17</MinorVersion>
8-
<PatchVersion>4</PatchVersion>
8+
<PatchVersion>5</PatchVersion>
99
<BuildNumber Condition="'$(BuildNumber)' == '' ">0</BuildNumber>
1010
<PreviewVersion></PreviewVersion>
1111

build/install-dotnet.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
steps:
2+
- task: PowerShell@2
3+
displayName: 'Install .NET 3.1'
4+
inputs:
5+
targetType: 'inline'
6+
script: |
7+
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
8+
./dotnet-install.ps1 -InstallDir 'C:\Program Files\dotnet' -Verbose -Channel 3.1
29
- task: PowerShell@2
310
displayName: 'Install .NET 6'
411
inputs:
@@ -8,3 +15,4 @@ steps:
815
# Official release versions can be found at: https://dotnet.microsoft.com/download/dotnet/6.0
916
# Newer versions can be found at: https://github.com/dotnet/installer#installers-and-binaries
1017
./dotnet-install.ps1 -InstallDir 'C:\Program Files\dotnet' -Verbose -Channel 6.0
18+
& dotnet --info

src/WebJobs.Script.WebHost/Models/AzureStorageInfoValue.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ public static AzureStorageInfoValue FromEnvironmentVariable(KeyValuePair<string,
8383
}
8484

8585
var parts = environmentVariable.Value?.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
86-
if (parts == null || parts.Length != 4)
86+
if (parts == null)
87+
{
88+
return null;
89+
}
90+
91+
if (parts.Length != 4 && parts.Length != 5)
8792
{
8893
return null;
8994
}

test/WebJobs.Script.Tests.Integration/Management/AzureStorageInfoValueTests.cs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@ namespace Microsoft.Azure.WebJobs.Script.Tests.Integration.Management
1010
public class AzureStorageInfoValueTests
1111
{
1212
[Theory]
13-
[InlineData(null, null, null, null, null, null, false)]
14-
[InlineData("", null, "", "", "", "", false)]
15-
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "", "", "", "", false)]
16-
[InlineData("AZUREBLOBSTORAGE_storageid", AzureStorageType.AzureBlob, "", "", "", "", false)]
17-
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "", "sharename", "accesskey", "mountpath", false)]
18-
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "accountname", "sharename", "accesskey", "mountpath", true)]
19-
[InlineData("AZUREBLOBSTORAGE_storageid", AzureStorageType.AzureBlob, "accountname", "", "accesskey", "mountpath", false)]
20-
[InlineData("AZUREBLOBSTORAGE_storageid", AzureStorageType.AzureBlob, "accountname", "sharename", "accesskey", "mountpath", true)]
21-
public void Builds_AzureStorageInfoValue(string id, AzureStorageType? type, string accountName, string shareName, string accessKey, string mountPath, bool isValid)
13+
[InlineData(null, null, null, null, null, null, null, false)]
14+
[InlineData("", null, "", "", "", "", "", false)]
15+
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "", "", "", "", "", false)]
16+
[InlineData("AZUREBLOBSTORAGE_storageid", AzureStorageType.AzureBlob, "", "", "", "", "", false)]
17+
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "", "sharename", "accesskey", "mountpath", "", false)]
18+
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "accountname", "sharename", "accesskey", "mountpath", "", true)]
19+
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "accountname", "sharename", "accesskey", "mountpath", "smb", true)]
20+
[InlineData("AZUREBLOBSTORAGE_storageid", AzureStorageType.AzureBlob, "accountname", "", "accesskey", "mountpath", "", false)]
21+
[InlineData("AZUREBLOBSTORAGE_storageid", AzureStorageType.AzureBlob, "accountname", "sharename", "accesskey", "mountpath", "", true)]
22+
[InlineData("AZUREFILESSTORAGE_storageid", AzureStorageType.AzureFiles, "accountname", "sharename", "accesskey", "mountpath", "http", true)]
23+
public void Builds_AzureStorageInfoValue(string id, AzureStorageType? type, string accountName, string shareName, string accessKey, string mountPath, string protocol, bool isValid)
2224
{
2325
var key = id;
24-
var value = $"{accountName}|{shareName}|{accessKey}|{mountPath}";
26+
var value = $"{accountName}|{shareName}|{accessKey}|{mountPath}|{protocol}";
2527
var environmentVariable = new KeyValuePair<string, string>(key, value);
2628
var azureStorageInfoValue = AzureStorageInfoValue.FromEnvironmentVariable(environmentVariable);
2729
if (isValid)

0 commit comments

Comments
 (0)