Mellanox / ci-demo

Apache License 2.0
2 stars 19 forks source link

Fix bug with wrong values in parsed kubernetes yaml keys #88

Closed dpressle closed 3 months ago

dpressle commented 3 months ago

In some cases keys from kubernetes and/or run_on_dockers objects get mixed up.

for example namespace will get a false or true value instead of the actual namespace specifyed in kubernetes key.

Example for such Error from a real run:

ERROR: parallel task failed with msg: java.lang.RuntimeException: Failed to parse yaml: " spec: containers:

Note the mixed variables, 'tolerations' (which is empty value in the yaml file) will be assigned to the namespace value from lubernetes key (xlio-ci in this example)

This is caused because one of the variables in getConfigVal function which is being called in every run_k8s is global ad not local which is causing this variable to get wrong value from another parallel process running at same time.

The fix is simple and is to add def for item variable to make it local.