Skip to content

Possible regression in type handling #816

@jpbetz

Description

@jpbetz

In CEL 1.16,

dyn([]).sum() == 0

This was always true

but in CEL 1.17, this sometimes returns false. It appears that this may be related to what type dyn([]) is assigned. If I run dyn([]).sum() it most often returns an int, but sometimes returns a uint or duration.

See https://github.com/kubernetes/kubernetes/blob/8a8d63a732dea705fd38fab7d79e3730642bb2f7/staging/src/k8s.io/apiserver/pkg/cel/library/lists.go#L139 for the sum() implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions