Skip to content

Commit 2ad6c1d

Browse files
authored
Append retry id to default Airflow job name to avoid naming collision in retry (#558)
1 parent 9174d5b commit 2ad6c1d

File tree

3 files changed

+121
-103
lines changed

3 files changed

+121
-103
lines changed

CHANGELOG.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
CHANGELOG
33
=========
44

5-
1.16.3
6-
======
5+
1.16.3.dev
6+
==========
77

8+
* bug-fix: Append retry id to default Airflow job name to avoid name collisions in retry
89
* bug-fix: Local Mode: No longer requires s3 permissions to run local entry point file
910

1011
1.16.2

src/sagemaker/utils.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@
2727
import six
2828

2929

30-
AIRFLOW_TIME_MACRO = "{{ execution_date.strftime('%Y-%m-%d-%H-%M-%S') }}"
31-
AIRFLOW_TIME_MACRO_LEN = 19
32-
AIRFLOW_TIME_MACRO_SHORT = "{{ execution_date.strftime('%y%m%d-%H%M') }}"
33-
AIRFLOW_TIME_MACRO_SHORT_LEN = 11
30+
AIRFLOW_RETRY_MACRO = "{{ task_instance.try_number }}"
31+
AIRFLOW_TIME_MACRO = "{{ execution_date.strftime('%Y-%m-%d-%H-%M-%S') }}" + "-{}".format(AIRFLOW_RETRY_MACRO)
32+
AIRFLOW_TIME_MACRO_LEN = 22
33+
AIRFLOW_TIME_MACRO_SHORT = "{{ execution_date.strftime('%y%m%d-%H%M') }}" + "-{}".format(AIRFLOW_RETRY_MACRO)
34+
AIRFLOW_TIME_MACRO_SHORT_LEN = 14
3435

3536

3637
# Use the base name of the image as the job name if the user doesn't give us one

0 commit comments

Comments
 (0)