Improve the core Schedule CLI experience - #1157
Open
rossnelson wants to merge 13 commits into
Open
Conversation
rossnelson
marked this pull request as ready for review
August 10, 2026 16:47
dnr
reviewed
Aug 11, 2026
Comment on lines
+266
to
+276
| if sw.PriorityKey < 0 || sw.PriorityKey > math.MaxInt32 { | ||
| return nil, fmt.Errorf("priority key must be between 0 and %d", math.MaxInt32) | ||
| } | ||
| if len(sw.FairnessKey) > 64 { | ||
| return nil, fmt.Errorf("fairness key must be at most 64 bytes") | ||
| } | ||
| if math.IsNaN(float64(sw.FairnessWeight)) || | ||
| sw.FairnessWeight < 0 || | ||
| (sw.FairnessWeight > 0 && sw.FairnessWeight < 0.001) || | ||
| sw.FairnessWeight > 1000 { | ||
| return nil, fmt.Errorf("fairness weight must be between 0.001 and 1000") |
Contributor
There was a problem hiding this comment.
please don't enforce stuff like this on the client side. these validations can depend on server config and should be validated on the server, so that if they change we don't have to go change all the clients
| } | ||
| for _, cronString := range cron { | ||
| trimmedCronString := strings.TrimSpace(cronString) | ||
| if strings.HasPrefix(trimmedCronString, "TZ=") || strings.HasPrefix(trimmedCronString, "CRON_TZ=") { |
Contributor
There was a problem hiding this comment.
it is supported on the server, why not here?
Comment on lines
+3173
to
+3178
| Omitting cadence options preserves the existing cadence. Supplying any | ||
| `--calendar`, `--cron`, or `--interval` value replaces all existing | ||
| calendar, cron, and interval sources. For example, use | ||
| `--cron '0 12 * * *'` to replace cadence, or `--cadence-clear-all` to | ||
| clear it. Cadence clear requires the resulting Schedule to be paused; | ||
| pause explicitly with `--paused=true` when needed. |
Contributor
There was a problem hiding this comment.
I kinda like this term "cadence", but... afaik it doesn't exist in any of the existing docs or cli or sdks. The term for "when to run the actions" is "spec", short for specification. Introducing a brand new term seems like it's going to add confusion. (I'm not claiming that's better, just that the consistency is important)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
temporal schedule patchoperations for notes, policy, state, cadence, timing, and workflow-action fields.schedule-patch-demo.mp4
Test plan
go test ./internal/temporalcli -count=1go test ./... -count=1make genproduces byte-identical outputmake build