From bf14de6d888399aed4bd98cc30c750c755e74721 Mon Sep 17 00:00:00 2001 From: OwenKephart Date: Fri, 13 Sep 2024 10:36:38 -0700 Subject: [PATCH] Update name property of DepConditionWrapperCondition (#24479) ## Summary & Motivation The `name` property is now favored in the UI over `description`, and has a default value of the name of the class. This meant that in rows where we evaluated something against a specfic asset, it would render as DepConditionWrapperCondition instead of the asset name. ## How I Tested These Changes looked at the UI ## Changelog [ui] Fixed an issue that would cause some AutomationCondition evaluations to be labeled `DepConditionWrapperCondition` instead of the key that they were evaluated against. - [ ] `NEW` _(added new feature or capability)_ - [x] `BUGFIX` _(fixed a bug)_ - [ ] `DOCS` _(added or updated documentation)_ --- .../declarative_automation/operators/dep_operators.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python_modules/dagster/dagster/_core/definitions/declarative_automation/operators/dep_operators.py b/python_modules/dagster/dagster/_core/definitions/declarative_automation/operators/dep_operators.py index 7a2917d1448db..47332f614168a 100644 --- a/python_modules/dagster/dagster/_core/definitions/declarative_automation/operators/dep_operators.py +++ b/python_modules/dagster/dagster/_core/definitions/declarative_automation/operators/dep_operators.py @@ -28,9 +28,13 @@ class DepConditionWrapperCondition(AutomationCondition): operand: AutomationCondition label: Optional[str] = None + @property + def name(self) -> str: + return self.dep_key.to_user_string() + @property def description(self) -> str: - return f"{self.dep_key.to_user_string()}" + return self.dep_key.to_user_string() def evaluate(self, context: AutomationContext) -> AutomationResult: # only evaluate parents of the current candidates