-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
airbyte-ci: only install main dependencies when calling poetry install #34945
airbyte-ci: only install main dependencies when calling poetry install #34945
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @alafanechere and the rest of your teammates on Graphite |
8e7457f
to
8a0003a
Compare
8a909b1
to
1b1e55b
Compare
@@ -159,12 +159,13 @@ def _install_python_dependencies_from_poetry( | |||
) -> Container: | |||
pip_install_poetry_cmd = ["pip", "install", "poetry"] | |||
poetry_disable_virtual_env_cmd = ["poetry", "config", "virtualenvs.create", "false"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this imply that inside of the connector images, poetry will install deps into global python package space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this allows us to then run the connector with the default entry point, as opposed to having to do poetry run whatever.py
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this imply that inside of the connector images, poetry will install deps into global python package space?
Yes, building the docker image is a two step approach:
- We provision a builder container on which we run the package installation: this is where poetry is a requirement
- We mount the installed packages to a new container which is transformed into our final image
This means that poetry
could eventually not be bundled in our final images, the build dependencies being required only in the builder container.
But for simplicity the builder and the final connector image use the same base image: our python connector base image which has poetry.
If we'd want to optimize the image size we could just install build dependencies in the builder container.
1b1e55b
to
05c08a5
Compare
What
We used the classic
poetry install
command in a container to install a package.This commands also installs dev dependencies, which is not something we want when no additional depedencie groups are passed to the function
How
Run
poetry install --only main
when noadditional_dependency_groups
is passed to the_install_python_dependencies_from_poetry
function.