Skip to content

Commit

Permalink
fix execution context init for assets context:
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 17, 2023
1 parent c203d10 commit 810a2a9
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1463,10 +1463,9 @@ def __init__(self, op_execution_context: OpExecutionContext) -> None:

self._run_props = None

self._execution_props = ExecutionProperties(
step_description=f"asset {self.assets_def.node_def.name}",
op_execution_context=self._op_execution_context,
)
# start execution_props as None since enter_execution_context builds an AssetExecutionContext
# for all steps (including ops) and ops will fail on self.assets_def call
self._execution_props = None

@staticmethod
def get() -> "AssetExecutionContext":
Expand All @@ -1492,6 +1491,11 @@ def run_properties(self) -> RunProperties:

@property
def execution_properties(self) -> ExecutionProperties:
if self._execution_props is None:
self._execution_props = ExecutionProperties(
step_description=f"asset {self.assets_def.node_def.name}",
op_execution_context=self._op_execution_context,
)
return self._execution_props

######## Deprecated methods
Expand Down

0 comments on commit 810a2a9

Please sign in to comment.