Skip to content

Conversation

@larsewi
Copy link
Contributor

@larsewi larsewi commented Jan 19, 2026

Currently, classfilterdata() does not return a variable for
array_of_XXXs if given data structure's value do not comply completely
to given array_of_XXXs parameter.
On the other hand, classfilterdata() does return a variable when given
object_of_XXXs even if this variable does not completely comply to
object_of_XXXs.

This patch changes classfilterdata() to not return a variable as well
for object_of_XXXs in case given data structure's does not comply.
Also add an acceptance test for it.
This patch also fixes a compiler warning mayby-uninitialized of variable
remove in FnCallClassFilterData() in case parent is of type JSON object.

(cherry picked from commit f53bee0)
Signed-off-by: Lars Erik Wik lars.erik.wik@northern.tech

Back ported from #6021

Currently, classfilterdata() does not return a variable for
array_of_XXXs if given data structure's value do not comply completely
to given array_of_XXXs parameter.
On the other hand, classfilterdata() does return a variable when given
object_of_XXXs even if this variable does not completely comply to
object_of_XXXs.

This patch changes classfilterdata() to not return a variable as well
for object_of_XXXs in case given data structure's does not comply.
Also add an acceptance test for it.
This patch also fixes a compiler warning mayby-uninitialized of variable
remove in FnCallClassFilterData() in case parent is of type JSON object.

(cherry picked from commit f53bee0)
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi
Copy link
Contributor Author

larsewi commented Jan 19, 2026

@cf-bottom Jenkins please :)

@cf-bottom
Copy link

@larsewi larsewi requested a review from olehermanse January 20, 2026 07:58
@larsewi larsewi merged commit 9277ad3 into cfengine:3.27.x Jan 20, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants