-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reserved keyword escape example in CEL #47382
base: main
Are you sure you want to change the base?
Conversation
Add the missing escaped property name for the reserved keywords example in the CEL escape sequences examples table.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
| `namespace` | `self.__namespace__ > 0` | | ||
| `x-prop` | `self.x__dash__prop > 0` | | ||
| `redact__d` | `self.redact__underscores__d > 0` | | ||
| `string` | `self.__{string}__.startsWith('kube')` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't escape string as field name. I don't understand this change..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I believe it is what was meant to be done in the first place. An example on how to escape reserved keywords...
The current example doesn't really make sense, does-it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about dropping the line:
| `string` | `self.startsWith('kube')` |
entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this would be a shame as an example makes it clear how reserved keywords should be escaped.
Could we get feedback from someone who knows how CEL escape sequences work and make sure the example is correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cici37 knows a thing or two!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of having tests in code that match all examples given here. That way if there is any disagreement about how the system behaves, we have direct evidence of what the actual behavior is.
@kubernetes/sig-api-machinery-pr-reviews please take a look |
Description
Add the missing escaped property name for the reserved keywords example in the CEL escape sequences examples table.