Uh oh!
There was an error while loading. Please reload this page.
Correct typo in get_log_url_from_ti - #54248
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
| 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}" |
There was a problem hiding this 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 += "/"
There was a problem hiding this comment.
Could you please also add a test in task-sdk/tests/task_sdk/execution_time/test_task_runner.py?
There was a problem hiding this comment.
rstrip and always add slash could be another approach.
task-sdk/src/airflow/sdk/execution_time/execute_workload.py: default_execution_api_server = f"{base_url.rstrip('/')}/execution/"
airflow-core/src/airflow/executors/local_executor.py: default_execution_api_server = f"{base_url.rstrip('/')}/execution/"
There was a problem hiding this comment.
That can be done too. @jessicaschueler can we make those changes?
AlexisNeiraSonos
commented
Aug 22, 2025
Thank you @mandeepzemo@eladkal for your quick response! I’ll keep an eye on the next release! |
Add forward slash in front of `dags` to `get_log_url_from_ti` method to return usable URL.
The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixesapache#54247Closesapache#54248
The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixesapache#54247Closesapache#54248Closesapache#53884
…5699) The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixesapache#54247Closesapache#54248Closesapache#53884
…5699) The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixesapache#54247Closesapache#54248Closesapache#53884
The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixes #54247 Closesapache/airflow#54248Closesapache/airflow#53884 (cherry picked from commit 3e1638250fb8f58a399ad8c5946dbb77a079f63d) GitOrigin-RevId: 09560358e062f238e89018dc45dba44fb382b747
The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixes #54247 Closesapache/airflow#54248Closesapache/airflow#53884 (cherry picked from commit 3e1638250fb8f58a399ad8c5946dbb77a079f63d) GitOrigin-RevId: 09560358e062f238e89018dc45dba44fb382b747
The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixes #54247 Closesapache/airflow#54248Closesapache/airflow#53884 GitOrigin-RevId: 3e1638250fb8f58a399ad8c5946dbb77a079f63d
The `RuntimeTaskInstance.log_url` property incorrectly concatenated base_url with the path, causing malformed URLs when base_url didn't end with a slash. Fixes #54247 Closesapache/airflow#54248Closesapache/airflow#53884 (cherry picked from commit 3e1638250fb8f58a399ad8c5946dbb77a079f63d) GitOrigin-RevId: 09560358e062f238e89018dc45dba44fb382b747
Add forward slash in front of
dagstoget_log_url_from_timethod to return usable URL.Closes#54247