You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a function named validateNoDuplicateNames in place to check case-insensitive duplication against taskRun spec's params, WorkspaceBindings, StepOverrides and SidecarOverrides.
For params duplication check, it's only used in taskRun spec's params, but not task spec params. To make sure param names are consistent, #4806 will also call this validateNoDuplicateNames to validate names in task spec params.
Expected Behavior
We should expect this function to work correctly regardless of the order of case-insensitive duplications.
Actual Behavior
If name foo is provided in taskRun spec's params and then Foo, it can check duplication.
If a name Foo is provided in taskRun spec's params and then foo, it fails to check duplication.
Why do we check case-insensitive duplication not case-sensitive? In other words, is there any problem with treating name foo and Foo as two different parameters?
chuangw6
changed the title
Case sensitivity in TaskRunSpec's params and TaskSpec's params
Case-sensitive duplication check in TaskRunSpec's params
May 2, 2022
chuangw6
changed the title
Case-sensitive duplication check in TaskRunSpec's params
Case-insensitive duplication check in TaskRunSpec's params
May 2, 2022
Background
There is a function named validateNoDuplicateNames in place to check case-insensitive duplication against taskRun spec's params, WorkspaceBindings, StepOverrides and SidecarOverrides.
For params duplication check, it's only used in taskRun spec's params, but not task spec params. To make sure param names are consistent, #4806 will also call this validateNoDuplicateNames to validate names in task spec params.
Expected Behavior
We should expect this function to work correctly regardless of the order of case-insensitive duplications.
Actual Behavior
foo
is provided in taskRun spec's params and thenFoo
, it can check duplication.Foo
is provided in taskRun spec's params and thenfoo
, it fails to check duplication.Proposed solution
Question
Why do we check case-insensitive duplication not case-sensitive? In other words, is there any problem with treating name
foo
andFoo
as two different parameters?Steps to Reproduce the Problem
Foo
andfoo
in taskrun spec.Foo
andfoo
in taskrun spec (provide value forfoo
first and thenFoo
) and apply again, you can see it validates the duplicationThe text was updated successfully, but these errors were encountered: