Skip to content

Commit

Permalink
run graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
prha committed Jan 22, 2025
1 parent eae8bea commit 6a319db
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ class GrapheneRun(graphene.ObjectType):
hasDeletePermission = graphene.NonNull(graphene.Boolean)
hasConcurrencyKeySlots = graphene.NonNull(graphene.Boolean)
rootConcurrencyKeys = graphene.List(graphene.NonNull(graphene.String))
allPools = graphene.List(graphene.NonNull(graphene.String))
hasUnconstrainedRootNodes = graphene.NonNull(graphene.Boolean)
hasRunMetricsEnabled = graphene.NonNull(graphene.Boolean)

Expand Down Expand Up @@ -622,6 +623,16 @@ def resolve_hasUnconstrainedRootNodes(self, graphene_info: ResolveInfo):

return False

def resolve_allPools(self, graphene_info: ResolveInfo):
if not self.dagster_run.run_op_concurrency:
return None

return (
list(self.dagster_run.run_op_concurrency.all_pools)
if self.dagster_run.run_op_concurrency.all_pools
else []
)

def resolve_rootConcurrencyKeys(self, graphene_info: ResolveInfo):
if not self.dagster_run.run_op_concurrency:
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
status
hasConcurrencyKeySlots
rootConcurrencyKeys
allPools
}
}
}
Expand Down Expand Up @@ -1005,6 +1006,7 @@ def test_run_has_concurrency_slots():
"hasConcurrencyKeySlots"
]
assert result.data["pipelineRunsOrError"]["results"][0]["rootConcurrencyKeys"]
assert result.data["pipelineRunsOrError"]["results"][0]["allPools"]

claim = instance.event_log_storage.claim_concurrency_slot(
"foo", run_id, "fake_step_key"
Expand All @@ -1018,6 +1020,7 @@ def test_run_has_concurrency_slots():
assert result.data["pipelineRunsOrError"]["results"][0]["runId"] == run_id
assert result.data["pipelineRunsOrError"]["results"][0]["hasConcurrencyKeySlots"]
assert result.data["pipelineRunsOrError"]["results"][0]["rootConcurrencyKeys"]
assert result.data["pipelineRunsOrError"]["results"][0]["allPools"]


@pytest.mark.parametrize(
Expand Down

0 comments on commit 6a319db

Please sign in to comment.