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

[bitnami/airflow] Add libraries libpq-dev python-dev gcc to support installation psycopg2 as dependency #48258

Closed
wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 12, 2023

Description of the change

The change introduces three new packages which will be installed in airflow pods to support installation of psycopg2 library from requirements.txt file.
Currently if we add psycopg2 library to requirements.txt we will get an error:
Error: pg_config executable not found.

Benefits

Possibility to use bitnami images and helm chart to install psycopg2 and other libraries which depend on it

Applicable issues

@github-actions github-actions bot added the triage Triage is needed label Sep 12, 2023
@javsalgar javsalgar changed the title Add libraries libpq-dev python-dev gcc to support installation psycopg2 as dependency [bitnami/airflow] Add libraries libpq-dev python-dev gcc to support installation psycopg2 as dependency Sep 13, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Sep 13, 2023
@bitnami-bot bitnami-bot removed the request for review from javsalgar September 13, 2023 10:25
@fevisera
Copy link
Contributor

fevisera commented Sep 28, 2023

Hi @oktayalizada,

I have built the image locally, and it appears to be quite large:

local/airflow                   latest                        5bc6e03c8bf9   14 minutes ago   3.28GB 
bitnami/airflow                 latest                        8255c5199bb5   3 days ago       1.77GB

I believe the intention in bitnami/charts#19242 was to create a fork rather than modify the bitnami airflow images. Adding these additional packages would need additional analysis, including an assessment of image size and the need for these packages. For instance, adding python-dev may include more packages than necessary.

Please let me know if there are any additional details I may be overlooking.

@ghost
Copy link
Author

ghost commented Sep 29, 2023

Hi @fevisera,
So you mean airflow will not support installation and usage of psycopg2 library in airflow pods? Can we have maybe a different tag for this specific build (e.g. debian-11-psycopg2)?

@fevisera
Copy link
Contributor

fevisera commented Oct 3, 2023

Hi @oktayalizada,

Thank you for your question! I did not mean to imply that Airflow will not support the installation and usage of the psycopg2 library for bitnami/airflow. What I intended to convey is that before adding those new packages, it is essential to conduct a more thorough analysis to assess the image size impact and the actual necessity of these packages.

We already have an ongoing internal task to address adding dependencies feature, which has been created for #48258. As soon as this functionality becomes available, we will notify you here.

Thank you for proposing this change and bringing it to our attention. If you have any more questions or concerns, please feel free to ask. We appreciate your feedback.

@fevisera fevisera added the on-hold Issues or Pull Requests with this label will never be considered stale label Oct 3, 2023
@carrodher carrodher removed the request for review from fevisera April 22, 2024 09:53
@alekseyolg
Copy link
Contributor

Any opinion?
If necessary, I can open a new pull request to add the functionality needed in the work, taking into account the changes that have appeared since the creation of this pull request.
Thank you!

@javsalgar javsalgar added in-progress and removed on-hold Issues or Pull Requests with this label will never be considered stale labels Nov 27, 2024
@github-actions github-actions bot requested a review from juan131 November 27, 2024 07:28
@juan131
Copy link
Contributor

juan131 commented Nov 27, 2024

Hi everyone!

These deps the PR is proposing to add (such as gcc) are required for compilation and they should never be included in the runtime image. We can use these libraries for compiling internally the different packages included in the container but they're useless at runtime.

IMHO this PR should be closed and an issue requesting psycopg2 should be created instead. That said, we are already including the psycopg2-binary pip package in the container image, see:

$ docker run --rm -it bitnami/airflow bash
(...)
airflow@8275af36d3d5:/$ . /opt/bitnami/airflow/venv/bin/activate
(venv) airflow@8275af36d3d5:/$ pip list | grep psycopg2
psycopg2-binary                           2.9.10

Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Dec 13, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot added stale 15 days without activity and removed stale 15 days without activity labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airflow solved stale 15 days without activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants