Skip to content

Allow custom query in DeleteExecutionsParams#10176

Draft
jiechenz wants to merge 2 commits intomainfrom
jiechenz/allow-override-query-in-sys-delete-workflow
Draft

Allow custom query in DeleteExecutionsParams#10176
jiechenz wants to merge 2 commits intomainfrom
jiechenz/allow-override-query-in-sys-delete-workflow

Conversation

@jiechenz
Copy link
Copy Markdown
Contributor

@jiechenz jiechenz commented May 5, 2026

What changed?

Added a Query field to deleteexecutions.DeleteExecutionsParams and propagated it through DeleteExecutionsWorkflow into both GetNextPageTokenActivity and DeleteExecutionsActivity.

The activities now pass params.Query through sadefs.QueryWithAnyNamespaceDivision(...) when listing workflow executions, so delete-executions can target a filtered subset instead of always scanning the full namespace.

Why?

Allow a custom query to specifically select a subset of workflows to delete.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Ran:

go test -tags test_dep ./service/worker/deletenamespace/...

Potential risks

The main risk is callers passing an overly broad or malformed query. Existing visibility listing errors will fail the workflow, and empty query behavior remains equivalent to the previous full-namespace deletion path via QueryWithAnyNamespaceDivision("").

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant