Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 15, 2023
1 parent 541fde7 commit 00a5dad
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions python_modules/dagster/dagster/_core/execution/context/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,9 +1381,9 @@ def _get_deprecation_kwargs(attr: str):
return deprecation_kwargs


class RunInfo(
class RunProperties(
NamedTuple(
"_RunInfo",
"_RunProperties",
[
("run_id", PublicAttr[str]),
("dagster_run", PublicAttr[DagsterRun]),
Expand All @@ -1406,7 +1406,7 @@ def __new__(
run_config: Mapping[str, object],
retry_number: int,
):
return super(RunInfo, cls).__new__(
return super(RunProperties, cls).__new__(
cls,
run_id=run_id,
dagster_run=dagster_run,
Expand All @@ -1420,12 +1420,7 @@ def __init__(self, op_execution_context: OpExecutionContext) -> None:
self._op_execution_context = check.inst_param(
op_execution_context, "op_execution_context", OpExecutionContext
)
self._run_info = RunInfo(
run_id=self._op_execution_context.run_id,
run_config=self._op_execution_context.run_config,
dagster_run=self._op_execution_context.run,
retry_number=self._op_execution_context.retry_number,
)
self._run_props = None

@staticmethod
def get() -> "AssetExecutionContext":
Expand All @@ -1439,8 +1434,16 @@ def op_execution_context(self) -> OpExecutionContext:
return self._op_execution_context

@property
def run_info(self) -> RunInfo:
return self._run_info
def run_properties(self) -> RunProperties:
if self._run_props is None:
self._run_props = RunProperties(
run_id=self._op_execution_context.run_id,
run_config=self._op_execution_context.run_config,
dagster_run=self._op_execution_context.run,
retry_number=self._op_execution_context.retry_number,
)

return self._run_props

######## Deprecated methods

Expand Down

0 comments on commit 00a5dad

Please sign in to comment.