syedahsn commented on code in PR #36828:
URL: https://github.com/apache/airflow/pull/36828#discussion_r1456470327
##########
airflow/providers/amazon/aws/operators/ec2.py:
##########
@@ -183,22 +183,36 @@ def execute(self, context: Context):
MaxCount=self.max_count,
**self.config,
)["Instances"]
- instance_ids = []
- for instance in instances:
- instance_ids.append(instance["InstanceId"])
- self.log.info("Created EC2 instance %s", instance["InstanceId"])
+
+ instance_ids = self._on_kill_instance_ids = [instance["InstanceId"]
for instance in instances]
Review Comment:
I'm not sure if I'm understanding this correctly, but what is the purpose of
`_on_kill_instance_ids`? `instance_ids` is not modified anywhere (that I can
see), so wouldn't they both be the same. Would it be better to just define
`self.instance_ids`?
--
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]