Skip to content

Conversation

Shivs11
Copy link
Member

@Shivs11 Shivs11 commented Jan 17, 2025

What changed?

  • 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?

  • Versioning-3.1

How did you test it?

  • 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

  • None, feature branch.

Documentation

Is hotfix candidate?

  • No

@@ -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 {
Copy link
Member Author

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

Copy link
Contributor

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) {
Copy link
Member Author

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()
Copy link
Member Author

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.

@Shivs11 Shivs11 requested review from ShahabT and carlydf January 17, 2025 16:46
@Shivs11 Shivs11 marked this pull request as ready for review January 17, 2025 16:51
@Shivs11 Shivs11 requested a review from a team as a code owner January 17, 2025 16:51
@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: extra space

Copy link
Contributor

@ShahabT ShahabT left a comment

Choose a reason for hiding this comment

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

overall looks good.

@@ -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,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`EnableDeployments enables deployments (versioning v3) in all services,
`EnableDeployments enables deployments (deprecated versioning v3 pre-release) in all services,

Copy link
Contributor

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 {
Copy link
Contributor

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)!

Comment on lines +647 to +649
// lock so that only one poll does the update and the rest wait for it
c.deploymentLock.Lock()
defer c.deploymentLock.Unlock()
Copy link
Contributor

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)

Copy link
Member Author

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)

Copy link
Contributor

@carlydf carlydf left a 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

@Shivs11 Shivs11 requested a review from ShahabT January 17, 2025 22:49
},
}
}

func (s *workerComponent) DedicatedWorkerOptions(ns *namespace.Namespace) *workercommon.PerNSDedicatedWorkerOptions {
return &workercommon.PerNSDedicatedWorkerOptions{
Enabled: s.enabledForNs(ns.Name().String()),
Enabled: s.enabled(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Enabled: s.enabled(),
Enabled: true,

@@ -41,7 +41,7 @@ import (
type (
workerComponent struct {
activityDeps activityDeps
enabledForNs dynamicconfig.BoolPropertyFnWithNamespaceFilter
enabled dynamicconfig.BoolPropertyFn
Copy link
Contributor

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.

@Shivs11 Shivs11 requested a review from ShahabT January 20, 2025 14:26
@Shivs11 Shivs11 merged commit 957bc26 into versioning-3.1 Jan 20, 2025
49 checks passed
@Shivs11 Shivs11 deleted the ss/deployment-wf-v-3.1 branch January 20, 2025 16:15
ShahabT pushed a commit that referenced this pull request Feb 4, 2025
## 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
ShahabT pushed a commit that referenced this pull request Feb 4, 2025
## 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
ShahabT pushed a commit that referenced this pull request Feb 5, 2025
## 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
ShahabT pushed a commit that referenced this pull request Feb 5, 2025
## 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
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## 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
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## 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
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## 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
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## 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
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