Skip to content

Harden Patch variable regression tests input setup

2b344c0
Select commit
Loading
Failed to load commit list.
Draft

Relax Patch(record, updates...) field-type strictness and preserve unioned record shape #3063

Harden Patch variable regression tests input setup
2b344c0
Select commit
Loading
Failed to load commit list.
Azure Pipelines / Power-Fx PR (PFX) failed May 19, 2026 in 26m 4s

Build #20260519.3 had test failures

Details

Tests

  • Failed: 12 (0.01%)
  • Passed: 132,505 (99.43%)
  • Other: 741 (0.56%)
  • Total: 133,258
Code coverage

  • 73978 of 92112 blocks covered (80.31%)
  • 51725 of 66213 lines covered (78.12%)

Annotations

Check failure on line 1595 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Build log #L1595

[xUnit.net 00:00:16.04]     TestPatchRecordFunctionWithVariable(script: "Patch(rec5, {x:123})", expectedType: "![x:$]", variableType: "![x:$]", variableName: "rec5") [FAIL]

Check failure on line 1968 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Build log #L1968

[xUnit.net 00:00:16.34]     TestPatchRecordFunction(script: "Patch({a:1, b:2}, {b:\"3\", c:4})", expectedType: "![a:n, b:s, c:n]") [FAIL]

Check failure on line 11636 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Build log #L11636

[xUnit.net 00:00:10.76]     TestPatchRecordFunctionWithVariable(script: "Patch(rec5, {x:123})", expectedType: "![x:$]", variableType: "![x:$]", variableName: "rec5") [FAIL]

Check failure on line 11637 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Build log #L11637

[xUnit.net 00:00:10.88]     TestPatchRecordFunction(script: "Patch({a:1, b:2}, {b:\"3\", c:4})", expectedType: "![a:n, b:s, c:n]") [FAIL]

Check failure on line 1 in Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 047 - Patch({name:"John Doe",address:{street:"One Main St",city:"Springfield",country:"USA"}},{address:{country:"BRA"}}) = Errors: Error 88-113: The type of this argument 'address' does not match the expected type 'Record'. Found type 'Record'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 047 - Patch({name:"John Doe",address:{street:"One Main St",city:"Springfield",country:"USA"}},{address:{country:"BRA"}}) = Errors: Error 88-113: The type of this argument 'address' does not match the expected type 'Record'. Found type 'Record'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

Test Patch_PatchRecord.txt:47: 
  Expected: Errors: Error 88-113: The type of this argument 'address' does not match the expected type 'Record'. Found type 'Record'.|Error 0-5: The function 'Patch' has some invalid arguments.
  Actual  : {address:{city:Blank(),country:"BRA",street:Blank()},name:"John Doe"}
Raw output
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.RunExpressionTestCase(ExpressionTestCase testCase, Features features, Boolean numberIsFloat, ITestOutputHelper output) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 149
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(ExpressionTestCase t) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 75

Check failure on line 1 in Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 062 - Patch({a:"1"},{a:2}) = Errors: Error 14-19: The type of this argument 'a' does not match the expected type 'Text'. Found type 'Decimal'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 062 - Patch({a:"1"},{a:2}) = Errors: Error 14-19: The type of this argument 'a' does not match the expected type 'Text'. Found type 'Decimal'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

Test Patch_PatchRecord.txt:62: Threw exception: One or more errors occurred.,    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.PowerFx.Types.RecordValue.GetField(String fieldName) in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\RecordValue.cs:line 165
   at Microsoft.PowerFx.Types.RecordValue.<>c__DisplayClass8_0.<<GetFields>b__0>d.MoveNext() in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\RecordValue.cs:line 101
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.PowerFx.Types.NamedValue.<ValueAsync>d__5.MoveNext() in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\NamedValue.cs:line 30
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.PowerFx.Types.NamedValue.get_Value() in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\NamedValue.cs:line 21
   at Microsoft.PowerFx.Types.RecordValue.ToExpression(StringBuilder sb, FormulaValueSerializerSettings settings) in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\RecordValue.cs:line 342
   at Microsoft.PowerFx.Interpreter.Tests.ExpressionEvaluationTests.InterpreterRunner.<RunAsyncInternal>d__1.MoveNext() in D:\a\1\s\src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\PowerFxEvaluationTests.cs:line 1029
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.PowerFx.Core.Tests.BaseRunner.<RunAsync2>d__10.MoveNext() in D:\a\1\s\src\tests\Microsoft.PowerFx.Core.Tests.Shared\ExpressionTestHelpers\BaseRunner.cs:line 196
Raw output
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.RunExpressionTestCase(ExpressionTestCase testCase, Features features, Boolean numberIsFloat, ITestOutputHelper output) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 149
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(ExpressionTestCase t) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 75

Check failure on line 1 in Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 056 - Patch({a:1},{a:[2]}) = Errors: Error 12-19: The type of this argument 'a' does not match the expected type 'Decimal'. Found type 'Table'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 056 - Patch({a:1},{a:[2]}) = Errors: Error 12-19: The type of this argument 'a' does not match the expected type 'Decimal'. Found type 'Table'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

Test Patch_PatchRecord.txt:56: Threw exception: One or more errors occurred.,    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.PowerFx.Types.RecordValue.GetField(String fieldName) in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\RecordValue.cs:line 165
   at Microsoft.PowerFx.Types.RecordValue.<>c__DisplayClass8_0.<<GetFields>b__0>d.MoveNext() in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\RecordValue.cs:line 101
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.PowerFx.Types.NamedValue.<ValueAsync>d__5.MoveNext() in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\NamedValue.cs:line 30
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.PowerFx.Types.NamedValue.get_Value() in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\NamedValue.cs:line 21
   at Microsoft.PowerFx.Types.RecordValue.ToExpression(StringBuilder sb, FormulaValueSerializerSettings settings) in D:\a\1\s\src\libraries\Microsoft.PowerFx.Core\Public\Values\RecordValue.cs:line 342
   at Microsoft.PowerFx.Interpreter.Tests.ExpressionEvaluationTests.InterpreterRunner.<RunAsyncInternal>d__1.MoveNext() in D:\a\1\s\src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\PowerFxEvaluationTests.cs:line 1029
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.PowerFx.Core.Tests.BaseRunner.<RunAsync2>d__10.MoveNext() in D:\a\1\s\src\tests\Microsoft.PowerFx.Core.Tests.Shared\ExpressionTestHelpers\BaseRunner.cs:line 196
Raw output
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.RunExpressionTestCase(ExpressionTestCase testCase, Features features, Boolean numberIsFloat, ITestOutputHelper output) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 149
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(ExpressionTestCase t) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 75

Check failure on line 1 in Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 065 - Patch({a:Table({a:1,b:1}),b:Blank()},{b:1}) = Errors: Error 37-42: The type of this argument 'b' does not match the expected type 'Blank'. Found type 'Decimal'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Power-Fx PR (PFX)

Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(t: 4 Patch_PatchRecord.txt : 065 - Patch({a:Table({a:1,b:1}),b:Blank()},{b:1}) = Errors: Error 37-42: The type of this argument 'b' does not match the expected type 'Blank'. Found type 'Decimal'.|Error 0-5: The function 'Patch' has some invalid arguments. - Setup: SupportColumnNamesAsIdentifiers,PowerFxV1CompatibilityRules,disable:NumberIsFloat)

Test Patch_PatchRecord.txt:65: 
  Expected: Errors: Error 37-42: The type of this argument 'b' does not match the expected type 'Blank'. Found type 'Decimal'.|Error 0-5: The function 'Patch' has some invalid arguments.
  Actual  : {a:Table({a:1,b:1}),b:1}
Raw output
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.RunExpressionTestCase(ExpressionTestCase testCase, Features features, Boolean numberIsFloat, ITestOutputHelper output) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 149
   at Microsoft.PowerFx.Interpreter.Tests.FileExpressionEvaluationTests.V1_Decimal(ExpressionTestCase t) in \src\tests\Microsoft.PowerFx.Interpreter.Tests.Shared\FileExpressionEvaluationTests.cs:line 75