aeroyorch commented on code in PR #65932:
URL: https://github.com/apache/airflow/pull/65932#discussion_r4153097614
##########
airflow-core/tests/unit/plugins/priority_weight_strategy.py:
##########
@@ -44,7 +44,7 @@ class DecreasingPriorityStrategy(PriorityWeightStrategy):
"""A priority weight strategy that decreases the priority weight with each
attempt."""
def get_weight(self, ti: TaskInstance):
- return max(3 - ti.try_number + 1, 1)
+ return max(3 - (ti.try_number or 0) + 1, 1)
Review Comment:
well, this is something I discovered some time ago using the decreasing
priority example. In fact, I opened a related PR a few months ago:
https://github.com/apache/airflow/pull/62148
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]