https://dagster.io/ logo
#random
Title
# random
s

Stefan Adelbert

03/10/2024, 10:56 PM
Linking Runs to Jobs I'm using GraphQL to extract data about jobs and runs from several dagster deployments to give myself an overall view. I'm trying to make link between a run back to the its job. From what I can tell, when looking at
runsOrError
, a run refers to the repository its job belongs to by id and name (
repositoryOrigin.[id|repositoryName]
). But the only reference to the actual job is by name (
jobName
). See screenshot of
type Run
. Of course the connection could be made by
jobName
, but a job could get removed from a repository and replaced with a different job by the same name, which would mean that linking by
jobName
would be giving bad results. It would be cleaner to be able to make the connection by
Job.id
. When instead looking at
repositoriesOrError
, it's clear that a job does have an ID. Interestingly both Run and Job have
pipelineSnapshotId
, but this is not the same as
Job.id
. Perhaps there is subtlety there I don't understand. Is anyone able to explain please?
I've done a bit of testing and it seems like making certain changes to a job changes its
pipelineSnapshotId
, for example modifying its metadata. But changing the code of an op that the job includes doesn't change the
pipelineSnapshotId
. Anyone with any insights here, please let me know.