o-nikolas commented on code in PR #24294:
URL: https://github.com/apache/airflow/pull/24294#discussion_r892865165


##########
airflow/providers/amazon/aws/links/emr.py:
##########
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from airflow.providers.amazon.aws.links.base_aws import BASE_AWS_CONSOLE_LINK, 
BaseAwsLink
+
+EMR_CLUSTER_LINK = (
+    BASE_AWS_CONSOLE_LINK + 
"/elasticmapreduce/home?region={region_name}#cluster-details:{job_flow_id}"
+)
+
+
+class EmrClusterLink(BaseAwsLink):

Review Comment:
   If you end up following the above, this module will just contain a single 
5-6 line class, I wonder if it would be better suited to live in the Operator 
module instead of its own module. That way we don't have the extra layer of 
indirection and we also save from creating new modules, directory, init files 
etc.
   
   What do you think?



##########
airflow/providers/amazon/aws/links/emr.py:
##########
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from airflow.providers.amazon.aws.links.base_aws import BASE_AWS_CONSOLE_LINK, 
BaseAwsLink
+
+EMR_CLUSTER_LINK = (

Review Comment:
   Small nit: Any reason not to define this inline inside the class for 
`format_str` (it's only used once there). It seems private to the 
`EmrClusterLink` class and it will get messy if more link classes are added to 
this module in the future (with all the format strings defined outside the 
classes).



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

Reply via email to