Repository navigation
Jg/ignore failed scans #1811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Jg/ignore failed scans #1811
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ argocd: | |
|
|
||
| events: | ||
| enabled: true | ||
| targetRevision: HEAD | ||
| extraValueFiles: | ||
| - staging-values.yaml | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ class RetryBehaviour(BaseModel): | |
| class TriggerWorkflow(BaseModel): | ||
| template: str | ||
| triggerOnMessageType: Literal["start", "stop"] | None = None | ||
| exitStatusWhitelist: list[str] | ||
| parameters: list[WorkflowParameter] | ||
| retryBehaviour: RetryBehaviour | None = None | ||
|
|
||
|
|
@@ -123,6 +124,13 @@ def sync(self, parent: dict, related: dict) -> SyncResponse: | |
| "value": [workflow.triggerOnMessageType], | ||
| }) | ||
|
|
||
| if workflow.exitStatusWhitelist and source_type == "message-bus": | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hadn't really, but you're right, that might be easier at this point than having separate fields for each part of the message that users want to filter on. I'll switch it over and see if it still feels intuitive to use |
||
| dataFilters.append({ | ||
| "path": "body.doc.exit_status", | ||
| "type": "string", | ||
| "value": workflow.exitStatusWhitelist | ||
| }) | ||
|
|
||
| if namespace != "events": | ||
| dataFilters.append({ | ||
| "path": "body.doc.instrument_session", | ||
|
|
||
There was a problem hiding this comment.
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"?