uranusjr commented on a change in pull request #20814:
URL: https://github.com/apache/airflow/pull/20814#discussion_r782674196



##########
File path: airflow/providers/amazon/aws/hooks/logs.py
##########
@@ -99,7 +97,7 @@ def get_log_events(
 
             yield from events
 
-            if 'nextForwardToken' in response:
+            if next_token != response['nextForwardToken']:

Review comment:
       Probably OK to just fail if the response format changes. An exception 
raised here (assuming the hook is used in a DAG) would eventually be caught by 
the test runner and logged to the task logs, which would clearly signal the 
problem (the API has an unexpected change in format). If we silently fall back 
to None, it would be more difficult to debug later if the API changed format 
unexpected (missing `nextForwardToken`), or actually returned 
`"nextForwardToken": null` (which is expected and signals a valid scenario, 
indicating we or the user may have logical bugs in the workflow).




-- 
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]


Reply via email to