Skip to content

Detecting broken code location in Kubernetes deployment #23958

Answered by garethbrickman
chrishiste asked this question in Q&A
Discussion options

You must be logged in to vote

You could use the GraphQL API with the below query to check on the state / health of code locations:

query LocationStatusesQuery {
  workspaceOrError {
	  ... on Workspace{
      locationEntries {
        ... on WorkspaceLocationEntry {
          id
          loadStatus
          locationOrLoadError {
            __typename
          }
        }
      }
    }
  }
}

loadStatus will be LOADING or LOADED. You can use that additional locationOrLoadError field to distinguish between error and not. If the typename is PythonError, it loaded with an error state. If it's a RepositoryLocation it loaded in a working state.

Example response:

{'data': {'workspaceOrError': {'locationEntries': [{'id': 'c…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@chrishiste
Comment options

@chrishiste
Comment options

Answer selected by chrishiste
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
deployment: k8s Related to deploying Dagster to Kubernetes area: code-locations Related to Code Locations and Definitions
2 participants