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
While working on supporting management policies in no-fork architecture, I noticed that getIgnoredFieldsArray() returns strings that contain “%s”, when supplied list of lists. It shouldn't do so, because these returned values are not used as format strings in any place. Rather, they are embedded into ignore_changeslifecycle meta-argument.
The bug stems from the confusion around name of the first argument, which is named “format”, but never used as a format string.
As far as I could see, we don't have any test cases covering list of lists.
It is likely that list of lists occurs rarely, if at all, in any Terraform schema. That's probably why this bug has not been encountered in the wild.
How can we reproduce it?
I've reproduced the issue, using relevant parts of the code, in a playground.
Resolution
Replacing fieldPath+"%s" with fieldPath should be enough. A test case to go with it would be nice.
The text was updated successfully, but these errors were encountered:
What happened?
While working on supporting management policies in no-fork architecture, I noticed that
getIgnoredFieldsArray()
returns strings that contain “%s”, when supplied list of lists. It shouldn't do so, because these returned values are not used as format strings in any place. Rather, they are embedded intoignore_changes
lifecycle meta-argument.The bug stems from the confusion around name of the first argument, which is named “format”, but never used as a format string.
As far as I could see, we don't have any test cases covering list of lists.
It is likely that list of lists occurs rarely, if at all, in any Terraform schema. That's probably why this bug has not been encountered in the wild.
How can we reproduce it?
I've reproduced the issue, using relevant parts of the code, in a playground.
Resolution
Replacing
fieldPath+"%s"
withfieldPath
should be enough. A test case to go with it would be nice.The text was updated successfully, but these errors were encountered: