Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Commit e48449b

Browse files
stishkinstas
andauthored
update dotnet dependencies (#163)
Co-authored-by: stas <statis@microsoft.com>
1 parent 6435347 commit e48449b

File tree

10 files changed

+81
-70
lines changed

10 files changed

+81
-70
lines changed

cli/samples/zap/running-against-raft-common-file-share/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ def run(run_zap):
2222
cli.poll(zap_job['jobId'])
2323

2424
if __name__ == "__main__":
25-
run("zap.json")
25+
run(os.path.join(cur_dir, "zap.json"))

src/APIService/ApiService/APIService.fsproj

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,29 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49-
<PackageReference Include="Azure.Core" Version="1.5.1" />
50-
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.4.0" />
51-
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.15.0" />
52-
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.15.0" />
53-
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.1.8" />
49+
<PackageReference Include="Azure.Core" Version="1.10.0" />
50+
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.6.0" />
51+
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.17.0" />
52+
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.17.0" />
53+
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="5.0.4" />
5454
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
5555
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
5656
<PackageReference Include="Microsoft.Azure.Management.EventGrid" Version="6.0.0" />
57-
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.34.0" />
58-
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.0.0" />
59-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" />
60-
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
61-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.8" />
62-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.8" />
57+
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.37.1" />
58+
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.1.2" />
59+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
60+
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
61+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
62+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
6363
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.11.6" />
64+
<PackageReference Include="Microsoft.Identity.Web" Version="1.8.1" />
6465
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.2.3" />
65-
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="5.6.3" />
66-
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="6.0.0" />
67-
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="5.6.3" />
68-
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.6.3" />
69-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" />
70-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.6.3" />
66+
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.1.1" />
67+
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="6.1.0" />
68+
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.1.1" />
69+
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.1.1" />
70+
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.1.1" />
71+
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.1.1" />
7172
<PackageReference Include="TaskBuilder.fs" Version="2.1.0" />
7273
</ItemGroup>
7374

src/APIService/ApiService/APIServiceTests/APIServiceTests.fsproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
@@ -29,18 +29,18 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="FsCheck" Version="2.14.3" />
33-
<PackageReference Include="FsCheck.Xunit" Version="2.14.3" />
34-
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.0.0" />
32+
<PackageReference Include="FsCheck" Version="2.15.1" />
33+
<PackageReference Include="FsCheck.Xunit" Version="2.15.1" />
34+
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.1.2" />
3535
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.11.6" />
36-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
36+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
3737
<PackageReference Include="NSubstitute" Version="4.2.2" />
3838
<PackageReference Include="xunit" Version="2.4.1" />
3939
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
4040
<PrivateAssets>all</PrivateAssets>
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4242
</PackageReference>
43-
<PackageReference Include="coverlet.collector" Version="1.3.0">
43+
<PackageReference Include="coverlet.collector" Version="3.0.3">
4444
<PrivateAssets>all</PrivateAssets>
4545
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4646
</PackageReference>

src/Agent/AzureAuth/AzureAuth.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.11.6" />
14-
<PackageReference Include="Microsoft.Identity.Client" Version="4.19.0" />
14+
<PackageReference Include="Microsoft.Identity.Client" Version="4.27.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

src/Agent/RESTlerAgent/RestlerAgent.fsproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="FsCheck" Version="2.14.3" />
21-
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.15.0" />
20+
<PackageReference Include="FsCheck" Version="2.15.1" />
21+
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
2222
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
23-
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.0.0" />
23+
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.1.2" />
2424
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.11.6" />
2525
</ItemGroup>
2626

src/Orchestrator/Orchestrator/Orchestrator.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ static Orchestrator()
125125
var resourceGroup = GetSetting("RAFT_CONTAINER_RUN_RESOURCE_GROUP");
126126

127127
var utilsStorageAccount = GetSetting("RAFT_UTILS_STORAGE");
128-
var utilsStorageAccountKey = OrchestratorLogic.ContainerInstances.getStorageKeyTask(azure, resourceGroup, utilsStorageAccount);
129-
utilsStorageAccountKey.Wait();
128+
var utilsStorageAccountKeyAndUri = OrchestratorLogic.ContainerInstances.getStorageKeyTask(azure, resourceGroup, utilsStorageAccount);
129+
utilsStorageAccountKeyAndUri.Wait();
130130

131131
var resultsStorageAccount = GetSetting("RAFT_RESULTS_STORAGE");
132-
var resultsStorageAccountKey = OrchestratorLogic.ContainerInstances.getStorageKeyTask(azure, resourceGroup, resultsStorageAccount);
133-
resultsStorageAccountKey.Wait();
132+
var resultsStorageAccountKeyAndUri = OrchestratorLogic.ContainerInstances.getStorageKeyTask(azure, resourceGroup, resultsStorageAccount);
133+
resultsStorageAccountKeyAndUri.Wait();
134134

135135

136136
var metricsKey = GetSetting("RAFT_METRICS_APP_INSIGHTS_KEY");
@@ -147,10 +147,13 @@ static Orchestrator()
147147
siteHash: GetSetting("RAFT_SITE_HASH"),
148148

149149
utilsStorageAccount: utilsStorageAccount,
150-
utilsStorageAccountKey: utilsStorageAccountKey.Result,
150+
utilsStorageAccountKey: utilsStorageAccountKeyAndUri.Result.Item1,
151+
utilsStorageAccountUri: utilsStorageAccountKeyAndUri.Result.Item2,
152+
151153
utilsFileShare: GetSetting("RAFT_UTILS_FILESHARE"),
152154
resultsStorageAccount: resultsStorageAccount,
153-
resultsStorageAccountKey: resultsStorageAccountKey.Result,
155+
resultsStorageAccountKey: resultsStorageAccountKeyAndUri.Result.Item1,
156+
resultsStorageAccountUri: resultsStorageAccountKeyAndUri.Result.Item2,
154157

155158
networkProfileName: GetSetting("RAFT_NETWORK_PROFILE_NAME"),
156159
vNetResourceGroup: GetSetting("RAFT_VNET_RESOURCE_GROUP")

src/Orchestrator/Orchestrator/Orchestrator.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="4.2.1" />
1414
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.0.1" />
1515
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.0.1" />
16-
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance.Fluent" Version="1.34.0" />
17-
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.0.0" />
18-
<PackageReference Include="Microsoft.Azure.Storage.Common" Version="11.2.2" />
16+
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance.Fluent" Version="1.37.1" />
17+
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.1.2" />
1918
</ItemGroup>
2019
<ItemGroup>
2120
<ProjectReference Include="..\OrchestratorLogic\OrchestratorLogic.fsproj" />

src/Orchestrator/OrchestratorLogic/Orchestrator.fs

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,11 @@ module ContainerInstances =
116116
UtilsStorageAccount: string
117117
UtilsStorageAccountKey: string
118118
UtilsFileShare: string
119+
UtilsStorageAccountUri : System.Uri
119120

120121
ResultsStorageAccount : string
121122
ResultsStorageAccountKey: string
123+
ResultsStorageAccountUri : System.Uri
122124

123125
NetworkProfileName: string
124126
VNetResourceGroup: string
@@ -236,22 +238,22 @@ module ContainerInstances =
236238
let getStorageKey (azure: IAzure) (resourceGroup: string, storageAccount: string) =
237239
async {
238240
let! storage = azure.StorageAccounts.GetByResourceGroupAsync(resourceGroup, storageAccount).ToAsync
241+
239242
let! keys = storage.GetKeysAsync().ToAsync
240243
let storageKey = keys.[0].Value
241-
return storageKey
244+
return storageKey, (System.Uri(storage.EndPoints.Primary.File))
242245
}
243246

244247
let getStorageKeyTask (azure: IAzure) (resourceGroup: string, storageAccount: string) =
245248
getStorageKey azure (resourceGroup, storageAccount) |> Async.StartAsTask
246249

247250
let initializeTools (agentConfig: AgentConfig) =
248251
async {
249-
let auth = Microsoft.Azure.Storage.Auth.StorageCredentials(agentConfig.UtilsStorageAccount, agentConfig.UtilsStorageAccountKey;)
250-
let account = Microsoft.Azure.Storage.CloudStorageAccount(auth, true)
251-
let sasUrl = account.ToString(true)
252+
let storageCredential = Azure.Storage.StorageSharedKeyCredential(agentConfig.UtilsStorageAccount, agentConfig.UtilsStorageAccountKey)
253+
let builder = Azure.Storage.Files.Shares.ShareUriBuilder(agentConfig.UtilsStorageAccountUri, ShareName = agentConfig.UtilsFileShare )
254+
let share = Azure.Storage.Files.Shares.ShareClient(builder.ToUri(), storageCredential)
255+
let directoryClient = share.GetDirectoryClient("tools")
252256

253-
let directoryClient = Azure.Storage.Files.Shares.ShareDirectoryClient(sasUrl, agentConfig.UtilsFileShare, "tools")
254-
255257
let asyncEnum = directoryClient.GetFilesAndDirectoriesAsync().GetAsyncEnumerator()
256258

257259
let rec loadAllConfigs(allConfigs) =
@@ -368,7 +370,7 @@ module ContainerInstances =
368370
+ (sprintf "%s/" storageAccountName)
369371
+ (sprintf "path/%s/protocol/" (Option.defaultValue containerGroupName rootFileShare))
370372

371-
let createJobShareAndFolders (logger: ILogger) (containerGroupName: string) (sasUrl: string) (jobCreateRequest: CreateJobRequest) =
373+
let createJobShareAndFolders (logger: ILogger) (containerGroupName: string) (getShare: string -> Azure.Storage.Files.Shares.ShareClient) (jobCreateRequest: CreateJobRequest) =
372374
async {
373375
let shareName, createSubDirectory, shareQuota =
374376
match jobCreateRequest.JobDefinition.RootFileShare with
@@ -390,9 +392,12 @@ module ContainerInstances =
390392
let logInfo format = Printf.kprintf logger.LogInformation format
391393
logInfo "Creating config fileshare: %s" shareName
392394

395+
let shareClient = getShare shareName
396+
let rootDirectory = shareClient.GetRootDirectoryClient()
397+
393398
let saveString(fileName: string) (data: string) =
394399
async {
395-
let file = Azure.Storage.Files.Shares.ShareFileClient(sasUrl, shareName, fileName)
400+
let file = rootDirectory.GetFileClient(fileName)
396401
let! _ = file.DeleteIfExistsAsync().ToAsync
397402

398403
let! _ = file.CreateAsync(int64 data.Length).ToAsync
@@ -403,7 +408,6 @@ module ContainerInstances =
403408
return ()
404409
}
405410

406-
let shareClient = Azure.Storage.Files.Shares.ShareClient(sasUrl, shareName)
407411
let! _ = shareClient.CreateIfNotExistsAsync(dict[], Nullable(shareQuota)).ToAsync
408412

409413
let! subDirectory = createSubDirectory(shareClient)
@@ -579,14 +583,15 @@ module ContainerInstances =
579583
let workVolume = jobCreateRequest.JobId
580584
let workDirectory = sprintf "/work-directory-%s" jobCreateRequest.JobId
581585

582-
let auth = Microsoft.Azure.Storage.Auth.StorageCredentials(agentConfig.ResultsStorageAccount, agentConfig.ResultsStorageAccountKey)
583-
let account = Microsoft.Azure.Storage.CloudStorageAccount(auth, true)
584-
let sasUrl = account.ToString(true)
586+
let getShare(shareName) =
587+
let storageCredential = Azure.Storage.StorageSharedKeyCredential(agentConfig.ResultsStorageAccount, agentConfig.ResultsStorageAccountKey)
588+
let builder = Azure.Storage.Files.Shares.ShareUriBuilder(agentConfig.ResultsStorageAccountUri, ShareName = shareName )
589+
Azure.Storage.Files.Shares.ShareClient(builder.ToUri(), storageCredential)
585590

586591
let makeToolConfig payload =
587592
getToolConfiguration dockerConfigs toolsConfigs payload
588593

589-
let! shareName = createJobShareAndFolders logger containerGroupName sasUrl jobCreateRequest
594+
let! shareName = createJobShareAndFolders logger containerGroupName getShare jobCreateRequest
590595

591596
jobCreateRequest.JobDefinition.TestTasks.Tasks
592597
|> Array.countBy(fun task -> task.ToolName)

src/Orchestrator/OrchestratorLogic/OrchestratorLogic.fsproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Azure.Core" Version="1.5.1" />
19-
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.4.0" />
20-
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.15.0" />
21-
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.15.0" />
18+
<PackageReference Include="Azure.Core" Version="1.10.0" />
19+
<PackageReference Include="Azure.Storage.Common" Version="12.7.0" />
20+
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.6.0" />
21+
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
22+
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.17.0" />
2223
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
23-
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance.Fluent" Version="1.34.0" />
24-
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.34.0" />
25-
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.34.0" />
26-
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.0.0" />
27-
<PackageReference Include="Microsoft.Azure.Storage.Common" Version="11.2.2" />
28-
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
24+
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance.Fluent" Version="1.37.1" />
25+
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.37.1" />
26+
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.37.1" />
27+
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.1.2" />
28+
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
2929
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.11.6" />
3030
</ItemGroup>
3131

src/Test/TestInfraLogic/TestInfraLogic.fsproj

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Azure.Core" Version="1.5.1" />
18-
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.4.0" />
19-
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.15.0" />
20-
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.15.0" />
17+
<PackageReference Include="Azure.Core" Version="1.10.0" />
18+
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.6.0" />
19+
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
20+
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.17.0" />
2121
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
22-
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance.Fluent" Version="1.34.0" />
23-
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.34.0" />
24-
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.34.0" />
25-
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.0.0" />
26-
<PackageReference Include="Microsoft.Azure.Storage.Common" Version="11.2.2" />
27-
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
22+
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance.Fluent" Version="1.37.1" />
23+
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.37.1" />
24+
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.37.1" />
25+
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.1.2" />
26+
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
2827
<PackageReference Include="Microsoft.FSharpLu.Json" Version="0.11.6" />
2928
</ItemGroup>
3029

30+
<ItemGroup>
31+
<PackageReference Update="FSharp.Core" Version="5.0.1" />
32+
</ItemGroup>
33+
3134
</Project>

0 commit comments

Comments
 (0)