STAC-23287: Add --wait functionality to stackpack install and upgrade commands#113
Merged
STAC-23287: Add --wait functionality to stackpack install and upgrade commands#113
Conversation
…r operations to complete
Contributor
Author
Manual Testing ReportTest Case 1: Installation fails due to wrong contentStep 1: Scaffold a stackpack projectCommand: STS_EXPERIMENTAL_STACKPACK=1 go run main.go stackpack scaffold --name installation-failOutput: Result: ✅ SUCCESS - Stackpack project scaffolded successfully Step 2: Make an invalid configurationCommand: echo "hello world" > installation-fail/provisioning/monitors.styOutput: Result: ✅ SUCCESS - Invalid content written to monitors.sty Step 3: Package the stackpackCommand: STS_EXPERIMENTAL_STACKPACK=1 go run main.go stackpack package -d installation-failOutput: Result: ✅ SUCCESS - Stackpack packaged successfully despite invalid content Step 4: Upload the stackpack archiveCommand: STS_EXPERIMENTAL_STACKPACK=1 go run main.go stackpack upload -f installation-fail-0.0.1.zipOutput: Result: ✅ SUCCESS - Stackpack uploaded successfully Step 5: Trigger the installation of the stackpack with wait - should failCommand: STS_EXPERIMENTAL_STACKPACK=1 go run main.go stackpack install --name installation-fail --waitOutput: Result: ✅ SUCCESS - Wait functionality correctly detected installation failure! Test Case 2: Upgrade fails due to wrong contentStep 1: Scaffold a stackpack projectCommand: STS_EXPERIMENTAL_STACKPACK=1 go run main.go stackpack scaffold --name upgrade-failOutput: ✅ SUCCESS - Scaffolding successful Steps 2-4: Package, Upload, and Install Initial Version (v0.0.1)Commands executed successfully:
Initial Install Output: Result: ✅ SUCCESS - Initial installation completed successfully with wait functionality Steps 5-8: Create Invalid v0.0.2 and UpgradeCommands:
Step 9: Trigger upgrade with wait - should failCommand: STS_EXPERIMENTAL_STACKPACK=1 go run main.go stackpack upgrade --name upgrade-fail --unlocked-strategy skip --waitOutput: Result: ✅ SUCCESS - Wait functionality correctly detected upgrade failure! |
deontaljaard
previously approved these changes
Sep 3, 2025
deontaljaard
approved these changes
Sep 4, 2025
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.
Summary
Extends the
stackpack installandstackpack upgradecommands with--waitfunctionality that monitors operation completion status with configurable timeout.Changes
Core Functionality
--waitflag to bothstackpack installandstackpack upgradecommands--timeoutflag with default 1 minute timeout for wait operationsOperationWaiterincmd/stackpack/common.gofor reusable wait logicfetchAllStackPacks()API polling mechanismNewRuntimeErrorArchitecture
OperationWaitercan be used by other commandscommon.go, command-specific logic in respective filesStatusInstalled,StatusProvisioning,StatusErrorfor clarityfetchAllStackPacksfromstackpack_list.gotocommon.gofor reuseBehavior
Usage Examples
Testing
Comprehensive Test Coverage
OperationWaiterfunctionality incommon_test.goTest Scenarios Covered
Implementation Details
Status Monitoring
StackPackConfiguration.Statusfield throughfetchAllStackPacks()APIINSTALLED(success),PROVISIONING(in progress),ERROR(failure)Error Handling
NewRuntimeErrorto avoid showing usage on operation failuresCode Quality