Files
awx-operator/roles
Dimitri Savineau ed72dc12b2
CI / molecule (--skip-tags=replicas) (push) Failing after 2m21s
CI / molecule (-t replicas) (push) Failing after 2m25s
CI / helm (push) Failing after 4m57s
CI / no-log (push) Successful in 12s
CI / nox-sessions (push) Failing after 1m26s
Add explicit list filter after rejectattr (#1845)
With ansible 2.9.27 (operator-sdk v1.27.0) then the rejectattr filter
returns a generator so we need to cast it to list.
The behavior doesn't exist when using a more recent operator-sdk
version like v1.34.0 (ansible-core 2.15.8) but using the list
filter on that version works too (even if not needed)

"<generator object select_or_reject at 0x7fbbf0443728>"

This is a similar issue as 80a9e8c.

TASK [Get the new resource pod information after updating resource.]
********************************
FAILED! => {"msg": "The conditional check '_new_pod['resources'] | rejectattr('metadata.deletionTimestamp', 'defined') | length' failed.
The error was: Unexpected templating type error occurred on ({% if _new_pod['resources'] | rejectattr('metadata.deletionTimestamp', 'defined') | length %} True {% else %} False {% endif %}): object of type 'generator' has no len()

This also removes the unneeded quotes on the when conditions.

Signed-off-by: Dimitri Savineau <[email protected]>
2024-04-29 23:35:37 -04:00
..