-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Correct typo in get_log_url_from_ti
#54248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can be done too. @jessicaschueler can we make those changes?
|
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. Fixes apache#54247 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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. Fixes apache#54247 Closes apache#54248 Closes apache#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 Closes apache/airflow#54248 Closes apache/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