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

fix: python error for pwritev2 symbol not found #40

Merged
merged 1 commit into from
Sep 4, 2024
Merged

Conversation

Monska85
Copy link
Collaborator

@Monska85 Monska85 commented Sep 4, 2024

User description

Using the right alpine version fix the following error:

[61] Error loading Python lib '/usr/local/aws-cli/v2/2.17.7/dist/libpython3.11.so.1.0': dlopen: Error relocating /usr/local/aws-cli/v2/2.17.7/dist/libpython3.11.so.1.0: pwritev2: symbol not found

The issue is tracked here.


PR Type

Bug fix


Description

  • Fixed Python error related to the pwritev2 symbol not being found by downgrading the Alpine version in the Dockerfile from 3.20 to 3.19.
  • Updated the Google Cloud CLI image tag in the Makefile from 489.0.0-alpine to 490.0.0-alpine.
  • These changes aim to resolve the issue with loading the Python library in the AWS CLI container.

Changes walkthrough 📝

Relevant files
Bug fix
Dockerfile
Downgrade Alpine version                                                                 

Dockerfile

  • Changed ALPINE_VERSION from 3.20 to 3.19
+1/-1     
Dependencies
Makefile
Update Google Cloud CLI version                                                   

Makefile

  • Updated GOOGLE_CLOUD_CLI_IMAGE_TAG from 489.0.0-alpine to
    490.0.0-alpine
  • +1/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @sparkfabrik-ai-bot
    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No key issues to review

    @sparkfabrik-ai-bot
    Copy link

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Maintainability
    Add a comment to explain the reason for changing the Alpine version

    Add a comment explaining why the Alpine version was changed from 3.20 to 3.19, to
    provide context for future maintainers.

    Dockerfile [3]

    +# Downgraded to 3.19 due to compatibility issues with Python libraries
     ARG ALPINE_VERSION=3.19
     
    Suggestion importance[1-10]: 8

    Why: Adding context for version changes is crucial for maintainability and helps future developers understand the reasoning behind decisions.

    8
    Add a comment to explain the reason for updating the Google Cloud CLI version

    Add a comment explaining the reason for updating the Google Cloud CLI version, to
    provide context for future maintainers.

    Makefile [8]

    +# Updated to 490.0.0 to resolve Python symbol not found error for pwritev2
     GOOGLE_CLOUD_CLI_IMAGE_TAG ?= 490.0.0-alpine
     
    Suggestion importance[1-10]: 8

    Why: Providing context for version updates is important for maintainability and helps team members understand the reasons behind changes.

    8
    Use a separate variable for the Google Cloud CLI version number

    Consider using a variable for the Google Cloud CLI version number to make it easier
    to update in the future and ensure consistency across the project.

    Makefile [8]

    -GOOGLE_CLOUD_CLI_IMAGE_TAG ?= 490.0.0-alpine
    +GOOGLE_CLOUD_CLI_VERSION ?= 490.0.0
    +GOOGLE_CLOUD_CLI_IMAGE_TAG ?= $(GOOGLE_CLOUD_CLI_VERSION)-alpine
     
    Suggestion importance[1-10]: 6

    Why: While this improves maintainability, the current setup is already functional. The benefit is moderate but not critical.

    6
    Best practice
    Specify a more precise Alpine version for better reproducibility

    Consider using a more specific Alpine version, such as 3.19.1, to ensure
    reproducibility and avoid potential issues with future minor updates.

    Dockerfile [3]

    -ARG ALPINE_VERSION=3.19
    +ARG ALPINE_VERSION=3.19.1
     
    Suggestion importance[1-10]: 7

    Why: Using a specific version (3.19.1) improves reproducibility, but the current version (3.19) is already quite specific and may be sufficient for most use cases.

    7

    @Monska85 Monska85 merged commit 9519774 into main Sep 4, 2024
    2 checks passed
    @Monska85 Monska85 deleted the fix/python_error branch September 4, 2024 08:03
    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.

    1 participant