Skip to content
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

docker image does not include 'pymssql' #8712

Closed
ishioni opened this issue May 4, 2020 · 4 comments
Closed

docker image does not include 'pymssql' #8712

ishioni opened this issue May 4, 2020 · 4 comments
Assignees
Labels
area:production-image Production image improvements and fixes kind:bug This is a clearly a bug

Comments

@ishioni
Copy link

ishioni commented May 4, 2020

Apache Airflow version: 1.10.10

Kubernetes version (if you are using kubernetes) (use kubectl version): 1.15.11

Environment: dockerhub image apache/airflow:1.10.10

What happened:
When importing from airflow.hooks.mssql_hook import MsSqlHook, airflow gives an error No module named 'pymssql'

What you expected to happen:
It should work :)

The docker image does not include pymssql from pip

@ishioni ishioni added the kind:bug This is a clearly a bug label May 4, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented May 4, 2020

Thanks for opening your first issue here! Be sure to follow the issue template!

@potiuk potiuk added the area:production-image Production image improvements and fixes label May 5, 2020
@potiuk potiuk self-assigned this May 5, 2020
@potiuk
Copy link
Member

potiuk commented May 5, 2020

Thanks! Will take a look!

@alexbegg
Copy link
Contributor

pymssql is installed with the airflow extra "mssql". It is not pre-installed with the docker image apache/airflow:1.10.10. I am currently installing it as a separate pip install of apache-airflow[mssql]==1.10.10 in my helm chart and I have no issue using the MsSqlHook.

@potiuk
Copy link
Member

potiuk commented May 27, 2020

Yep. We want to minimise the prod image size to get the most frequently used packages (and core ones). We've added a new feature today to the prod image - you can add additional extras or python deps and b build your own version of the image. https://github.com/apache/airflow/blob/master/IMAGES.rst#production-images

Breeze supports building they production image and it wil even help you to add the extras in. For example:

./breeze build-image --production-image --additional-extras mssql

So I consider this solved with this feature via #8866

@potiuk potiuk closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:production-image Production image improvements and fixes kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

3 participants