SameerMesiah97 commented on code in PR #70474:
URL: https://github.com/apache/airflow/pull/70474#discussion_r3653189332
##########
providers/amazon/src/airflow/providers/amazon/aws/triggers/ecs.py:
##########
@@ -167,6 +171,9 @@ def __init__(
self.log_group = log_group
self.log_stream = log_stream
+ # Triggers serialized before this parameter existed deserialize with
None, keeping the
+ # previous behaviour of reading logs from the cluster region.
+ self.log_region_name = log_region_name if log_region_name is not None
else region_name
Review Comment:
Since `log_region_name` is immediately resolved to `region_name` when
omitted, `self.log_region_name` is never actually `None`. Would it make more
sense to perform this fallback when constructing the `AwsLogsHook` instead, so
the original parameter value is preserved? I think either approach works, but
handling the fallback at the point of use avoids one parameter implicitly
altering the value of another during initialization
--
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]