Skip to content
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

KEP-4590: CEL Variables in Schemas #4583

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexzielenski
Copy link
Contributor

@alexzielenski alexzielenski commented Apr 16, 2024

  • One-line PR description: Details for CEL Variables in OpenAPI Schemas feature
  • Other comments:

/cc @jpbetz @cici37 @jiahuif @sttts

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 16, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 16, 2024
@alexzielenski alexzielenski changed the title [WIP] KEP-NNNN: add schema cel variables kep [WIP] KEP-NNNN: CEL Variables in Schemas Apr 16, 2024
@kikisdeliveryservice
Copy link
Member

Hi @alexzielenski

Please open an issue for this KEP. It's a requirement for opening a pull request here. Fill out the sections that you have info for, at this draft stage we're mostly just ensuring that you're opening the PR with the go-ahead from the sponsoring SIG and have been in some communication with them.

If you have any questions, please let me know.

Thanks!
Kirsten

@alexzielenski alexzielenski force-pushed the crd-cel-variables branch 3 times, most recently from f118cd3 to 31fbdde Compare April 17, 2024 17:42
@alexzielenski alexzielenski mentioned this pull request Apr 23, 2024
4 tasks
@alexzielenski alexzielenski changed the title [WIP] KEP-NNNN: CEL Variables in Schemas KEP-4590: CEL Variables in Schemas Apr 23, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 23, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alexzielenski
Once this PR has been reviewed and has the lgtm label, please assign jpbetz for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

@alexzielenski: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-enhancements-test 8d5d57a link true /test pull-enhancements-test
pull-enhancements-verify 8d5d57a link true /test pull-enhancements-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

}
```

The schema validator will allow shadowing of variables defined in parent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, this becomes essential for embedded resource composition. If someone puts the schema of some resource into another, having to deconflict variable names would unfortunate.


* Ability to Embed Parameterized Schemas by overriding variables - This is seen as a future work

## Proposal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variables and depend on other variable that are defined earlier in the list? VAP supported depending on variables earlier in the list so we can just follow precedence on that.

```

The schema validator will allow shadowing of variables defined in parent
schemas.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User defined variables are accessed through the 'variables.(variable name)' form like done via VAP? (I'm assuming yes)


The schema validator will allow shadowing of variables defined in parent
schemas.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain variable scope and shadowing in more detail? My assumption is that a variable in the data tree is in scope for all children (unless shadowed)

will be made available under Alpha->Beta->GA release cycle to mitigate the
risk of bugs.

Note that this requires a way of detecting whiwch CEL expressions refer to variables,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note that this requires a way of detecting whiwch CEL expressions refer to variables,
Note that this requires a way of detecting which CEL expressions refer to variables,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants