You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ferruzzi (via GitHub)" <gi...@apache.org> on 2024/01/23 01:47:45 UTC
[PR] Ferruzzi/athena logs [airflow]
ferruzzi opened a new pull request, #36962:
URL: https://github.com/apache/airflow/pull/36962
Just some whitespace changes to make the Athena query log messages look more readable in the logs.
Before:

After:

closes: https://github.com/apache/airflow/issues/34189
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix `log_query` to format SQL statement correctly in `AthenaOperator` [airflow]
Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on PR #36962:
URL: https://github.com/apache/airflow/pull/36962#issuecomment-1908616937
@dirrao I didn't add any test cases because it's just reformatting a string. Could you suggest a test case you'd like to see? I thought of two: one with a single-line query and one with a multi-line query which each assert the expected number of newlines in the log message, but that seems overly complicated for what it is... I think it would be something like "capture all logs, for each captured log message, if it contains 'Running Query with params' then assert it has the expected number of line breaks"... It seems maybe excessive but I can add it if you think it's important.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ferruzzi/athena logs [airflow]
Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #36962:
URL: https://github.com/apache/airflow/pull/36962#discussion_r1463700875
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -721,6 +721,7 @@ def _process_executor_events(self, session: Session) -> int:
if state == TaskInstanceState.QUEUED:
ti.external_executor_id = info
self.log.info("Setting external_id for %s to %s", ti, info)
+ session.commit()
Review Comment:
Yeah, it's part of a different PR. Thanks for checking.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ferruzzi/athena logs [airflow]
Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #36962:
URL: https://github.com/apache/airflow/pull/36962#discussion_r1463848673
##########
airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:
##########
@@ -470,3 +482,44 @@ def get_container(self, container_list):
if container["name"] == self.container_name:
return container
raise KeyError(f"No such container found by container name: {self.container_name}")
+
+ def try_adopt_task_instances(self, tis: Sequence[TaskInstance]) -> Sequence[TaskInstance]:
Review Comment:
Yeah, I had some git issues in another PR I was working on at the same time and thought I untangled them, but it looks like I didn't sort out this branch.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ferruzzi/athena logs [airflow]
Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #36962:
URL: https://github.com/apache/airflow/pull/36962#discussion_r1463953067
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -721,6 +721,7 @@ def _process_executor_events(self, session: Session) -> int:
if state == TaskInstanceState.QUEUED:
ti.external_executor_id = info
self.log.info("Setting external_id for %s to %s", ti, info)
+ session.commit()
Review Comment:
This is fixed now, sorry for the confusion.
##########
airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:
##########
@@ -470,3 +482,44 @@ def get_container(self, container_list):
if container["name"] == self.container_name:
return container
raise KeyError(f"No such container found by container name: {self.container_name}")
+
+ def try_adopt_task_instances(self, tis: Sequence[TaskInstance]) -> Sequence[TaskInstance]:
Review Comment:
This is fixed now, sorry for the confusion.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ferruzzi/athena logs [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #36962:
URL: https://github.com/apache/airflow/pull/36962#discussion_r1462685910
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -721,6 +721,7 @@ def _process_executor_events(self, session: Session) -> int:
if state == TaskInstanceState.QUEUED:
ti.external_executor_id = info
self.log.info("Setting external_id for %s to %s", ti, info)
+ session.commit()
Review Comment:
I think this is unrelated change?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix `log_query` to format SQL statement correctly in `AthenaOperator` [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #36962:
URL: https://github.com/apache/airflow/pull/36962#issuecomment-1913485512
> Could you suggest a test case you'd like to see?
I think 1 unit test for `query_params_to_string` that gets a mock of `params` and verify the expected result of the function is enough.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ferruzzi/athena logs [airflow]
Posted by "syedahsn (via GitHub)" <gi...@apache.org>.
syedahsn commented on code in PR #36962:
URL: https://github.com/apache/airflow/pull/36962#discussion_r1463718763
##########
airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:
##########
@@ -470,3 +482,44 @@ def get_container(self, container_list):
if container["name"] == self.container_name:
return container
raise KeyError(f"No such container found by container name: {self.container_name}")
+
+ def try_adopt_task_instances(self, tis: Sequence[TaskInstance]) -> Sequence[TaskInstance]:
Review Comment:
I think the commits might have gotten mixed up here. This PR is doing 2 unrelated things it seems.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org