Commit d89cb15
Fix CEL to actually block deprecated resource create (#313)
<!--- Note to EXTERNAL Contributors -->
<!-- Thanks for opening a PR!
If it is a significant code change, please **make sure there is an open
issue** for this.
We work best with you when we have accepted the idea first before you
code. -->
<!--- For ALL Contributors 👇 -->
## What was changed
Without `optionalOldSelf: true`, oldSelf is either present (on update)
or rule is skipped (on create).
We want the rule to be enforced on create!
Also, oldSelf != nil doesn't work, must be hasValue()
## Why?
To behave as documented and expected after deprecating the old CRDs
## Checklist
<!--- add/delete as needed --->
1. Closes <!-- add issue number here -->
2. How was this tested:
In local cluster I tested that you could update an existing object, but
that you could not create one.
Also tested with the old rule and saw that it did not actually block
creation.
Note: regardless of the CEL rule, all operations (get, delete, describe,
etc) print this warning, which is nice:
```
Warning: TemporalConnection is deprecated. Use Connection instead.
```
3. Any docs updates needed?
<!--- update README if applicable
or point out where to update docs.temporal.io -->
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent bc58d64 commit d89cb15
5 files changed
Lines changed: 7 additions & 5 deletions
File tree
- api/v1alpha1
- helm/temporal-worker-controller-crds/templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4216 | 4216 | | |
4217 | 4217 | | |
4218 | 4218 | | |
4219 | | - | |
| 4219 | + | |
| 4220 | + | |
4220 | 4221 | | |
4221 | 4222 | | |
4222 | 4223 | | |
| |||
0 commit comments