amoghrajesh commented on code in PR #54248:
URL: https://github.com/apache/airflow/pull/54248#discussion_r2262038890
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -594,7 +594,7 @@ def get_log_url_from_ti(ti: RuntimeTaskInstance) -> str:
try_number = (
f"?try_number={try_number_value}" if try_number_value is not None and
try_number_value > 0 else ""
)
- _log_uri =
f"{base_url}dags/{ti.dag_id}/runs/{run_id}/tasks/{ti.task_id}{map_index}{try_number}"
+ _log_uri =
f"{base_url}/dags/{ti.dag_id}/runs/{run_id}/tasks/{ti.task_id}{map_index}{try_number}"
Review Comment:
For the default value, it may make sense but for user supplied values, we
should ideally do:
```
if not base_url.endswith("/"):
base_url += "/"
```
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -594,7 +594,7 @@ def get_log_url_from_ti(ti: RuntimeTaskInstance) -> str:
try_number = (
f"?try_number={try_number_value}" if try_number_value is not None and
try_number_value > 0 else ""
)
- _log_uri =
f"{base_url}dags/{ti.dag_id}/runs/{run_id}/tasks/{ti.task_id}{map_index}{try_number}"
+ _log_uri =
f"{base_url}/dags/{ti.dag_id}/runs/{run_id}/tasks/{ti.task_id}{map_index}{try_number}"
Review Comment:
Could you please also add a test in
`task-sdk/tests/task_sdk/execution_time/test_task_runner.py`?
--
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]