Skip to content

Commit

Permalink
thread pool information to graphql layer
Browse files Browse the repository at this point in the history
  • Loading branch information
prha committed Jan 6, 2025
1 parent 5ff2171 commit 2050fcc
Show file tree
Hide file tree
Showing 8 changed files with 1,017 additions and 391 deletions.

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

4 changes: 4 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 @@ -240,6 +240,7 @@ class GrapheneAssetNode(graphene.ObjectType):
backfillPolicy = graphene.Field(GrapheneBackfillPolicy)
changedReasons = graphene.Field(non_null_list(GrapheneAssetChangedReason))
computeKind = graphene.String()
pools = non_null_list(graphene.String)
configField = graphene.Field(GrapheneConfigTypeField)
dataVersion = graphene.Field(graphene.String(), partition=graphene.String())
dataVersionByPartition = graphene.Field(
Expand Down Expand Up @@ -671,6 +672,9 @@ def _get_config_type(key: str):
field_snap=node_def_snap.config_field_snap,
)

def resolve_pools(self, _graphene_info: ResolveInfo) -> Sequence[str]:
return sorted([pool for pool in self._asset_node_snap.pools or set()])

def resolve_computeKind(self, _graphene_info: ResolveInfo) -> Optional[str]:
return self._asset_node_snap.compute_kind

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ def resolve_assetNodes(self, graphene_info: ResolveInfo) -> Sequence["GrapheneAs
class GrapheneSolidDefinition(graphene.ObjectType, ISolidDefinitionMixin):
config_field = graphene.Field(GrapheneConfigTypeField)
required_resources = non_null_list(GrapheneResourceRequirement)
pool = graphene.String()

class Meta:
interfaces = (GrapheneISolidDefinition,)
Expand Down Expand Up @@ -501,6 +502,9 @@ def resolve_required_resources(
GrapheneResourceRequirement(key) for key in self._solid_def_snap.required_resource_keys
]

def resolve_pool(self, _graphene_info: ResolveInfo) -> Optional[str]:
return self._solid_def_snap.pool


class GrapheneSolidStepStatsUnavailableError(graphene.ObjectType):
class Meta:
Expand Down
Loading

0 comments on commit 2050fcc

Please sign in to comment.