From 853b3fc106e53793c056a10b65b14621c192c5f3 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Fri, 14 Jun 2024 02:56:56 +0200 Subject: [PATCH] Commit some forgotten pkl-related changes (#3616) --- .github/build-workflows.ps1 | 3 +++ .github/pkl-workflows/Readme.md | 2 ++ .../AsymmetricObjectWithAllTypes_generated.cs | 1 - ...symmetricObjectWithEmbeddedDictionaryObject_generated.cs | 1 - .../AsymmetricObjectWithEmbeddedListObject_generated.cs | 1 - ...AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs | 1 - .../BasicAsymmetricObject_generated.cs | 1 - .../Dotnet_3597_Old_generated.cs | 1 + .../Dotnet_3597_generated.cs | 3 ++- Tools/DeployApps/BaasClient.cs | 6 ++---- 10 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 .github/build-workflows.ps1 diff --git a/.github/build-workflows.ps1 b/.github/build-workflows.ps1 new file mode 100644 index 0000000000..2da93619d1 --- /dev/null +++ b/.github/build-workflows.ps1 @@ -0,0 +1,3 @@ +Get-ChildItem -Path './pkl-workflows' -Filter *.pkl -File -Name | ForEach-Object { + &pkl eval ./pkl-workflows/$_ -o "./workflows/$($_.Replace('pkl', 'yml'))" +} \ No newline at end of file diff --git a/.github/pkl-workflows/Readme.md b/.github/pkl-workflows/Readme.md index dce79a1387..194b251ecb 100644 --- a/.github/pkl-workflows/Readme.md +++ b/.github/pkl-workflows/Readme.md @@ -14,6 +14,8 @@ brew install pkl ## Building the workflows +Run `pwsh .github/build-workflows.ps1` or the following bash script if you don't have/use powershell: + ```bash cd $SolutionDir/.github/pkl-workflows for file in *.pkl ; do pkl eval $file -o ../workflows/$(echo $file | sed s/pkl/yml/) ; done diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs index 1fa4e687e6..33b7c863d1 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithAllTypes_generated.cs @@ -5,7 +5,6 @@ using MongoDB.Bson; using MongoDB.Bson.Serialization; using NUnit.Framework; -using NUnit.Framework.Internal; using Realms; using Realms.Dynamic; using Realms.Exceptions; diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs index 72670c36ac..bd0bdbdd69 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedDictionaryObject_generated.cs @@ -5,7 +5,6 @@ using MongoDB.Bson; using MongoDB.Bson.Serialization; using NUnit.Framework; -using NUnit.Framework.Internal; using Realms; using Realms.Dynamic; using Realms.Exceptions; diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs index 1baada5cd8..ee1b1bdd4b 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedListObject_generated.cs @@ -5,7 +5,6 @@ using MongoDB.Bson; using MongoDB.Bson.Serialization; using NUnit.Framework; -using NUnit.Framework.Internal; using Realms; using Realms.Dynamic; using Realms.Exceptions; diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs index 42ac6f9489..66d5eaf723 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/AsymmetricObjectWithEmbeddedRecursiveObject_generated.cs @@ -5,7 +5,6 @@ using MongoDB.Bson; using MongoDB.Bson.Serialization; using NUnit.Framework; -using NUnit.Framework.Internal; using Realms; using Realms.Dynamic; using Realms.Exceptions; diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs index f78f33d175..d09f9f138c 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/BasicAsymmetricObject_generated.cs @@ -5,7 +5,6 @@ using MongoDB.Bson; using MongoDB.Bson.Serialization; using NUnit.Framework; -using NUnit.Framework.Internal; using Realms; using Realms.Dynamic; using Realms.Exceptions; diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_Old_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_Old_generated.cs index be32bf8ac4..766ed07f4f 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_Old_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_Old_generated.cs @@ -36,6 +36,7 @@ static Dotnet_3597_Old() /// /// Defines the schema for the class. /// + [System.Reflection.Obfuscation] public static Realms.Schema.ObjectSchema RealmSchema = new Realms.Schema.ObjectSchema.Builder("Dotnet_3597", ObjectSchema.ObjectType.RealmObject) { Realms.Schema.Property.Primitive("IntProp", Realms.RealmValueType.Int, isPrimaryKey: false, indexType: IndexType.None, isNullable: false, managedName: "IntProp"), diff --git a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_generated.cs b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_generated.cs index eca00f0a47..b92d349665 100644 --- a/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_generated.cs +++ b/Tests/Realm.Tests/Generated/Realm.SourceGenerator/Realms.SourceGenerator.RealmGenerator/Dotnet_3597_generated.cs @@ -36,6 +36,7 @@ static Dotnet_3597() /// /// Defines the schema for the class. /// + [System.Reflection.Obfuscation] public static Realms.Schema.ObjectSchema RealmSchema = new Realms.Schema.ObjectSchema.Builder("Dotnet_3597", ObjectSchema.ObjectType.RealmObject) { Realms.Schema.Property.Primitive("IntProp", Realms.RealmValueType.Int, isPrimaryKey: false, indexType: IndexType.None, isNullable: false, managedName: "IntProp"), @@ -323,7 +324,7 @@ public int IntProp } } - private string _floatProp = null!; + private string _floatProp = string.Empty; public string FloatProp { get => _floatProp; diff --git a/Tools/DeployApps/BaasClient.cs b/Tools/DeployApps/BaasClient.cs index a70205b8f6..343143b2f1 100644 --- a/Tools/DeployApps/BaasClient.cs +++ b/Tools/DeployApps/BaasClient.cs @@ -1099,10 +1099,8 @@ private async Task StartContainer(string differentiator) private async Task WaitForContainer(string containerId, int maxRetries = 100) { - while (maxRetries > 0) + for (var i = 0; i < maxRetries; i++) { - maxRetries -= 1; - try { var containers = await GetContainers(); @@ -1125,7 +1123,7 @@ private async Task WaitForContainer(string containerId, int maxRe await Task.Delay(2000); } - throw new Exception($"Container with id={containerId} was not found or ready after 100 retries"); + throw new Exception($"Container with id={containerId} was not found or ready after {maxRetries} retries"); } private async Task CallEndpointAsync(HttpMethod method, string relativePath, object? payload = null)