Add deployment filters to flow run triggers#22319
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94e352dc44
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return prefectResourceIds.every((value) => | ||
| allowedRelatedResources.some((resource) => value.startsWith(resource)), |
There was a problem hiding this comment.
Avoid treating mixed flow/tag filters as a template
When an existing custom trigger has match_related specs for both prefect.flow.* and prefect.tag.*, this predicate now returns true just because every ID has one of the allowed prefixes. That sends the trigger through the flow-run-state form even though FlowRunStateTriggerFields hides tags whenever flows are selected and its builder assumes only one of flow/tag is present, so changing a flow or deployment rewrites the hidden tag constraint away. The guard should allow deployment to combine with either flow or tag, but not make unsupported flow+tag filters look editable as this template.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@samiat4911 this comment will need to be addressed before we can merge this PR
There was a problem hiding this comment.
okay no problem thanks for the feedback
|
hello @desertaxle please can you review the update I just made? thanks |
Summary
Closes #8253
This PR adds deployment filtering to flow run state automation triggers in the React UI.
The backend already supports matching related deployment resources through
match_related, but the flow run state trigger form only exposed flow and tag filters. This updates the UI to let users scope flow run state automations to deployments, preserves multi-resourcematch_relatedvalues when editing automations, and shows deployment filters in trigger details.Changes include:
match_relatedas either a single resource spec or an array of resource specsmatch_relatedvalues in edit modeChecklist
#8253"mint.json.