-
Notifications
You must be signed in to change notification settings - Fork 216
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
Add versioning API methods to client #920
Add versioning API methods to client #920
Conversation
Draft until API changes merged |
eb9aeb6
to
0d67096
Compare
0d67096
to
5bcc013
Compare
5bcc013
to
e655cd3
Compare
client/client.go
Outdated
// And it will immediately terminating the current execution instance. | ||
// RequestId is used to deduplicate requests. It will be autogenerated if not set. | ||
ResetWorkflowExecution(ctx context.Context, request *workflowservice.ResetWorkflowExecutionRequest) (*workflowservice.ResetWorkflowExecutionResponse, error) | ||
|
||
// UpdateWorkerBuildIDCompatability **IN DEVELOPMENT** |
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.
For schedules we tagged things as // NOTE: Experimental
. Might want to be consistent.
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.
Will do
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.
Are the struct like UpdateWorkerBuildIDCompatabilityOptions
done or are they still in development? If they are still in development we should mark them as such
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 figured that's sort of implied by their 1:1 tie with the in-dev client functions, but in any case added the note there too 👍
go.mod
Outdated
@@ -21,3 +21,5 @@ require ( | |||
google.golang.org/protobuf v1.28.1 | |||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect | |||
) | |||
|
|||
replace go.temporal.io/api => /mnt/chonky/dev/temporal/api-go |
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.
chonky
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.
😄 (of course will go away once API change is merged)
internal/client.go
Outdated
@@ -336,6 +336,14 @@ type ( | |||
// RequestId is used to deduplicate requests. It will be autogenerated if not set. | |||
ResetWorkflowExecution(ctx context.Context, request *workflowservice.ResetWorkflowExecutionRequest) (*workflowservice.ResetWorkflowExecutionResponse, error) | |||
|
|||
// UpdateWorkerBuildIDCompatability allows you to update the worker-build-id based version sets for a particular | |||
// task queue. This is used in conjunction with workers who specify their build id and thus opt into the | |||
// feature. For more, see: <doc link> |
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.
Do we have docs links? otherwise I would remove or leave a not saying they are coming.
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.
Fair enough, makes sense. (removed everywhere)
internal/internal_workflow_client.go
Outdated
@@ -938,6 +938,51 @@ func (wc *WorkflowClient) ResetWorkflowExecution(ctx context.Context, request *w | |||
return resp, nil | |||
} | |||
|
|||
// UpdateWorkerBuildIDCompatability allows you to update the worker-build-id based version sets for a particular | |||
// task queue. This is used in conjunction with workers who specify their build id and thus opt into the | |||
// feature. For more, see: <doc link> |
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.
missing docs link
ts.NoError(handle21.Get(ctx, nil)) | ||
ts.NoError(handle22.Get(ctx, nil)) | ||
|
||
// TODO: Actually assert they ran on the appropriate workers, once David's changes are ready |
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.
Do we have anything to track this?
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.
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.
LGTM, assuming the API links are updated once the API changes are merged.
3f3d092
to
cee67ec
Compare
220e5f0
to
7b1cabb
Compare
7b1cabb
to
6f092ad
Compare
What was changed
Added top-level methods for the versioning API to the client.
Added worker flag to opt in to the feature
Go fmt also seemed to get a little more... aggressive? Some changes b/c of that.
Why?
So we can use them in tctl and eventually release
Checklist
Relates to temporalio/cli#165
Closes
How was this tested:
Added some tests
Any docs updates needed?