rebase: bump the k8s-dependencies group in /e2e with 3 updates

Bumps the k8s-dependencies group in /e2e with 3 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider) and [k8s.io/pod-security-admission](https://github.com/kubernetes/pod-security-admission).


Updates `k8s.io/apimachinery` from 0.32.3 to 0.33.0
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.32.3...v0.33.0)

Updates `k8s.io/cloud-provider` from 0.32.3 to 0.33.0
- [Commits](https://github.com/kubernetes/cloud-provider/compare/v0.32.3...v0.33.0)

Updates `k8s.io/pod-security-admission` from 0.32.3 to 0.33.0
- [Commits](https://github.com/kubernetes/pod-security-admission/compare/v0.32.3...v0.33.0)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cloud-provider
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/pod-security-admission
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2025-05-06 11:20:01 +00:00
committed by mergify[bot]
parent d52dc2c4ba
commit dd77e72800
359 changed files with 11145 additions and 18557 deletions

View File

@ -17,12 +17,14 @@ package parser
import (
"errors"
"fmt"
"regexp"
"strconv"
"strings"
"github.com/google/cel-go/common/ast"
"github.com/google/cel-go/common/operators"
"github.com/google/cel-go/common/types"
"github.com/google/cel-go/common/types/ref"
)
// Unparse takes an input expression and source position information and generates a human-readable
@ -65,6 +67,15 @@ func Unparse(expr ast.Expr, info *ast.SourceInfo, opts ...UnparserOption) (strin
return un.str.String(), nil
}
var identifierPartPattern *regexp.Regexp = regexp.MustCompile(`^[A-Za-z_][0-9A-Za-z_]*$`)
func maybeQuoteField(field string) string {
if !identifierPartPattern.MatchString(field) || field == "in" {
return "`" + field + "`"
}
return field
}
// unparser visits an expression to reconstruct a human-readable string from an AST.
type unparser struct {
str strings.Builder
@ -263,8 +274,17 @@ func (un *unparser) visitCallUnary(expr ast.Expr) error {
return un.visitMaybeNested(args[0], nested)
}
func (un *unparser) visitConst(expr ast.Expr) error {
val := expr.AsLiteral()
func (un *unparser) visitConstVal(val ref.Val) error {
optional := false
if optVal, ok := val.(*types.Optional); ok {
if !optVal.HasValue() {
un.str.WriteString("optional.none()")
return nil
}
optional = true
un.str.WriteString("optional.of(")
val = optVal.GetValue()
}
switch val := val.(type) {
case types.Bool:
un.str.WriteString(strconv.FormatBool(bool(val)))
@ -293,7 +313,21 @@ func (un *unparser) visitConst(expr ast.Expr) error {
ui := strconv.FormatUint(uint64(val), 10)
un.str.WriteString(ui)
un.str.WriteString("u")
case *types.Optional:
if err := un.visitConstVal(val); err != nil {
return err
}
default:
return errors.New("unsupported constant")
}
if optional {
un.str.WriteString(")")
}
return nil
}
func (un *unparser) visitConst(expr ast.Expr) error {
val := expr.AsLiteral()
if err := un.visitConstVal(val); err != nil {
return fmt.Errorf("unsupported constant: %v", expr)
}
return nil
@ -352,7 +386,7 @@ func (un *unparser) visitSelectInternal(operand ast.Expr, testOnly bool, op stri
return err
}
un.str.WriteString(op)
un.str.WriteString(field)
un.str.WriteString(maybeQuoteField(field))
if testOnly {
un.str.WriteString(")")
}
@ -370,7 +404,7 @@ func (un *unparser) visitStructMsg(expr ast.Expr) error {
if field.IsOptional() {
un.str.WriteString("?")
}
un.str.WriteString(f)
un.str.WriteString(maybeQuoteField(f))
un.str.WriteString(": ")
v := field.Value()
err := un.visit(v)