Skip to content

Improve handling of empty jq results #100

@moshloop

Description

@moshloop

e,g.

       # We added a 0 in the jq list because CEL was behaving incorrectly for objects that returned just []
        - filter: >
            change.change_type == 'diff' &&
            jq('[.status.initContainerStatuses[]?.restartCount,.status.containerStatuses[]?.restartCount]', patch).all(rc, rc != 0)
            jq('[.status.initContainerStatuses[]?.restartCount,.status.containerStatuses[]?.restartCount, 0]', patch).all(rc, rc != 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions