lascott opened a new issue #9168:
URL: https://github.com/apache/airflow/issues/9168


   **Description**
   Incompatible dependency constraints, or undocumented resolution of 
jsconschema v aitflow
   
   **airflow jsonschema constraint**
   - jsonschema >=3.0.0,<3.1.0  # [py<38]
   - ensure jsonschema version is < 3.0.0 in setup.py
   
     
https://github.com/conda-forge/airflow-feedstock/blob/master/recipe/meta.yaml
     Very few online results, but in poetry, this was resolve by dropping to a 
version < 3.0.0
      https://github.com/python-poetry/poetry/issues/2312
      https://github.com/zalando/connexion/pull/708 
   
   
   **Related Issues**:
   #8993 #8880  #8605
   
   **Apache Airflow version**:
   airflow                   1.10.10          py37hc8dfbb8_0    conda-forge
   airflow-with-celery       1.10.10                       0    conda-forge
   airflow-with-jira         1.10.10                       0    conda-forge
   airflow-with-postgres     1.10.10                       0    conda-forge
   airflow-with-redis        1.10.10                       0    conda-forge
   airflow-with-samba        1.10.10                       0    conda-forge
   airflow-with-ssh          1.10.10                       0    conda-forge
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl 
version`): None
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: local
   - **OS** Linux Mint 19.1 Tessa
   - **Kernel** : 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 
2020 x86_64 x86_64 x86_64 GNU/Linux
   - **Install tools**:  
   
       conda env create -f avm-${FILE_IN}.yaml
   <details><summary>avm-prod-test.yaml minimal airflow set to reproduce 
</summary> # https://docs.anaconda.com/anaconda/packages/pkg-docs/
   # 
   # Production overnight schedulers,
   # You can add your own there
   # ---------------------------------
   #
   name: avm-prod-test
   channels:
     - conda-forge
     - defaults
   
   dependencies:
     - python=3.7
     - pip
   
     # Core scientific python
     - pandas
   
     # Jupyter Environment
     - autopep8
     - jupyter
   
   
     # io
     - Path
     - sqlite
     - sqlalchemy==1.3.15
     - pyarrow
     - csvkit
   
     # Production only airflow used to reproduce prolem
     - airflow
     - airflow-with-postgres
     - airflow-with-samba
     - airflow-with-ssh
     - airflow-with-redis
     - airflow-with-celery
     - airflow-with-jira
     - jsonschema>=3.0.1
     # IDE preferences
     - rope
     - spyder
   </details>
   
   **What happened**:
   
   <details><summary> Running airflow initdb cannot avoid jsonschema error 
</summary>
   airflow initdb
   Traceback (most recent call last):
     File "/home/louis/miniconda/envs/avm-prod-test/bin/airflow", line 26, in 
<module>
       from airflow.bin.cli import CLIFactory
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/site-packages/airflow/bin/cli.py",
 line 79, in <module>
       api_module = import_module(conf.get('cli', 'api_client'))  # type: Any
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/importlib/__init__.py", 
line 127, in import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/site-packages/airflow/api/client/local_client.py",
 line 24, in <module>
       from airflow.api.common.experimental import delete_dag
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/site-packages/airflow/api/common/experimental/delete_dag.py",
 line 25, in <module>
       from airflow.models.serialized_dag import SerializedDagModel
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/site-packages/airflow/models/serialized_dag.py",
 line 32, in <module>
       from airflow.serialization.serialized_objects import SerializedDAG
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py",
 line 491, in <module>
       class SerializedDAG(DAG, BaseSerialization):
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py",
 line 521, in SerializedDAG
       _json_schema = load_dag_schema()
     File 
"/home/louis/miniconda/envs/avm-prod-test/lib/python3.7/site-packages/airflow/serialization/json_schema.py",
 line 77, in load_dag_schema
       jsonschema.Draft7Validator.check_schema(schema)
   AttributeError: module 'jsonschema' has no attribute 'Draft7Validator'
   </details>
   
   **What you expected to happen**:
   Successful initialization
   
   **What do you think went wrong?**
   Incompatible dependency constraints, or undocumented resolution.
   
   **airflow jsonschema constraint**
    
   https://github.com/conda-forge/airflow-feedstock/blob/master/recipe/meta.yaml
   - jsonschema >=3.0.0,<3.1.0  # [py<38]
   - Very few online results, but in poetry, this was resolve by dropping to a 
version < 3.0.0
   see:
   https://github.com/python-poetry/poetry/issues/2312
   https://github.com/zalando/connexion/pull/708 
   Changes proposed in this pull request:
       ensure jsonschema version is < 3.0.0 in setup.py
   
   
   
   
   **How to reproduce it**:
   
   rebuild miniconda with airflow and call initdb.
        # be sure to check path 
PATH="$HOME/miniconda/bin:$HOME/miniconda/envs/avm-prod-test:$PATH"
       bash ~/miniconda.sh -b -p $HOME/miniconda || exit 1
       source $HOME/miniconda/bin/activate
       conda config --set always_yes yes --set show_channel_urls true --set 
changeps1 no
       conda update -q conda
       conda config --add channels conda-forge
       conda info -a
       conda env create -f avm-prod-test.yaml
       airflow initdb
   
   
   **Anything else we need to know**: Occurs every time
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to