You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/10/28 21:07:16 UTC

[PR] Add Duckdb as devel dependency [airflow]

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

   Duckdb becomes very popular and we already have some examples that are using duckdb in examples. This makes those examples fail in the breeze CI environment. Having duckdb in the environment would be great. Duckdb has no other python requirements - it's written in C++ mostly and only has wrapper in Python with C-bindings, so it does not introduce dependency problems.
   
   DuckDB maintainers release multiple binary packages for pretty much any platform out there - also they have conda release available, so it is pretty safe to include it.
   
   <!--
    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/
   -->
   
   
   
   <!-- 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] Add Duckdb as devel dependency [airflow]

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


##########
setup.py:
##########
@@ -443,6 +443,10 @@ def write_version(filename: str = str(AIRFLOW_SOURCES_ROOT / "airflow" / "git_ve
     "wheel",
 ]
 
+_devel_only_duckdb = [
+    "duckdb>0.9.0",

Review Comment:
   ```suggestion
       "duckdb>=0.9.0",
   ```



-- 
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] Add Duckdb as devel dependency [airflow]

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

   Most importantly it will avoids this messsage on initdb in Breeze :)
   
   ```
   [2023-10-28T21:14:16.458+0000] {db.py:1620} INFO - Creating tables
   INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
   INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
   ERROR [airflow.models.dagbag.DagBag] Failed to import: /opt/airflow/airflow/example_dags/tutorial_objectstorage.py
   Traceback (most recent call last):
     File "/opt/airflow/airflow/models/dagbag.py", line 344, in parse
       loader.exec_module(new_module)
     File "<frozen importlib._bootstrap_external>", line 843, in exec_module
     File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
     File "/opt/airflow/airflow/example_dags/tutorial_objectstorage.py", line 133, in <module>
       tutorial_objectstorage()
     File "/opt/airflow/airflow/models/dag.py", line 3914, in factory
       f(**f_kwargs)
     File "/opt/airflow/airflow/example_dags/tutorial_objectstorage.py", line 66, in tutorial_objectstorage
       import duckdb
   ModuleNotFoundError: No module named 'duckdb'
   
   ```
    


-- 
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] Add Duckdb as devel dependency [airflow]

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


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