You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/05 09:37:24 UTC

[GitHub] [airflow] bkossakowska opened a new pull request, #25548: Life Science assets & system tests migration (AIP-47)

bkossakowska opened a new pull request, #25548:
URL: https://github.com/apache/airflow/pull/25548

   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   Life Science assets & system tests migration (AIP-47)
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


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


[GitHub] [airflow] potiuk commented on pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #25548:
URL: https://github.com/apache/airflow/pull/25548#issuecomment-1206684952

   Needs rebase I am afraid :( 


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


[GitHub] [airflow] josh-fell commented on a diff in pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
josh-fell commented on code in PR #25548:
URL: https://github.com/apache/airflow/pull/25548#discussion_r943037793


##########
airflow/providers/google/provider.yaml:
##########
@@ -984,6 +984,8 @@ extra-links:
   - airflow.providers.google.cloud.links.cloud_memorystore.MemcachedInstanceListLink
   - airflow.providers.google.cloud.links.cloud_memorystore.RedisInstanceDetailsLink
   - airflow.providers.google.cloud.links.cloud_memorystore.RedisInstanceListLink
+  - airflow.providers.google.cloud.links.life_sciences.LifesciencesLink

Review Comment:
   ```suggestion
     - airflow.providers.google.cloud.links.life_sciences.LifesciencesLink
   ```
   Looks like a duplicate of sorts and link is named `LifeSciencesLink` which has an entry on the next line.



##########
airflow/providers/google/cloud/links/life_sciences.py:
##########
@@ -0,0 +1,48 @@
+# 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 typing import TYPE_CHECKING, Optional
+
+from airflow.providers.google.cloud.links.base import BaseGoogleLink
+
+if TYPE_CHECKING:
+    from airflow.utils.context import Context
+
+BASE_LINK = "https://console.cloud.google.com/lifesciences"
+LIFESCIENCES_LIST_LINK = BASE_LINK + "/pipelines?project={project_id}"
+
+
+class LifeSciencesLink(BaseGoogleLink):
+    """Helper class for constructing Life Sciences List link"""
+
+    name = "Life Sciences"
+    key = "lifesciences_key"
+    format_str = LIFESCIENCES_LIST_LINK
+
+    @staticmethod
+    def persist(
+        context: "Context",
+        task_instance,
+        project_id: Optional[str],

Review Comment:
   Similar to the [comment in #25466](https://github.com/apache/airflow/pull/25466#discussion_r943033290), based on the URL format `project_id` is required but the typing effectively says both a str and `None` are valid arg types. Perhaps the "proper" fix is to change the typing to `project_id: str` and add a check to ensure `project_id` is not `None` when `persist()` is called in the operator? WDYT?



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


[GitHub] [airflow] potiuk commented on pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #25548:
URL: https://github.com/apache/airflow/pull/25548#issuecomment-1241382399

   Cool. sorry for some delays .... slowly catching up


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


[GitHub] [airflow] lwyszomi commented on pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
lwyszomi commented on PR #25548:
URL: https://github.com/apache/airflow/pull/25548#issuecomment-1291565620

   https://github.com/apache/airflow/issues/9941


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


[GitHub] [airflow] potiuk merged pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #25548:
URL: https://github.com/apache/airflow/pull/25548


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


[GitHub] [airflow] potiuk commented on pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #25548:
URL: https://github.com/apache/airflow/pull/25548#issuecomment-1229062856

   Needs resolving conflicts @bkossakowska !


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


[GitHub] [airflow] bkossakowska commented on a diff in pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
bkossakowska commented on code in PR #25548:
URL: https://github.com/apache/airflow/pull/25548#discussion_r953535694


##########
airflow/providers/google/cloud/links/life_sciences.py:
##########
@@ -0,0 +1,48 @@
+# 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 typing import TYPE_CHECKING, Optional
+
+from airflow.providers.google.cloud.links.base import BaseGoogleLink
+
+if TYPE_CHECKING:
+    from airflow.utils.context import Context
+
+BASE_LINK = "https://console.cloud.google.com/lifesciences"
+LIFESCIENCES_LIST_LINK = BASE_LINK + "/pipelines?project={project_id}"
+
+
+class LifeSciencesLink(BaseGoogleLink):
+    """Helper class for constructing Life Sciences List link"""
+
+    name = "Life Sciences"
+    key = "lifesciences_key"
+    format_str = LIFESCIENCES_LIST_LINK
+
+    @staticmethod
+    def persist(
+        context: "Context",
+        task_instance,
+        project_id: Optional[str],

Review Comment:
   yes, I have changed optional project_id to required



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


[GitHub] [airflow] josh-fell commented on a diff in pull request #25548: Life Science assets & system tests migration (AIP-47)

Posted by GitBox <gi...@apache.org>.
josh-fell commented on code in PR #25548:
URL: https://github.com/apache/airflow/pull/25548#discussion_r943037793


##########
airflow/providers/google/provider.yaml:
##########
@@ -984,6 +984,8 @@ extra-links:
   - airflow.providers.google.cloud.links.cloud_memorystore.MemcachedInstanceListLink
   - airflow.providers.google.cloud.links.cloud_memorystore.RedisInstanceDetailsLink
   - airflow.providers.google.cloud.links.cloud_memorystore.RedisInstanceListLink
+  - airflow.providers.google.cloud.links.life_sciences.LifesciencesLink

Review Comment:
   ```suggestion
     - airflow.providers.google.cloud.links.life_sciences.LifesciencesLink
   ```
   Looks like a duplicate of sorts and the link is named `LifeSciencesLink` which has an entry on the next line.



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