-
Notifications
You must be signed in to change notification settings - Fork 38
LastModifier-based ownership transfer with docs #131
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6099a62
ownership transfer with docs and unit test
carlydf f8d9af2
add todo for removing metadata
carlydf cc5ae6e
unset metadata after it has been used
carlydf 1eb48ef
fix lint
carlydf c0c789d
fix unit test
carlydf 53eb505
test manager handoff
carlydf f724666
remove ignore-last-modifier metadata after it's been used to make a v…
carlydf 0cb8a27
fmt-improts
carlydf 74fae15
add comment
carlydf 8c3888e
make code safe for nil temporalState
carlydf c6419d9
Update docs/README.md
carlydf 785eaeb
Update docs/ownership.md
carlydf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Ownership Transfer in the Worker Controller | ||
|
|
||
| ## Problem | ||
|
|
||
| If a worker controller is managing a Worker Deployment (ie. the controller is updating the RoutingConfig of the Worker | ||
| Deployment), but the user changes something via the CLI (ie. rolls back to the previous current version, or stops the | ||
| new target version from ramping because an issue was detected), the controller should not clobber what the human did. | ||
|
|
||
| At some point, after this human has handled their urgent rollback, they will want to let the controller know that it is | ||
| authorized to resume making changes to the Routing Config of the Worker Deployment. | ||
|
|
||
| ## Solution | ||
|
|
||
| _Once it is available in OSS v1.29, the controller will be able to coordinate with other users via the `OwnerIdentity` | ||
| field of a Worker Deployment. This runbook will be updated when that is available and implemented by the controller._ | ||
|
|
||
| In the meantime, the controller will watch the `LastModifierIdentity` field of a Worker Deployment to detect whether | ||
| another user has made a change. If another user made a change to the Worker Deployment, the controller will not make | ||
| any more changes to ensure a human's change is not clobbered. | ||
|
|
||
| Once you are done making your own changes to the Worker Deployment's current and ramping versions, and you are ready | ||
| for the Worker Controller to take over, you can update the metadata to indicate that. | ||
|
|
||
| There is no Temporal server support for Worker Deployment Version-level metadata, so you'll have to set this value on | ||
| the Current Version of your Worker Deployment. | ||
|
|
||
| ```bash | ||
| temporal worker deployment update-metadata-version \ | ||
| --deployment-name $MY_DEPLOYMENT \ | ||
| --build-id $CURRENT_VERSION_BUILD_ID | ||
| --metadata 'temporal.io/ignore-last-modifier=true'` | ||
| ``` | ||
| In the rare case that you have a nil Current Version when you are passing back ownership, you should set it on your Ramping Version | ||
| ```bash | ||
| temporal worker deployment update-metadata-version \ | ||
| --deployment-name $MY_DEPLOYMENT \ | ||
| --build-id $RAMPING_VERSION_BUILD_ID | ||
| --metadata 'temporal.io/ignore-last-modifier=true'` | ||
| ``` | ||
|
|
||
| In the even rarer case that you have nil Current Version and nil Ramping Version, you'll need to use the CLI or SDK to | ||
| set a Current or Ramping Version and then do as instructed above. |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.