【问题标题】:Conflicting constraints in Airflow constraint file气流约束文件中的冲突约束
【发布时间】:2022-12-05 21:26:56
【问题描述】:

为了使用雪花设置 AWS MWAA,根据 AWS 文档here,我创建了一个包含以下内容的 requirements.txt 文件:

--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.2/constraints-3.7.txt"
apache-airflow[snowflake]

这成功了。接下来我想将 dbt 添加到我的生态系统并将我的约束文件更新为:

--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.2/constraints-3.7.txt"
apache-airflow[snowflake]
dbt-core==1.1.1
dbt-snowflake==1.1.0

现在这就是事情开始破裂的地方。构建这个时出现以下错误-

ERROR: Cannot install snowflake-connector-python[secure-local-storage]==2.7.0 because these package versions have conflicting dependencies.

The conflict is caused by:
snowflake-connector-python[secure-local-storage] 2.7.0 depends on keyring!=16.1.0 and <22.0.0; extra == "secure-local-storage"
The user requested (constraint) keyring==23.2.1

这看起来真的很奇怪,因为两个版本:snowflake-connector-python 2.7.0keyring==23.2.1 都在气流约束文件本身中强制执行:https://raw.githubusercontent.com/apache/airflow/constraints-2.2.2/constraints-3.7.txt

气流约束文件不正确的可能性很小。我在这里错过了什么吗?

【问题讨论】:

    标签: airflow snowflake-cloud-data-platform dbt


    【解决方案1】:

    是的,我猜有一些不一致和版本冲突。我最终做的是将所有库从 constraints.txt 复制到 requirements.txt,删除未使用的库并运行 ./mwaa-local-env test-requirements 以检查不一致。 然后我手动改了所有版本冲突的版本。

    【讨论】:

      猜你喜欢
      • 2011-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-18
      • 1970-01-01
      • 1970-01-01
      • 2018-03-29
      • 2021-08-04
      相关资源
      最近更新 更多