Skip to content

Commit fe48efd

Browse files
authored
Merge branch 'main' into native-cancellation-tokens
2 parents d15c80f + 366d010 commit fe48efd

File tree

19 files changed

+114
-64
lines changed

19 files changed

+114
-64
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ jobs:
2323
uses: actions/setup-dotnet@v3
2424
with:
2525
dotnet-version: |
26-
3.1.x
2726
8.0.x
2827
- name: Build
2928
run: dotnet build
30-
- uses: actions/upload-artifact@v3
29+
- uses: actions/upload-artifact@v4
3130
with:
32-
name: build_output
31+
name: build_log_${{ matrix.os }}
3332
retention-days: 1
3433
path: |
3534
**/*.binlog
@@ -55,17 +54,16 @@ jobs:
5554
uses: actions/setup-dotnet@v3
5655
with:
5756
dotnet-version: |
58-
3.1.x
5957
8.0.x
6058
- name: Test
61-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
59+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
6260
env:
6361
ORLEANSREDISCONNECTIONSTRING: "localhost:6379,ssl=False,abortConnect=False"
6462
- name: Archive Test Results
6563
if: always()
66-
uses: actions/upload-artifact@v3
64+
uses: actions/upload-artifact@v4
6765
with:
68-
name: test_output
66+
name: test_output_${{ github.job }}
6967
retention-days: 1
7068
path: |
7169
**/TestResults/*
@@ -83,17 +81,16 @@ jobs:
8381
uses: actions/setup-dotnet@v3
8482
with:
8583
dotnet-version: |
86-
3.1.x
8784
8.0.x
8885
- name: Test
89-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Clustering)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
86+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Clustering)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
9087
env:
9188
CASSANDRAVERSION: ${{ matrix.dbversion }}
9289
- name: Archive Test Results
9390
if: always()
94-
uses: actions/upload-artifact@v3
91+
uses: actions/upload-artifact@v4
9592
with:
96-
name: test_output
93+
name: test_output_${{ github.job }}_${{ matrix.dbversion }}
9794
retention-days: 1
9895
path: |
9996
**/TestResults/*
@@ -123,18 +120,17 @@ jobs:
123120
uses: actions/setup-dotnet@v3
124121
with:
125122
dotnet-version: |
126-
3.1.x
127123
8.0.x
128124
- name: Test
129-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
125+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
130126
env:
131127
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="False positive")]
132128
ORLEANSPOSTGRESCONNECTIONSTRING: "Server=127.0.0.1;Port=5432;Pooling=false;User Id=postgres;Password=postgres;SSL Mode=Disable"
133129
- name: Archive Test Results
134130
if: always()
135-
uses: actions/upload-artifact@v3
131+
uses: actions/upload-artifact@v4
136132
with:
137-
name: test_output
133+
name: test_output_${{ github.job }}
138134
retention-days: 1
139135
path: |
140136
**/TestResults/*
@@ -159,18 +155,17 @@ jobs:
159155
uses: actions/setup-dotnet@v3
160156
with:
161157
dotnet-version: |
162-
3.1.x
163158
8.0.x
164159
- name: Test
165-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
160+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
166161
env:
167162
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
168163
ORLEANSMYSQLCONNECTIONSTRING: "Server=127.0.0.1;Port=3306;UId=root;Pwd=mariadb;"
169164
- name: Archive Test Results
170165
if: always()
171-
uses: actions/upload-artifact@v3
166+
uses: actions/upload-artifact@v4
172167
with:
173-
name: test_output
168+
name: test_output_${{ github.job }}
174169
retention-days: 1
175170
path: |
176171
**/TestResults/*
@@ -197,18 +192,17 @@ jobs:
197192
uses: actions/setup-dotnet@v3
198193
with:
199194
dotnet-version: |
200-
3.1.x
201195
8.0.x
202196
- name: Test
203-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
197+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
204198
env:
205199
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
206200
ORLEANSMSSQLCONNECTIONSTRING: "Server=127.0.0.1,1433;User Id=SA;Password=yourWeak(!)Password;"
207201
- name: Archive Test Results
208202
if: always()
209-
uses: actions/upload-artifact@v3
203+
uses: actions/upload-artifact@v4
210204
with:
211-
name: test_output
205+
name: test_output_${{ github.job }}
212206
retention-days: 1
213207
path: |
214208
**/TestResults/*
@@ -235,20 +229,19 @@ jobs:
235229
uses: actions/setup-dotnet@v3
236230
with:
237231
dotnet-version: |
238-
3.1.x
239232
8.0.x
240233
- name: Test
241-
run: dotnet test --filter "Category=${{ matrix.provider }}&Category=${{ matrix.suite }}" --framework ${{ matrix.framework }} --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
234+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&Category=${{ matrix.suite }}" --framework ${{ matrix.framework }} --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
242235
env:
243236
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
244237
# [SuppressMessage("Microsoft.Security", "CSCAN0090:ConfigFile", Justification="Not a secret")]
245238
# [SuppressMessage("Microsoft.Security", "CSCAN0220:DefaultPasswordContexts", Justification="Not a secret")]
246239
ORLEANSDATACONNECTIONSTRING: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;"
247240
- name: Archive Test Results
248241
if: always()
249-
uses: actions/upload-artifact@v3
242+
uses: actions/upload-artifact@v4
250243
with:
251-
name: test_output
244+
name: test_output_${{ github.job }}
252245
retention-days: 1
253246
path: |
254247
**/TestResults/*
@@ -284,17 +277,17 @@ jobs:
284277
$IPAddress = "127.0.0.1" #(Get-NetIPAddress -AddressFamily IPV4 -AddressState Preferred -PrefixOrigin Manual | Select-Object IPAddress -First 1).IPAddress ?? "127.0.0.1"
285278
Add-Content -Path $env:GITHUB_ENV -Value "ORLEANSCOSMOSDBACCOUNTENDPOINT=https://$($IPAddress):8081/"
286279
- name: Test
287-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --framework ${{ matrix.framework }} --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
280+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --framework ${{ matrix.framework }} --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
288281
env:
289282
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
290283
#ORLEANSCOSMOSDBACCOUNTENDPOINT: "https://127.0.0.1:8081/"
291284
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
292285
ORLEANSCOSMOSDBACCOUNTKEY: "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="
293286
- name: Archive Test Results
294287
if: always()
295-
uses: actions/upload-artifact@v3
288+
uses: actions/upload-artifact@v4
296289
with:
297-
name: test_output
290+
name: test_output_${{ github.job }}
298291
retention-days: 1
299292
path: |
300293
**/TestResults/*
@@ -318,20 +311,19 @@ jobs:
318311
uses: actions/setup-dotnet@v3
319312
with:
320313
dotnet-version: |
321-
3.1.x
322314
8.0.x
323315
- name: Test
324-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
316+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
325317
env:
326318
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
327319
# [SuppressMessage("Microsoft.Security", "CSCAN0090:ConfigFile", Justification="Not a secret")]
328320
# [SuppressMessage("Microsoft.Security", "CSCAN0220:DefaultPasswordContexts", Justification="Not a secret")]
329321
ORLEANSCONSULCONNECTIONSTRING: "http://localhost:8500"
330322
- name: Archive Test Results
331323
if: always()
332-
uses: actions/upload-artifact@v3
324+
uses: actions/upload-artifact@v4
333325
with:
334-
name: test_output
326+
name: test_output_${{ github.job }}
335327
retention-days: 1
336328
path: |
337329
**/TestResults/*
@@ -355,17 +347,16 @@ jobs:
355347
uses: actions/setup-dotnet@v3
356348
with:
357349
dotnet-version: |
358-
3.1.x
359350
8.0.x
360351
- name: Test
361-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
352+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
362353
env:
363354
ORLEANSZOOKEEPERCONNECTIONSTRING: "localhost:2181"
364355
- name: Archive Test Results
365356
if: always()
366-
uses: actions/upload-artifact@v3
357+
uses: actions/upload-artifact@v4
367358
with:
368-
name: test_output
359+
name: test_output_${{ github.job }}
369360
retention-days: 1
370361
path: |
371362
**/TestResults/*
@@ -393,10 +384,9 @@ jobs:
393384
uses: actions/setup-dotnet@v3
394385
with:
395386
dotnet-version: |
396-
3.1.x
397387
8.0.x
398388
- name: Test
399-
run: dotnet test --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
389+
run: dotnet test --framework net8.0 --filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)" --blame-hang-timeout 10m --logger "trx" -- -parallel none -noshadow
400390
env:
401391
ORLEANSDYNAMODBSERVICE: "http://127.0.0.1:8000"
402392
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
@@ -405,9 +395,9 @@ jobs:
405395
ORLEANSDYNAMODBSECRETKEY: "pass"
406396
- name: Archive Test Results
407397
if: always()
408-
uses: actions/upload-artifact@v3
398+
uses: actions/upload-artifact@v4
409399
with:
410-
name: test_output
400+
name: test_output_${{ github.job }}
411401
retention-days: 1
412402
path: |
413403
**/TestResults/*

Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
<!-- Enable code generator -->
1111
<ProjectReference
1212
Include="$(SourceRoot)src/Orleans.CodeGenerator/Orleans.CodeGenerator.csproj"
13-
ReferenceOutputAssembly="false"
1413
OutputItemType="Analyzer"
14+
PrivateAssets="None"
1515
Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' "/>
1616
<ProjectReference
1717
Include="$(SourceRoot)src/Orleans.Analyzers/Orleans.Analyzers.csproj"
18-
ReferenceOutputAssembly="false"
1918
AssetTargetFallback="netstandard2.0"
2019
UndefineProperties="TargetFramework"
2120
SkipGetTargetFrameworkProperties="true"
2221
OutputItemType="Analyzer"
22+
PrivateAssets="None"
2323
Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' "/>
2424
</ItemGroup>
2525

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
33
"rollForward": "major",
4-
"version": "8.0.101"
4+
"version": "8.0.405"
55
}
66
}

playground/Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
<PropertyGroup>
99
<IsPackable>false</IsPackable>
10+
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
11+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
1012
<GenerateDocumentationFile>false</GenerateDocumentationFile>
1113
<ServerGarbageCollection>true</ServerGarbageCollection>
1214
<ImplicitUsings>enable</ImplicitUsings>

src/Azure/Orleans.Persistence.Cosmos/CosmosGrainStorage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public async Task ReadStateAsync<T>(string grainType, GrainId grainId, IGrainSta
7575
}
7676
else
7777
{
78-
grainState.State = ActivatorUtilities.CreateInstance<T>(_serviceProvider);
78+
grainState.State = Activator.CreateInstance<T>();
7979
grainState.RecordExists = false;
8080
}
8181

@@ -86,7 +86,7 @@ public async Task ReadStateAsync<T>(string grainType, GrainId grainId, IGrainSta
8686
if (dce.StatusCode == HttpStatusCode.NotFound)
8787
{
8888
// State is new, just activate a default and return
89-
grainState.State = ActivatorUtilities.CreateInstance<T>(_serviceProvider);
89+
grainState.State = Activator.CreateInstance<T>();
9090
grainState.RecordExists = false;
9191
return;
9292
}

src/Azure/Orleans.Persistence.Cosmos/CosmosStorageOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class CosmosGrainStorageOptions : CosmosOptions
1717
public int InitStage { get; set; } = DEFAULT_INIT_STAGE;
1818

1919
/// <summary>
20-
/// Gets or sets a value indicating whether state should be deleted when <see cref="IStorage.ClearStateAsync"/> is called.
20+
/// Gets or sets a value indicating whether state should be deleted when <see cref="IStorage.ClearStateAsync()"/> is called.
2121
/// </summary>
2222
public bool DeleteStateOnClear { get; set; }
2323

src/Orleans.CodeGenerator/CodeGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using Microsoft.CodeAnalysis.CSharp.Syntax;
1010
using Orleans.CodeGenerator.Diagnostics;
1111
using Orleans.CodeGenerator.Hashing;
12+
using Orleans.CodeGenerator.Model;
1213
using Orleans.CodeGenerator.SyntaxGeneration;
1314
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
1415
using static Orleans.CodeGenerator.SyntaxGeneration.SymbolExtensions;

src/Orleans.CodeGenerator/FieldIdAssignmentHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Text;
99
using Microsoft.CodeAnalysis;
1010
using Orleans.CodeGenerator.Hashing;
11+
using Orleans.CodeGenerator.Model;
1112
using Orleans.CodeGenerator.SyntaxGeneration;
1213

1314
namespace Orleans.CodeGenerator;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace Orleans.CodeGenerator.Model;
2+
3+
/// <summary>
4+
/// This enum provides options for controlling the field id generation logic.
5+
/// </summary>
6+
public enum GenerateFieldIds
7+
{
8+
/// <summary>
9+
/// Only members explicitly annotated with a field id will be serialized. This is the default.
10+
/// </summary>
11+
None,
12+
/// <summary>
13+
/// Field ids will be automatically assigned to eligible public properties. To qualify, a property must have an accessible getter, and either an accessible setter or a corresponding constructor parameter.
14+
/// </summary>
15+
/// <remarks>
16+
/// The presence of an explicit field id annotation on any member of a type will automatically disable automatic field id generation for that type.
17+
/// </remarks>
18+
PublicProperties
19+
}

src/Orleans.CodeGenerator/Orleans.CodeGenerator.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252
<AutoGen>True</AutoGen>
5353
<DependentUpon>Resources.resx</DependentUpon>
5454
</Compile>
55-
<Compile Include="..\Orleans.Serialization.Abstractions\GenerateFieldIds.cs">
56-
<Link>Model\GenerateFieldIds.cs</Link>
57-
</Compile>
5855
</ItemGroup>
5956

6057
<ItemGroup>

0 commit comments

Comments
 (0)