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

refactor(cloud-native): revisit Python libs installation method #8554

Merged
merged 4 commits into from
May 24, 2024

Conversation

iromli
Copy link
Contributor

@iromli iromli commented May 21, 2024

Prepare


Description

Target issue

closes #8553

Implementation Details

  • Keep python3 package.

  • Keep libs that require native library, e.g. py3-grpcio, py3-cryptography, py3-psycopg2 to avoid the complexity of building native packages.

  • Rename EXTERNALLY-MANAGED file as the side-effect of missing the file is low.

    A distro Python when used in a single-application container image (e.g., a Docker container). In this use case, the risk of breaking system software is lower, since generally only a single application runs in the container, and the impact is lower, since you can rebuild the container and you don’t have to struggle to recover a running machine. There are also a large number of existing Dockerfiles with an unqualified RUN pip install ... statement, etc., and it would be good not to break those. So, builders of base container images may want to ensure that the marker file is not present, even if the underlying OS ships one by default.

    In certain contexts, such as single-application container images that aren’t updated after creation, a distributor may choose not to ship an EXTERNALLY-MANAGED file, so that users can install whatever they like (as they can today) without having to manually override this rule.

  • Uninstall pip3 and wheel libs.


Test and Document the changes

  • Static code analysis has been run locally and issues have been fixed
  • Relevant unit and integration tests have been added/updated
  • Relevant documentation has been updated if any (i.e. user guides, installation and configuration guides, technical design docs etc)

Signed-off-by: iromli <isman.firmansyah@gmail.com>
@iromli iromli marked this pull request as ready for review May 24, 2024 16:23
@iromli iromli requested a review from moabu as a code owner May 24, 2024 16:23
@moabu moabu merged commit 4ecac21 into main May 24, 2024
2 checks passed
@moabu moabu deleted the cn-ext-managed-libs branch May 24, 2024 18:56
yuriyz pushed a commit that referenced this pull request Nov 7, 2024
Signed-off-by: iromli <isman.firmansyah@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
Former-commit-id: 4ecac21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor(cloud-native): revisit Python libs installation method
3 participants