-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Boto3 API calls in ECSOperator #16050
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
|
👋 @darwinyip, since you added the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a straight_forward fix.
Reopened to rebuild it. |
@scottypate can you rebase? it will most likely solve the CI build issue |
ecs_task_family = task_def_resp['taskDefinition']['family'] | ||
|
||
list_tasks_resp = self.client.list_tasks( | ||
cluster=self.cluster, launchType=self.launch_type, desiredStatus='RUNNING', family=ecs_task_family | ||
cluster=self.cluster, desiredStatus='RUNNING', family=ecs_task_family |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you decide which of the two arguments to drop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the op explained it in the PR description. I think it makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, must have missed that!
Awesome work, congrats on your first merged pull request! |
This PR corrects two errors that can occur when utilizing the parameter
reattach=True
. These two errors are detailed below.describe_task_definition()
function requires a named keyword argument instead of a positional argument. The current error generated is...list_tasks()
function cannot provide bothlaunch_type
andfamily
as a filter criteria. The current error generated is...When creating a task definition with the same family name but changing the
launch_type
, then it creates a new revision of the task with the same family name. I removed thislaunch_type
parameter from this function. The ECS task will be running the latest version of the task definition and I don't think it would be possible to be running the same family of task definition on multiplelaunch_type
strategies.