Cancel ScriptExecution without calling CancelScript when the StartScript request has never been transferred to Tentacle #756
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
Related to: OctopusDeploy/Issues#8535
Given ScriptExecution has started for a Polling Tentacle that has recently gone offline
And the GetCapabilities response is cached
And RPC retries have started for the StartScript Call
When the ScriptExecution is cancelled
Then TentacleClient will try and cancel script execution on Tentacle by calling CancelScript
In this scenario, we can guarantee that StartScript has never been transferred to Tentacle so the script is definitely not running.
Tentacle Client should be able to cancel any queued request and immediately return.
Before
Cancelling ScriptExecution would start trying to cancel the script on Tentacle by calling CancelScript
After
Cancelling ScriptExecution does not try and call CancelScript on Tentacle and instead cancels the queued request and stops ScriptExecution immediately.
How to review this PR
Quality ✔️
Pre-requisites