From 9eac30567d1dab847d10e784b74e6103bb7cd579 Mon Sep 17 00:00:00 2001 From: Amogh Desai Date: Mon, 6 May 2024 12:49:03 +0530 Subject: [PATCH] Updating S3LogLink with an invalid bucket link (#39424) --- docs/apache-airflow/howto/define-extra-link.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/apache-airflow/howto/define-extra-link.rst b/docs/apache-airflow/howto/define-extra-link.rst index a92690dd808257..51df8535698af5 100644 --- a/docs/apache-airflow/howto/define-extra-link.rst +++ b/docs/apache-airflow/howto/define-extra-link.rst @@ -99,7 +99,11 @@ tasks using :class:`~airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Ope operators = [GCSToS3Operator] def get_link(self, operator: BaseOperator, *, ti_key: TaskInstanceKey): - return "https://s3.amazonaws.com/airflow-logs/{dag_id}/{task_id}/{run_id}".format( + # Invalid bucket name because upper case letters and underscores are used + # This will not be a valid bucket in any region + bucket_name = "Invalid_Bucket_Name" + return "https://s3.amazonaws.com/airflow-logs/{bucket_name}/{dag_id}/{task_id}/{run_id}".format( + bucket_name=bucket_name, dag_id=operator.dag_id, task_id=operator.task_id, run_id=ti_key.run_id,