Skip to content

Add --pack filter to 'st2 execution list' (#5839)#6381

Open
anshusingh411 wants to merge 1 commit into
StackStorm:masterfrom
anshusingh411:feat/filter-executions-by-pack
Open

Add --pack filter to 'st2 execution list' (#5839)#6381
anshusingh411 wants to merge 1 commit into
StackStorm:masterfrom
anshusingh411:feat/filter-executions-by-pack

Conversation

@anshusingh411

Copy link
Copy Markdown

Allow filtering action executions by pack name via:

  • CLI: st2 execution list --pack <pack_name>
  • API: GET /v1/executions?pack=<pack_name>

Changes:

  • openapi.yaml.j2: register 'pack' as accepted query param on GET /api/v1/executions (router only passes spec-declared params)
  • execution_views.py: add 'pack' -> 'action.pack' to SUPPORTED_FILTERS so the controller maps pack= to action__pack MongoDB filter
  • action.py: add --pack argument to ActionExecutionListCommand and wire it into the API call
  • execution.py: add MongoDB index on action.pack for query performance
  • test_executions_filters.py: add test_query_by_pack and test_query_by_pack_no_match
  • filters.yaml: update history_views fixture to include pack filter

Resolves: #5839

Allow filtering action executions by pack name via:
  - CLI: st2 execution list --pack <pack_name>
  - API: GET /v1/executions?pack=<pack_name>

Changes:
- openapi.yaml.j2: register 'pack' as accepted query param on
  GET /api/v1/executions (router only passes spec-declared params)
- execution_views.py: add 'pack' -> 'action.pack' to SUPPORTED_FILTERS
  so the controller maps pack= to action__pack MongoDB filter
- action.py: add --pack argument to ActionExecutionListCommand and
  wire it into the API call
- execution.py: add MongoDB index on action.pack for query performance
- test_executions_filters.py: add test_query_by_pack and
  test_query_by_pack_no_match
- filters.yaml: update history_views fixture to include pack filter

Resolves: StackStorm#5839
@pull-request-size pull-request-size Bot added the size/M PR that changes 30-99 lines. Good size to review. label Jun 25, 2026
@CLAassistant

CLAassistant commented Jun 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M PR that changes 30-99 lines. Good size to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter executions by pack

2 participants