Skip to content

Jg/ignore failed scans - #1811

Open
JamesDoingStuff wants to merge 2 commits into
mainfrom
jg/ignore-failed-scans
Open

JamesDoingStuff wants to merge 2 commits into
mainfrom
jg/ignore-failed-scans

Conversation

@JamesDoingStuff

Copy link
Copy Markdown
Collaborator

AP-1358

If a whitelist of scan message outcomes is specified, apply a filter on the Sensor. Outcome options taken from https://github.com/bluesky/event-model/blob/main/src/event_model/documents/run_stop.py

@JamesDoingStuff JamesDoingStuff self-assigned this Nov 9, 2026
@JamesDoingStuff
JamesDoingStuff requested a review from a team November 9, 2026 16:29
class TriggerWorkflow(BaseModel):
template: str
triggerOnMessageType: Literal["start", "stop"] | None = None
exitStatusWhitelist: list[str]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a better name be "triggerOnExitStatus"?

"value": [workflow.triggerOnMessageType],
})

if workflow.exitStatusWhitelist and source_type == "message-bus":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that you are following the pre-existing example of the triggerOnMessageType setting. But this design couples the Trigger CR interface strongly to the format of the message being emitted by the beamline.

Did you consider exposing "dataFilters" more directly to give consumers of this API more flexibility?

This branch has not been deployed

No deployments
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.

2 participants