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

Versioning 3 #740

Merged
merged 7 commits into from
Jan 15, 2025
Merged

Versioning 3 #740

merged 7 commits into from
Jan 15, 2025

Conversation

antlai-temporal
Copy link
Contributor

What was changed

This is a merge of the branch versioning-3 into main.

It adds support for the new Deployment API, extends Describe Workflow with versioning info, and
provides a versioning override API.

See the PR #735 for further details.

Why?

Checklist

  1. Closes
    [Feature Request] versioning override and move API #720 [Feature Request] DescribeWorkflow should show versioning info #719 [Feature Request] Support the deployment API #718

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

LGTM, nothing blocking. I admit I didn't review the models too in depth, so long as we're reasonably comfortable with the JSON that is emitted will be stable (no problem with pre-GA incompatible changes, I just mean that we're happy in general with the shape/approach).

@@ -261,6 +262,9 @@ func (s *SharedServerSuite) TestTaskQueue_Describe_Simple() {
)
s.NoError(res.Err)

// TODO(antlai-temporal): Delete when a server caching bug in 1.26.2 is fixed
Copy link
Member

Choose a reason for hiding this comment

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

Can you link to the issue (ideally in the code comment, but here is fine too)? And/or can you just make a CLI issue that we try not to lose that removes these sleeps once whatever upstream issue is fixed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added link, and opened issue #741

var workflowExecutionOptions *workflowpb.WorkflowExecutionOptions
protoMask, err := fieldmaskpb.New(workflowExecutionOptions, "versioning_override")
if err != nil {
panic("invalid field mask")
Copy link
Member

Choose a reason for hiding this comment

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

While I know this thing shouldn't happen, I think we can still use regular errors here

Copy link
Collaborator

@josh-berry josh-berry left a comment

Choose a reason for hiding this comment

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

Part one of my review, just the API/YAML. Dropping quickly so you have more time to consider/respond. Will look at the actual code next.

@@ -0,0 +1,377 @@
package temporalcli
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have a nit about the file name: if this is temporal worker deployment ..., we should probably name this file commands.worker.deployment.go. I know it's a mouthful but it's at least consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renaming...

Comment on lines 608 to 616
- name: temporal worker
summary: Read or update Worker state
description: |
Modify or read state associated with a Worker, for example,
using Worker Deployments commands:
```
temporal worker deployment
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's also mark this as experimental; no need to stabilize something unnecessarily. :)

- worker
- worker deployment

- name: temporal worker deployment
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we also deprecate the old task-queue versioning etc. commands? Or are those still relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet, we have not deprecated in the go sdk, the consensus was to wait for public preview...

- name: report-reachability
type: bool
description: |
Flag to include reachability information of a Worker Deployment.
Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't need to say it's a flag. That's obvious in context:

Suggested change
Flag to include reachability information of a Worker Deployment.
Include reachability information of a Worker Deployment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, much better

@@ -2707,6 +2881,67 @@ commands:
type: int
description: Maximum number of Workflow Executions to display.

- name: temporal workflow update-options
Copy link
Collaborator

@josh-berry josh-berry Jan 15, 2025

Choose a reason for hiding this comment

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

[non-blocking/feel free to ignore] Would it be better to call this set-options so as not to confuse it with Workflow Update? Or maybe even options set if we think we'll add options list, options show etc. later?

[edit: I see there was extensive discussion about this in the PR merging this command into the versioning-3 branch. I missed that discussion, but I doubly don't want to hold up the bus in light of the fact it's already been thought about extensively. :)]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't want to open the can of worms again... It took hours...If we decide to change things it should start with the API and align with activity options...

Comment on lines 2885 to 2891
summary: Change Workflow Execution Options
description: |
Modify properties of Workflow Executions:
```
temporal workflow update-options [options]
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this also be experimental?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks

- name: versioning-override-behavior
type: string-enum
description: |
Flag to override the versioning behavior of a Workflow.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Flag to override the versioning behavior of a Workflow.
Override the versioning behavior of a Workflow.

Also: I'm a little unclear on what "override" means here—it might be good to explain what each of the enum values mean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I modified the description to give examples of the enum values.

Copy link
Collaborator

@josh-berry josh-berry left a comment

Choose a reason for hiding this comment

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

Took a quick pass at the actual code and the accompanying tests and I have no more comments, the implementation LGTM. 👍

@antlai-temporal antlai-temporal merged commit 4285d39 into temporalio:main Jan 15, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants