Closed adamantike closed 1 year ago
Nice, thanks for fixing this one. I'll put out a patch release with tag v1.0.1.
I keep introducing bugs around conditional imports as my dev environment and the test environment tend to have all dependencies, so they never run into issues like this.
I'm wondering if we can configure the test matrix to run under a partial environment to catch bugs like this :thinking: I'll give it a thought over the next few days.
Glad to add more contributions to this great project! :)
Regarding how to improve coverage to avoid these issues moving forward, I think the CI matrix can be extended to include different extras
being installed (being the current CI configuration what we would get when all extras are included).
With that, tests can be gated with pytest.importorskip
, to not fail when an expected dependency is installed.
I'll try to implement a simple change to the CI that would have caught this issue.
This change makes the library only import the hook it's going to need based on the remote scheme.
As it is currently implemented, an environment that uses a S3 remote fails if it doesn't have the
ssh
Airflow provider installed:The same happens when the environment uses a remote that requires the SSH hook, and doesn't install the
aws
Airflow provider.