Add Timeout Option for st2 pack install
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
Feature Request: Add Timeout Option for st2 pack install
Summary
Add a command-line option to st2 pack install that allows users to override the default action timeout. This would be especially helpful for installing large packs or packs with many dependencies on slow network connections.
Motivation
Currently, the st2 pack install <pack-name> command uses a fixed, internal timeout for the underlying action. This can cause the installation to fail with a timeout error if the download of the pack or its dependencies takes too long. This is a frequent problem in environments with limited bandwidth or for large packs.
As a user, I have no way to increase this timeout directly from the CLI. The only current workarounds are to install the pack manually or to change the global action timeout settings, which is not ideal, as it affects all actions and requires a deeper understanding of StackStorm's configuration.
Providing a --timeout or similar flag would give users the flexibility to handle these cases without altering global configurations, making the CLI more robust and user-friendly for pack management.
Proposed Implementation
- Introduce a new optional command-line argument for the
st2 pack installcommand, for example,--timeout <seconds>. - The value provided by this flag would be passed to the underlying
packs.installaction as anexecution_timeoutparameter, overriding the default. - The value should accept a number in seconds. If not specified, the system should use the default timeout.
Example Use Case
Instead of the command failing:
$ st2 pack install my-large-pack
...
ERROR: Action execution failed: Execution failed due to a timeout.
Gern geschehen. Hier ist der Feature-Request als Markdown-Code, den du direkt in ein GitHub-Issue kopieren kannst.
Markdown
### **Feature Request: Add Timeout Option for `st2 pack install`**
### **Summary**
Add a command-line option to `st2 pack install` that allows users to override the default action timeout. This would be especially helpful for installing large packs or packs with many dependencies on slow network connections.
---
### **Motivation**
Currently, the `st2 pack install <pack-name>` command uses a fixed, internal timeout for the underlying action. This can cause the installation to fail with a timeout error if the download of the pack or its dependencies takes too long. This is a frequent problem in environments with limited bandwidth or for large packs.
As a user, I have no way to increase this timeout directly from the CLI. The only current workarounds are to install the pack manually or to change the global action timeout settings, which is not ideal, as it affects all actions and requires a deeper understanding of StackStorm's configuration.
Providing a `--timeout` or similar flag would give users the flexibility to handle these cases without altering global configurations, making the CLI more robust and user-friendly for pack management.
---
### **Proposed Implementation**
* Introduce a new optional command-line argument for the `st2 pack install` command, for example, `--timeout <seconds>`.
* The value provided by this flag would be passed to the underlying `packs.install` action as an `execution_timeout` parameter, overriding the default.
* The value should accept a number in seconds. If not specified, the system should use the default timeout.
---
### **Example Use Case**
Instead of the command failing:
```bash
$ st2 pack install my-large-pack
...
ERROR: Action execution failed: Execution failed due to a timeout.
The user could specify a longer timeout:
$ st2 pack install my-large-pack --timeout 1800
This would allow the installation to complete successfully, even if it takes up to 30 minutes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the st2 pack install CLI entry point to the underlying packs.install action and inspect how its execution timeout is currently chosen. Add an optional numeric seconds value that is passed as execution_timeout, while preserving the default when omitted; verify both invocation paths and the long-timeout example behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100