-
Notifications
You must be signed in to change notification settings - Fork 1.1k
RegisterTaskQueue + DescribeVersion: versioning-3.1 #7107
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
Conversation
@@ -34,7 +34,8 @@ import "temporal/api/common/v1/message.proto"; | |||
// Data for each worker deployment version + task queue pair. | |||
// This is stored in each worker deployment version (for each task queue), | |||
// and synced to task queue user data (for each worker deployment version). | |||
message WorkerDeploymentTaskQueueData { |
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.
@carlydf - I thought these names were a tad bit better while using them
lmk your thoughts
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.
makes sense to me since the task queues are more tied to the deployment version (instance) than the worker deployment (group)!
@@ -3306,6 +3314,42 @@ func (wh *WorkflowHandler) SetCurrentDeployment(ctx context.Context, request *wo | |||
}, nil | |||
} | |||
|
|||
// Versioning-3 Public-Preview API's | |||
|
|||
func (wh *WorkflowHandler) DescribeWorkerDeploymentVersion(ctx context.Context, request *workflowservice.DescribeWorkerDeploymentVersionRequest) (_ *workflowservice.DescribeWorkerDeploymentVersionResponse, retError error) { |
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.
functionality copied from existing working API for deployments: DescribeDeployment
return c.deploymentRegisterError | ||
} | ||
|
||
// userData, _, err := c.partitionMgr.GetUserDataManager().GetUserData() |
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.
UserData stuff will come in later since there are pending discussions on how to finalize this structure.
@@ -328,7 +328,7 @@ message SyncDeploymentUserDataRequest { | |||
temporal.api.enums.v1.TaskQueueType task_queue_type = 3; | |||
|
|||
// This is the deployment being modified. | |||
temporal.api.deployment.v1.Deployment deployment = 4; | |||
temporal.api.deployment.v1.Deployment deployment = 4; |
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.
Nit: extra space
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.
overall looks good.
common/dynamicconfig/constants.go
Outdated
@@ -857,11 +857,19 @@ of Timeout and if no activity is seen even after that the connection is closed.` | |||
true, | |||
`FrontendEnableSchedules enables schedule-related RPCs in the frontend`, | |||
) | |||
// [cleanup-wv-pre-release] | |||
EnableDeployments = NewNamespaceBoolSetting( | |||
"system.enableDeployments", | |||
false, | |||
`EnableDeployments enables deployments (versioning v3) in all services, |
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.
`EnableDeployments enables deployments (versioning v3) in all services, | |
`EnableDeployments enables deployments (deprecated versioning v3 pre-release) in all services, |
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.
up to you but I'm thinking this is good so that whatever engineer who is asked to "enabled deployments" by customer service does not accidentally enable the old deployments (they may not know what the // cleanup
comment means)
@@ -34,7 +34,8 @@ import "temporal/api/common/v1/message.proto"; | |||
// Data for each worker deployment version + task queue pair. | |||
// This is stored in each worker deployment version (for each task queue), | |||
// and synced to task queue user data (for each worker deployment version). | |||
message WorkerDeploymentTaskQueueData { |
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.
makes sense to me since the task queues are more tied to the deployment version (instance) than the worker deployment (group)!
// lock so that only one poll does the update and the rest wait for it | ||
c.deploymentLock.Lock() | ||
defer c.deploymentLock.Unlock() |
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.
is this code just copied for now? are you thinking to use the same lock to cover updates to both the old and the new deployment entity WFs, or two separate locks? (same lock might be the right choice, I'm not sure, just want to discuss)
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.
good question - I had thought about that and I ended up choosing to keep the locks the same since these locks just make sure that only one update happens at the same time - moreover, both the entity wf updates happen sequentially so I don't see the use-case of using two separate locks instead of just one (naming of the locks will change later though)
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.
approved once comments are addressed
}, | ||
} | ||
} | ||
|
||
func (s *workerComponent) DedicatedWorkerOptions(ns *namespace.Namespace) *workercommon.PerNSDedicatedWorkerOptions { | ||
return &workercommon.PerNSDedicatedWorkerOptions{ | ||
Enabled: s.enabledForNs(ns.Name().String()), | ||
Enabled: s.enabled(), |
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.
Enabled: s.enabled(), | |
Enabled: true, |
@@ -41,7 +41,7 @@ import ( | |||
type ( | |||
workerComponent struct { | |||
activityDeps activityDeps | |||
enabledForNs dynamicconfig.BoolPropertyFnWithNamespaceFilter | |||
enabled dynamicconfig.BoolPropertyFn |
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.
no need for this field.
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
## What changed? <!-- Describe what has changed in this PR --> - Updated deployment entity wf's API's (naming) for versioning-3.1. Removed those which will not be required. - Added functionality for RegisterTaskQueue + DescribeVersion - Added functional tests for verifying the above two work. - UserData stuff has been removed right now since there are pending discussions ## Why? <!-- Tell your future self why have you made these changes --> - Versioning-3.1 ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Functional tests have been added. Note, the tests added are exact replicas (in terms of their core functionality) with the existing tests under `deployment_test.go` ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - None, feature branch. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
What changed?
Why?
How did you test it?
deployment_test.go
Potential risks
Documentation
Is hotfix candidate?