Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit faaa5d2

Browse files
stishkinstas
andauthored
bump dependencies to latest (#1782)
remove/implement "cached todo" from some methods, Co-authored-by: stas <statis@microsoft.com>
1 parent 50637d4 commit faaa5d2

File tree

5 files changed

+86
-89
lines changed

5 files changed

+86
-89
lines changed

src/ApiService/ApiService/ApiService.csproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.3.0" OutputItemType="Analyzer" />
1616
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.6.0" />
1717
<PackageReference Include="Azure.Data.Tables" Version="12.5.0" />
18-
<PackageReference Include="Azure.ResourceManager.Compute" Version="1.0.0-beta.6" />
19-
<PackageReference Include="Azure.Core" Version="1.23.0" />
20-
<PackageReference Include="Azure.Identity" Version="1.5.0" />
21-
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.9.0" />
22-
<PackageReference Include="Azure.ResourceManager" Version="1.0.0-beta.8" />
23-
<PackageReference Include="Azure.ResourceManager.Network" Version="1.0.0-beta.5" />
24-
<PackageReference Include="Azure.ResourceManager.Resources" Version="1.0.0-beta.6" />
25-
<PackageReference Include="Azure.ResourceManager.Storage" Version="1.0.0-beta.6" />
18+
<PackageReference Include="Azure.ResourceManager.Compute" Version="1.0.0-beta.8" />
19+
<PackageReference Include="Azure.Core" Version="1.24.0" />
20+
<PackageReference Include="Azure.Identity" Version="1.6.0" />
21+
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.10.0" />
22+
<PackageReference Include="Azure.ResourceManager" Version="1.0.0" />
23+
<PackageReference Include="Azure.ResourceManager.Network" Version="1.0.0-beta.7" />
24+
<PackageReference Include="Azure.ResourceManager.Resources" Version="1.0.0" />
25+
<PackageReference Include="Azure.ResourceManager.Storage" Version="1.0.0-beta.8" />
2626
<PackageReference Include="Azure.Storage.Queues" Version="12.9.0" />
27-
<PackageReference Include="Microsoft.Graph" Version="4.20.0" />
28-
<PackageReference Include="Microsoft.Identity.Client" Version="4.42.0" />
29-
<PackageReference Include="Microsoft.Identity.Web.TokenCache" Version="1.23.0" />
30-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.16.0" />
27+
<PackageReference Include="Microsoft.Graph" Version="4.24.0" />
28+
<PackageReference Include="Microsoft.Identity.Client" Version="4.43.0" />
29+
<PackageReference Include="Microsoft.Identity.Web.TokenCache" Version="1.23.1" />
30+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.17.0" />
3131
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
3232
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.SignalRService" Version="1.7.0" />
3333
</ItemGroup>

src/ApiService/ApiService/onefuzzlib/Creds.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public DefaultAzureCredential GetIdentity()
2525
return new DefaultAzureCredential();
2626
}
2727

28-
// TODO: @cached
2928
public string GetSubcription()
3029
{
3130
var storageResourceId = EnvironmentVariables.OneFuzz.DataStorage
@@ -34,7 +33,6 @@ public string GetSubcription()
3433
return storageResource.SubscriptionId!;
3534
}
3635

37-
// TODO: @cached
3836
public string GetBaseResourceGroup()
3937
{
4038
var storageResourceId = EnvironmentVariables.OneFuzz.DataStorage

src/ApiService/ApiService/onefuzzlib/Storage.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,29 @@ public interface IStorage
2626
public class Storage : IStorage
2727
{
2828
private ICreds _creds;
29+
private ArmClient _armClient;
2930

3031
public Storage(ICreds creds)
3132
{
3233
_creds = creds;
34+
_armClient = new ArmClient(credential: _creds.GetIdentity(), defaultSubscriptionId: _creds.GetSubcription());
3335
}
3436

35-
// TODO: @cached
3637
public static string GetFuncStorage()
3738
{
3839
return EnvironmentVariables.OneFuzz.FuncStorage
3940
?? throw new Exception("Func storage env var is missing");
4041
}
4142

42-
// TODO: @cached
4343
public static string GetFuzzStorage()
4444
{
4545
return EnvironmentVariables.OneFuzz.DataStorage
4646
?? throw new Exception("Fuzz storage env var is missing");
4747
}
4848

49-
// TODO: @cached
5049
public ArmClient GetMgmtClient()
5150
{
52-
return new ArmClient(credential: _creds.GetIdentity(), defaultSubscriptionId: _creds.GetSubcription());
51+
return _armClient;
5352
}
5453

5554
// TODO: @cached
@@ -63,7 +62,7 @@ public IEnumerable<string> CorpusAccounts(ILogTracer log)
6362

6463
const string storageTypeTagKey = "storage_type";
6564

66-
var resourceGroup = client.GetResourceGroup(group);
65+
var resourceGroup = client.GetResourceGroupResource(group);
6766
foreach (var account in resourceGroup.GetStorageAccounts())
6867
{
6968
if (account.Id == skip)
@@ -109,7 +108,7 @@ public string GetPrimaryAccount(StorageType storageType)
109108
{
110109
var resourceId = new ResourceIdentifier(accountId);
111110
var armClient = GetMgmtClient();
112-
var storageAccount = armClient.GetStorageAccount(resourceId);
111+
var storageAccount = armClient.GetStorageAccountResource(resourceId);
113112
var key = storageAccount.GetKeys().Value.Keys.FirstOrDefault();
114113
return (resourceId.Name, key?.Value);
115114
}

src/ApiService/ApiService/onefuzzlib/orm/StorageProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public async Task<TableClient> GetTableClient(string table)
4444
public (string?, string?) GetStorageAccountNameAndKey(string accountId)
4545
{
4646
var resourceId = new ResourceIdentifier(accountId);
47-
var storageAccount = _armClient.GetStorageAccount(resourceId);
47+
var storageAccount = _armClient.GetStorageAccountResource(resourceId);
4848
var key = storageAccount.GetKeys().Value.Keys.FirstOrDefault();
4949
return (resourceId.Name, key?.Value);
5050
}

src/ApiService/ApiService/packages.lock.json

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"net6.0": {
55
"Azure.Core": {
66
"type": "Direct",
7-
"requested": "[1.23.0, )",
8-
"resolved": "1.23.0",
9-
"contentHash": "myulcGStD89NN7BUhAjkcfDhIvRj2UUwZHEgjB50pL3vb0LEunrtinxKqUGUuOheQVCHlILKLNoUeCThQ1iCOg==",
7+
"requested": "[1.24.0, )",
8+
"resolved": "1.24.0",
9+
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
1010
"dependencies": {
1111
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
1212
"System.Diagnostics.DiagnosticSource": "4.6.0",
@@ -29,81 +29,81 @@
2929
},
3030
"Azure.Identity": {
3131
"type": "Direct",
32-
"requested": "[1.5.0, )",
33-
"resolved": "1.5.0",
34-
"contentHash": "VfF88dqrgKXZNOS/y4XrX/jmIfP3pkY+hBUzBNpoKml1nR+QshX6XlXWyToLtWV80TDQ1CmUVCJksktDg5+j1w==",
32+
"requested": "[1.6.0, )",
33+
"resolved": "1.6.0",
34+
"contentHash": "EycyMsb6rD2PK9P0SyibFfEhvWWttdrYhyPF4f41uzdB/44yQlV+2Wehxyg489Rj6gbPvSPgbKq0xsHJBhipZA==",
3535
"dependencies": {
36-
"Azure.Core": "1.20.0",
37-
"Microsoft.Identity.Client": "4.30.1",
38-
"Microsoft.Identity.Client.Extensions.Msal": "2.18.4",
36+
"Azure.Core": "1.24.0",
37+
"Microsoft.Identity.Client": "4.39.0",
38+
"Microsoft.Identity.Client.Extensions.Msal": "2.19.3",
3939
"System.Memory": "4.5.4",
40-
"System.Security.Cryptography.ProtectedData": "4.5.0",
41-
"System.Text.Json": "4.6.0",
40+
"System.Security.Cryptography.ProtectedData": "4.7.0",
41+
"System.Text.Json": "4.7.2",
4242
"System.Threading.Tasks.Extensions": "4.5.4"
4343
}
4444
},
4545
"Azure.Messaging.EventGrid": {
4646
"type": "Direct",
47-
"requested": "[4.9.0, )",
48-
"resolved": "4.9.0",
49-
"contentHash": "ooM1/ueb5pVIf+/BmS/SQKGW0LuP2Rn1Zc+RasCF0aMkJ5/kbc4ZXVrUd2YQlDaoeUOTJGSLs/VoGv0W1GiS5g==",
47+
"requested": "[4.10.0, )",
48+
"resolved": "4.10.0",
49+
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
5050
"dependencies": {
51-
"Azure.Core": "1.22.0",
51+
"Azure.Core": "1.24.0",
5252
"System.Memory.Data": "1.0.2",
5353
"System.Text.Json": "4.7.2"
5454
}
5555
},
5656
"Azure.ResourceManager": {
5757
"type": "Direct",
58-
"requested": "[1.0.0-beta.8, )",
59-
"resolved": "1.0.0-beta.8",
60-
"contentHash": "L8fYEV5kjP+BY1d9J7/hzQ/IHr1capJn9gkhzAEY4BPvMFTE9Aqsbb3p06r+iItcLP0y87eacQodfyPczADXVg==",
58+
"requested": "[1.0.0, )",
59+
"resolved": "1.0.0",
60+
"contentHash": "UGaoiPcJ8a9Et030+F3zc2KhTssPAgPm7uXm4E9kyNI4jYYenUe6zj2J1bTimaTfcOZnn5scSjSYxKtZCzftcA==",
6161
"dependencies": {
62-
"Azure.Core": "1.22.0",
62+
"Azure.Core": "1.24.0",
6363
"System.Text.Json": "4.7.2"
6464
}
6565
},
6666
"Azure.ResourceManager.Compute": {
6767
"type": "Direct",
68-
"requested": "[1.0.0-beta.6, )",
69-
"resolved": "1.0.0-beta.6",
70-
"contentHash": "equl7PjMwhmFFj3qewcK+2kqbEQUM64elLan6jPIxRbHQkQ/QOm/mHRWuTerW0BdUvj48e+odB6gJc4wW0aZbQ==",
68+
"requested": "[1.0.0-beta.8, )",
69+
"resolved": "1.0.0-beta.8",
70+
"contentHash": "rYYjjmEdmcOa8O4UgO/bdJ/qQclNZjuHdalxRJ0AhUHCORcM1f1BbIKR9CoN83IpfuEE+X+n5XY9QZcKvfrGVA==",
7171
"dependencies": {
72-
"Azure.Core": "1.22.0",
73-
"Azure.ResourceManager": "1.0.0-beta.8",
72+
"Azure.Core": "1.24.0",
73+
"Azure.ResourceManager": "1.0.0",
7474
"System.Text.Json": "4.7.2"
7575
}
7676
},
7777
"Azure.ResourceManager.Network": {
7878
"type": "Direct",
79-
"requested": "[1.0.0-beta.5, )",
80-
"resolved": "1.0.0-beta.5",
81-
"contentHash": "F7p/eZatJ+8hPfHR+98LgNJC+nBH4GBDtluLk+ubgIF84DZ9KMjRSkvyv4d6Y9k8jHh8qYRt4lUUMpdwseSutA==",
79+
"requested": "[1.0.0-beta.7, )",
80+
"resolved": "1.0.0-beta.7",
81+
"contentHash": "Ih8tb6OwxEEEEXATVzgX6oHJzVr9p4X6GfOfBnNAI3aIt9+G8blyQLltaCcJAGJ+dO1sBT/Nalgj/HinO+cBlw==",
8282
"dependencies": {
83-
"Azure.Core": "1.21.0",
84-
"Azure.ResourceManager": "1.0.0-beta.7",
85-
"System.Text.Json": "4.6.0"
83+
"Azure.Core": "1.24.0",
84+
"Azure.ResourceManager": "1.0.0",
85+
"System.Text.Json": "4.7.2"
8686
}
8787
},
8888
"Azure.ResourceManager.Resources": {
8989
"type": "Direct",
90-
"requested": "[1.0.0-beta.6, )",
91-
"resolved": "1.0.0-beta.6",
92-
"contentHash": "tKGuoj5WXte2YZWSfYVertSr8zAjg1pRqoRZkRPfntzSqBrTx7BrspEh6iNZyJngW0L33LOlHcvCvvosz0WJGQ==",
90+
"requested": "[1.0.0, )",
91+
"resolved": "1.0.0",
92+
"contentHash": "oNQRWfh05v9BiY8DMQjV+++kVafR+3ry2FGfMKObovKNfAb4i5J6DQpv0CUIx4jeIZe0fnhxyXRRCe293YtMqw==",
9393
"dependencies": {
94-
"Azure.Core": "1.22.0",
95-
"Azure.ResourceManager": "1.0.0-beta.8",
94+
"Azure.Core": "1.24.0",
95+
"Azure.ResourceManager": "1.0.0",
9696
"System.Text.Json": "4.7.2"
9797
}
9898
},
9999
"Azure.ResourceManager.Storage": {
100100
"type": "Direct",
101-
"requested": "[1.0.0-beta.6, )",
102-
"resolved": "1.0.0-beta.6",
103-
"contentHash": "zsBSj+cfBAgYzWAD7fRbTqyA7cALUeCeE2Tk34og2ZathKUl0Ngriki53u0dMif2LTkfKrO0UiBgyiNaeU/ixw==",
101+
"requested": "[1.0.0-beta.8, )",
102+
"resolved": "1.0.0-beta.8",
103+
"contentHash": "tlVqStqG53lyGxr0dRq2KSkFdeC/+NQImWgsRXD9o5R4qBia4cx7zAGYBlnDeUxh1WldSZF5ZsBi2n5SAwxbxQ==",
104104
"dependencies": {
105-
"Azure.Core": "1.22.0",
106-
"Azure.ResourceManager": "1.0.0-beta.8",
105+
"Azure.Core": "1.24.0",
106+
"Azure.ResourceManager": "1.0.0",
107107
"System.Text.Json": "4.7.2"
108108
}
109109
},
@@ -200,40 +200,40 @@
200200
},
201201
"Microsoft.Graph": {
202202
"type": "Direct",
203-
"requested": "[4.20.0, )",
204-
"resolved": "4.20.0",
205-
"contentHash": "Pf8hdObmX3qF0AREu9e4dnk7inc3Pfw/sI/6l4RGTWDoORpP3Oyh0JoT/TJ+VIUaDk0W4fCUS0zSKhLpOr2UsQ==",
203+
"requested": "[4.24.0, )",
204+
"resolved": "4.24.0",
205+
"contentHash": "OPyHQ+EzuYjp3XExGB0SvySXY3pxU+bXLl3ADdvje/yOMFvpNOpEu111tmh2aM/RCplaoMQjBA5oa9pUVIH0cg==",
206206
"dependencies": {
207207
"Microsoft.Graph.Core": "2.0.8"
208208
}
209209
},
210210
"Microsoft.Identity.Client": {
211211
"type": "Direct",
212-
"requested": "[4.42.0, )",
213-
"resolved": "4.42.0",
214-
"contentHash": "BQeEI4mKDJaludUZwZXfmAs7y1Lhkbm81KDg4Q3JWY8tXi5S7vFFJ4+xcrZtEEuqtDnyhP+Yx0u+1PeOALuTGA=="
212+
"requested": "[4.43.0, )",
213+
"resolved": "4.43.0",
214+
"contentHash": "uaUMZB3Ywi7IPVvgRZOQotlYhD8sA4wtZESkA0qF9SYAifr1RzJyaGTFtfbAyZ/J5kGUhRklrCJIRpd0MaihKQ=="
215215
},
216216
"Microsoft.Identity.Web.TokenCache": {
217217
"type": "Direct",
218-
"requested": "[1.23.0, )",
219-
"resolved": "1.23.0",
220-
"contentHash": "hk4x8v0fjfjxsYwUtamuYczlZS9zyk+g8tlaPFnEPo7ldFJjf/w912faFPqcDJoC8Va5Ykyw1prdQouORAn9zg==",
218+
"requested": "[1.23.1, )",
219+
"resolved": "1.23.1",
220+
"contentHash": "fU85i6XDUXL/z6B+pTmNZbof0hL9Jkgsi6GWpQEWjL7Ek0GH0A8btxbqzojPCRdGN7EK/vyEVu5Smy9/spZj2g==",
221221
"dependencies": {
222222
"Microsoft.AspNetCore.DataProtection": "5.0.8",
223223
"Microsoft.Extensions.Caching.Memory": "5.0.0",
224224
"Microsoft.Extensions.Logging": "5.0.0",
225-
"Microsoft.Identity.Client": "4.41.0",
225+
"Microsoft.Identity.Client": "4.42.0",
226226
"System.Text.Encodings.Web": "5.0.1"
227227
}
228228
},
229229
"System.IdentityModel.Tokens.Jwt": {
230230
"type": "Direct",
231-
"requested": "[6.16.0, )",
232-
"resolved": "6.16.0",
233-
"contentHash": "QnZUawkmLkzEhwgvlqcm2YNAoRgz27zVY+2LzMBMWMcfFhl2Sv8aavZOeuFMofmYJsST9h7BilOn7MzFSUMihQ==",
231+
"requested": "[6.17.0, )",
232+
"resolved": "6.17.0",
233+
"contentHash": "G3rY4WLr54Mo+97+AEq0ANpiKvW7E8Qu5bKWfVMa7rkyJtvrOxUqp/OLqrGw/6JDbD5GlxnAtFKukGteUuB0rQ==",
234234
"dependencies": {
235-
"Microsoft.IdentityModel.JsonWebTokens": "6.16.0",
236-
"Microsoft.IdentityModel.Tokens": "6.16.0"
235+
"Microsoft.IdentityModel.JsonWebTokens": "6.17.0",
236+
"Microsoft.IdentityModel.Tokens": "6.17.0"
237237
}
238238
},
239239
"System.Linq.Async": {
@@ -691,25 +691,25 @@
691691
},
692692
"Microsoft.Identity.Client.Extensions.Msal": {
693693
"type": "Transitive",
694-
"resolved": "2.18.4",
695-
"contentHash": "HpG4oLwhQsy0ce7OWq9iDdLtJKOvKRStIKoSEOeBMKuohfuOWNDyhg8fMAJkpG/kFeoe4J329fiMHcJmmB+FPw==",
694+
"resolved": "2.19.3",
695+
"contentHash": "zVVZjn8aW7W79rC1crioDgdOwaFTQorsSO6RgVlDDjc7MvbEGz071wSNrjVhzR0CdQn6Sefx7Abf1o7vasmrLg==",
696696
"dependencies": {
697-
"Microsoft.Identity.Client": "4.30.0",
697+
"Microsoft.Identity.Client": "4.38.0",
698698
"System.Security.Cryptography.ProtectedData": "4.5.0"
699699
}
700700
},
701701
"Microsoft.IdentityModel.JsonWebTokens": {
702702
"type": "Transitive",
703-
"resolved": "6.16.0",
704-
"contentHash": "FJtXVXvjoza64VPFOPBxqnhe0yyQ5B/7A09+RpTXIzowr5+A4xcX42patsLrNGmFUvXZAHhS2u/6ojTzhYatpg==",
703+
"resolved": "6.17.0",
704+
"contentHash": "I3cSVE185qF3a222/iQIdmBFhrhZBtz7wZ1RUUbMuHC1un79XCI7vggbWdmbqIttFcUoeziemadO6t+3FLjcSA==",
705705
"dependencies": {
706-
"Microsoft.IdentityModel.Tokens": "6.16.0"
706+
"Microsoft.IdentityModel.Tokens": "6.17.0"
707707
}
708708
},
709709
"Microsoft.IdentityModel.Logging": {
710710
"type": "Transitive",
711-
"resolved": "6.16.0",
712-
"contentHash": "Fuo5SpYUpFRw90hBM3PDA1uQsrHmbIaxvwkldJcfi0O51gz/qjSFMe8136NFRoKA3NxZZScpz/47oFkRU2WA/A=="
711+
"resolved": "6.17.0",
712+
"contentHash": "Ix6/CMLDoo939NDf1ARDuGK6YERY7pAX9WYbfwb4gZqx7r52unMFIykJk+zlEBX7jjtbDz/0uzikQFvheV9KsQ=="
713713
},
714714
"Microsoft.IdentityModel.Protocols": {
715715
"type": "Transitive",
@@ -731,11 +731,11 @@
731731
},
732732
"Microsoft.IdentityModel.Tokens": {
733733
"type": "Transitive",
734-
"resolved": "6.16.0",
735-
"contentHash": "dL7r4bdRbDG0RmyYGw9cpO/pA3GVaxV+lI1ConYuQuRiAxd1ONFlxHue1o8wR8+lEB972cekzfj45WSNaq3+xA==",
734+
"resolved": "6.17.0",
735+
"contentHash": "mhOe+d9BQg5U45TkTCyXAFOjl7RvwaFj6v9qo8b+WFolkuGsfjSFfQ+WI9D3ho9sD/fK75gvL4JptmjLzyUPkw==",
736736
"dependencies": {
737737
"Microsoft.CSharp": "4.5.0",
738-
"Microsoft.IdentityModel.Logging": "6.16.0",
738+
"Microsoft.IdentityModel.Logging": "6.17.0",
739739
"System.Security.Cryptography.Cng": "4.5.0"
740740
}
741741
},
@@ -950,8 +950,8 @@
950950
},
951951
"System.Security.Cryptography.ProtectedData": {
952952
"type": "Transitive",
953-
"resolved": "4.5.0",
954-
"contentHash": "wLBKzFnDCxP12VL9ANydSYhk59fC4cvOr9ypYQLPnAj48NQIhqnjdD2yhP8yEKyBJEjERWS9DisKL7rX5eU25Q=="
953+
"resolved": "4.7.0",
954+
"contentHash": "ehYW0m9ptxpGWvE4zgqongBVWpSDU/JCFD4K7krxkQwSz/sFQjEXCUqpvencjy6DYDbn7Ig09R8GFffu8TtneQ=="
955955
},
956956
"System.Security.Cryptography.Xml": {
957957
"type": "Transitive",

0 commit comments

Comments
 (0)