https://dagster.io/ logo
Title
p

paul.q

04/16/2021, 6:49 AM
I'm trying to write a GraphQL query that will be used to provide stats to a dashboard (outside Dagit) about the status of pipeline run. If the pipeline has failed we need to provide the step that failed along with any error message. In simple terms, I can get the pipeline and step statuses as follows:
query PipelineRun {
pipelineRunOrError(runId: "7b509160-1661-4a2a-bdf7-3f0b22e7fae5") { __typename ... on PipelineRun { runId status stepStats { stepKey status } } } } Now, to get the error message, I see that the computeLogs member of PipelineRun requires a stepKey. Do I need a second call to get this? Something like:
query PipelineRun {
pipelineRunOrError(runId: "7b509160-1661-4a2a-bdf7-3f0b22e7fae5") { __typename ... on PipelineRun { computeLogs(stepKey: <step_that_failed>) { stderr { downloadUrl } } } } } Maybe I'm missing something? Doesn't seem possible to get what I want in one call. Thanks Paul
a

alex

04/16/2021, 2:18 PM
ya this isn’t set to be able to get it all in one query at this time. You could file an issue to request the feature
p

paul.q

04/17/2021, 5:24 AM
That's OK. I realise it's actually the pipleineRunLogs I need in any case. That was only available via a GraphQL subscription which is not quite what I needed for historical purposes, so I get errors for the runid and step_key using DagsterInstance.