Skip to content

Add a new script to fetch latest installed python version #1968

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

Merged
merged 8 commits into from
Apr 16, 2025
Merged

Conversation

shatakshiiii
Copy link
Contributor

@shatakshiiii shatakshiiii commented Apr 16, 2025

Summary

This PR fixes the issue where ansible-navigator was not selecting the correct Python interpreter within the Execution Environment for image introspection. The hardcoded reference to /usr/bin/python3 has been replaced with a new script python_latest.sh that dynamically gets the latest python3.

Problem - In some environments, such as RHEL9, python3 points to an older Python version, for example in registry.redhat.io/ansible-automation-platform-25/ee-supported-rhel9 it is pointing to /usr/lib64/python3.9/typing.py that is causing compatibility issues. More detailed information can be seen in the given Github and JIRA issues.

Steps to verify-

  • Either run ansible-navigator images --pp missing --ll debug -la false then go inside RHEL9 image and then inside its collections
  • OR run ansible-navigator collections --eei ee-supported-rhel9:latest

Related JIRA: AAP-43188 and AAP-42294
Related PR: #1587
Closes: #1795

Screenshot 2025-04-28 at 3 47 38 PM

@github-actions github-actions bot added the bug Researched, reproducible, committed to fix label Apr 16, 2025
@shatakshiiii shatakshiiii marked this pull request as ready for review April 16, 2025 10:29
@shatakshiiii shatakshiiii requested a review from a team as a code owner April 16, 2025 10:29
@shatakshiiii shatakshiiii changed the title Fix/aap 43188 Add a script to fetch latest installed python version Apr 16, 2025
@shatakshiiii shatakshiiii changed the title Add a script to fetch latest installed python version Add a new script to fetch latest installed python version Apr 16, 2025
Copy link
Collaborator

@cidrblock cidrblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@ssbarnea ssbarnea merged commit 62369c4 into main Apr 16, 2025
19 checks passed
@ssbarnea ssbarnea deleted the fix/AAP-43188 branch April 16, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Researched, reproducible, committed to fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Images inspect not possible - Image introspection failed
3 participants