Skip to content

Update lists.go runtime cost calculator#1360

Open
TristonianJones wants to merge 1 commit into
masterfrom
TristonianJones-patch-1
Open

Update lists.go runtime cost calculator#1360
TristonianJones wants to merge 1 commit into
masterfrom
TristonianJones-patch-1

Conversation

@TristonianJones

Copy link
Copy Markdown
Collaborator

Updates to address cost calculation failures on invalid arguments

Ensure negative cost factors are normalized to 1.0 to safeguard against error inputs.
@TristonianJones TristonianJones requested a review from seirl July 3, 2026 15:03
@TristonianJones

Copy link
Copy Markdown
Collaborator Author

@pohly if you'd like to patch this change and give it a try on k8s

@pohly

pohly commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

I can confirm that this fixes:

=== RUN   TestValidationExpressions/ext_lists_version_3/[[1],[2],[3,4]].flatten(-1)_==_[1,2,3,4]
    validation_test.go:2256: expected error to contain 'level must be non-negative evaluating rule: [[1],[2],[3,4]].flatten(-1) == [1,2,3,4]', but got: root: Invalid value: "object": validation failed due to running out of cost budget, no further validation rules will be run
--- FAIL: TestValidationExpressions/ext_lists_version_3/[[1],[2],[3,4]].flatten(-1)_==_[1,2,3,4] (0.01s)

from https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/140205/pull-kubernetes-unit/2073031908379332608

@TristonianJones TristonianJones requested review from jnthntatum and removed request for seirl July 3, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants