You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "adam133 (via GitHub)" <gi...@apache.org> on 2023/12/15 22:24:48 UTC

[PR] fix typos in DatabricksSubmitRunOperator [airflow]

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

   <!--
    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.
    -->
   
   <!--
   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/
   -->
   
   Finally got around to trying this, realized I had a couple major typos in my original PR. Works to execute by pipeline name after these two changes.
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ 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+Improvement+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


Re: [PR] fix typos in DatabricksSubmitRunOperator [airflow]

Posted by "adam133 (via GitHub)" <gi...@apache.org>.
adam133 commented on PR #36248:
URL: https://github.com/apache/airflow/pull/36248#issuecomment-1865068066

   > > I can try, but it'll take me a bit to understand how the testing code works. Might need some pointers
   > 
   > Best to look at other, neighbouring tests and do it in s similar way. TESTING.rst contains detailed description of different kinds of tests we have and how to run them locally
   
   Alright, took a bit but I got some good tests in there. Found a few more bugs along the way.


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


Re: [PR] fix typos in DatabricksSubmitRunOperator [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #36248:
URL: https://github.com/apache/airflow/pull/36248#issuecomment-1861831466

   > I can try, but it'll take me a bit to understand how the testing code works. Might need some pointers
   
   Best to look at other, neighbouring tests and do it in s similar way. TESTING.rst contains detailed description of different kinds of tests we have and how to run them locally 


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


Re: [PR] fix typos in DatabricksSubmitRunOperator [airflow]

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on code in PR #36248:
URL: https://github.com/apache/airflow/pull/36248#discussion_r1428820942


##########
airflow/providers/databricks/operators/databricks.py:
##########
@@ -521,7 +521,7 @@ def execute(self, context: Context):
         ):
             # If pipeline_id is not provided, we need to fetch it from the pipeline_name
             pipeline_name = self.json["pipeline_task"]["pipeline_name"]
-            self.json["pipeline_task"]["pipeline_id"] = self._hook.get_pipeline_id(pipeline_name)

Review Comment:
   I wonder why Mypy didn't block #32903 which added this call to the non-existing method. @potiuk do you have an idea?



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


Re: [PR] fix typos in DatabricksSubmitRunOperator [airflow]

Posted by "adam133 (via GitHub)" <gi...@apache.org>.
adam133 commented on PR #36248:
URL: https://github.com/apache/airflow/pull/36248#issuecomment-1861144152

   > Would you mind adding tests for the DatabricksHook to cover this for the future please?
   
   I can try, but it'll take me a bit to understand how the testing code works. Might need some pointers


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


Re: [PR] fix typos in DatabricksSubmitRunOperator [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #36248:
URL: https://github.com/apache/airflow/pull/36248


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


Re: [PR] fix typos in DatabricksSubmitRunOperator [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #36248:
URL: https://github.com/apache/airflow/pull/36248#discussion_r1428844884


##########
airflow/providers/databricks/operators/databricks.py:
##########
@@ -521,7 +521,7 @@ def execute(self, context: Context):
         ):
             # If pipeline_id is not provided, we need to fetch it from the pipeline_name
             pipeline_name = self.json["pipeline_task"]["pipeline_name"]
-            self.json["pipeline_task"]["pipeline_id"] = self._hook.get_pipeline_id(pipeline_name)

Review Comment:
   It's a mistery . MyPy uses a number of heuristics to find types of particular objects and sometime it gives up or sometimes drop types if they are too complex to analyse. Generally MyPy's behaveriour is often non-deterministic/difficult to reason about.



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