feat: add concurrency token support for partial variable snapshot updates - #465
Merged
bec-callow-oct merged 3 commits intoAug 24, 2026
Merged
Conversation
bec-callow-oct
force-pushed
the
bec/si-340-partial-variable-client-concurrency
branch
from
August 24, 2026 01:23
f65fa49 to
a42958d
Compare
benPearce1
reviewed
Aug 24, 2026
|
|
||
| // SnapshotVariablesByName requires octopus feature toggle partial-updates-on-variables = true | ||
| func SnapshotVariablesByName(client newclient.Client, release *Release, variables []core.VariableIdentifier) (*Release, error) { | ||
| func SnapshotVariablesByName(client newclient.Client, release *Release, variables []core.VariableIdentifier, concurrencyToken ...string) (*Release, error) { |
Contributor
There was a problem hiding this comment.
I don't think we need to support an array of concurrency tokens here.
Contributor
There was a problem hiding this comment.
I have learnt that this is a method of making the parameter optional, and is not uncommon in Go
Contributor
There was a problem hiding this comment.
making it an *string would allow it to be optionally null, or a value.
Contributor
Author
There was a problem hiding this comment.
I'll change it to *string, that looks cleaner
benPearce1
approved these changes
Aug 24, 2026
benPearce1
left a comment
Contributor
There was a problem hiding this comment.
This looks good. Ignore previous comments about the ... operator.
bec-callow-oct
enabled auto-merge (squash)
August 24, 2026 23:13
bec-callow-oct
deleted the
bec/si-340-partial-variable-client-concurrency
branch
August 24, 2026 23:20
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Background
Adds client support for release and runbook variable snapshot concurrency. Relates to the changes in https://github.com/OctopusDeploy/OctopusDeploy/pull/46160 and https://github.com/OctopusDeploy/OctopusDeploy/pull/46136
Results
The concurrency token can be retrieved from a a release:
A new token is generated by the snapshot by name endpoint:
An exception occurs when the concurrency token on the request does not equal the token on the release:
Code samples for testing