-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Cosmos test environment Airflow installation #811
Comments
🤖 Hey @jbandoro! Great to see you back here with another insightful suggestion. I'm currently diving into the details of your issue. Hang tight, I'll provide you with a comprehensive response shortly! |
I really like this, @jbandoro , it looks much cleaner! |
🤖 It's great to hear that you're enjoying the cleaner look! If you have any questions or need assistance with anything related to the project, feel free to ask. I'm here to help! This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
This PR installs apache-airflow in the hatch `pre-install-commands` section so Airflow related dependency conflicts do not need to be managed in the override section that has been removed. Installing from the Airflow constraint file for versions <=2.6 fails because PyYAML is pinned in the constraint file for those versions to 6.0.0 and [a workaround ](yaml/pyyaml#736) is required becaused older versions of PyYAML can no longer be installed from unmodified source or sdist with the release of Cython3. Closes: #811
This PR installs apache-airflow in the hatch `pre-install-commands` section so Airflow related dependency conflicts do not need to be managed in the override section that has been removed. Installing from the Airflow constraint file for versions <=2.6 fails because PyYAML is pinned in the constraint file for those versions to 6.0.0 and [a workaround ](yaml/pyyaml#736) is required becaused older versions of PyYAML can no longer be installed from unmodified source or sdist with the release of Cython3. Closes: #811 (cherry picked from commit 928ba83)
This PR installs apache-airflow in the hatch `pre-install-commands` section so Airflow related dependency conflicts do not need to be managed in the override section that has been removed. Installing from the Airflow constraint file for versions <=2.6 fails because PyYAML is pinned in the constraint file for those versions to 6.0.0 and [a workaround ](yaml/pyyaml#736) is required becaused older versions of PyYAML can no longer be installed from unmodified source or sdist with the release of Cython3. Closes: astronomer#811
Opening up this issue after #806 was merged where more pinning specific to Airflow version dependencies had to be done in overrides and a workaround to uninstall a provider that is not available in earlier Airflow versions.
A possible better way to install Airflow is to use the recommended constraint file, this way we wouldn't have to keep track of pinning different Airflow dependencies for different versions. Installing with a constraint file can be done like the below where it depends on a specific airflow version and python version:
After the work @tatiana did in #806 by adding a hatch
post-install-commands
, I think we could use the pre-install-commands to install airflow with a constraint file. The pyproject.toml would like:The update above would remove the need to have the
[tool.hatch.envs.tests.overrides]
section. However the matrix does change a bit where the Airflow patch version is required.The GH workflow would also need to be updated so the matrix matches.
An advantage of this is that we would not need to worry about newer releases of Airflow breaking the CI tests, but we would need to increment the patch version above when a latest version of Airflow is released.
The text was updated successfully, but these errors were encountered: