StackStorm / StackStorm/st2

Add Timeout Option for st2 pack install

Open
#6,349 4 comments 0 reactions 0 assignees View on GitHub

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 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:

$ 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.