Commit Graph

2 Commits

Author SHA1 Message Date
Patrick Ohly 561da9109f cel: fix conversion of quantity to quantity
The code in ConvertToType checked for conversion into typeValue (=
"kubernetes.URL") instead of conversion into quantityTypeValue (=
"kubernetes.Quantity") and thus most likely failed with an incorrect "type
conversion error".

Kubernetes-commit: 02b4e99c9f0afa4ef9fa0283670c1515e40a5278
2024-03-04 12:23:54 +01:00
Alex Zielenski b137c25637 Add quantity library to CEL (#118803)
* add quantity library to CEL

* add more tests to quantity

* use 1.29 env for quantity

* set CEL default env to 1.28 for 1.28 release

* add compare function

* docs and arith lib

* fixup addInt and subInt overload, add docs

* more tests

* cleanup docs

* remove old comments

* remove unnecessary cast

* add isInteger

* add overflow tests

* boilerplate

* refactor expectedResult for tests

* doc typo fix

* returns bool

* add docs link

* different dos link

* add isInteger true case

* expand iff

* add quantity back to 1.28 version, and revert change to DefaultCompatibilityVersion

* formatting

Kubernetes-commit: 423f4dfc7982136c958fc78e187c911a8896ba1b
2023-07-13 14:43:56 -07:00