Repository navigation
Conversation
|
Review this PR in Hyponome for a side-by-side diff of the step-template JSON and any embedded scripts. |
This branch has not been deployed
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
The Upgrade Octopus Server step swallowed download failures and emitted PowerShell formatting objects through its success output. Those objects could become part of the value passed to
msiexec, causing malformed installer arguments and leaving the deployment apparently hung.Further investigation also found that the existing single-stream
WebClient.DownloadFile()request could fail after transferring a substantial portion of a large installer. The same installer downloaded successfully using bounded HTTP range requests.Results
The updated step:
Content-Range.msiexecand rejects nonzero exit codes.Before
A failed WebClient download was caught but not rethrown. Formatting records from
Format-Listwere written to the success stream alongside the temporary filename and could be passed to:The installer process was not explicitly awaited or checked for a nonzero exit code.
After
Download failures are terminating and cannot reach service shutdown or MSI execution.
During a test-server upgrade, one range request failed after more than 503 MB had been downloaded. The step resumed from the downloaded length, completed and validated the 874,090,496-byte installer, installed the requested Octopus Server version, restarted the service, removed the temporary installer, and completed successfully.
Pre-requisites
Versionis incremented from 10 to 11.$Meta.ExportedAtand$Meta.OctopusVersionare updated.$.LastModifiedByis updated tobcullman.LastModifiedDateis updated.Validation
git diff --checkpassed.Fixes #1710