You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vincbeck (via GitHub)" <gi...@apache.org> on 2023/05/03 13:23:32 UTC

[GitHub] [airflow] vincbeck commented on a diff in pull request #31032: Add extras links to some more EMR Operators and Sensors

vincbeck commented on code in PR #31032:
URL: https://github.com/apache/airflow/pull/31032#discussion_r1183678471


##########
airflow/providers/amazon/aws/links/emr.py:
##########
@@ -33,3 +40,23 @@ class EmrLogsLink(BaseAwsLink):
     name = "EMR Cluster Logs"
     key = "emr_logs"
     format_str = BASE_AWS_CONSOLE_LINK + "/s3/buckets/{log_uri}?region={region_name}&prefix={job_flow_id}/"
+
+
+def get_log_uri(
+    *, cluster: dict[str, Any] | None = None, emr_client: boto3.client = None, job_flow_id: str | None = None
+) -> str:
+    """
+    Retrieves the S3 URI to the EMR Job logs.  Requires either the output of a
+    describe_cluster call or both an EMR Client and a job_flow_id to look it up.
+    """
+    if not exactly_one(cluster, emr_client and job_flow_id):

Review Comment:
   lgtm



-- 
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