Skip to content

Conversation

@eduardoChaucaGallegos
Copy link
Contributor

@eduardoChaucaGallegos eduardoChaucaGallegos commented Dec 2, 2025

This pull request introduces robust Python version compatibility checks for bundle auto-updates and tag selection in the descriptor system, focusing on git tag descriptors. It ensures that the latest available bundle version is compatible with the running Python interpreter, and gracefully falls back to the highest compatible local or cached version when necessary. The changes also improve error handling and logging for version parsing and compatibility checks.

Python version compatibility enforcement:

  • Added _check_minimum_python_version to base.py to verify if the current Python version meets the minimum required version specified in the bundle manifest. This is now used throughout the descriptor logic.
  • In git_tag.py, the _get_latest_version method now checks if the latest tag is compatible with the current Python version, and if not, attempts to find the highest compatible version from the local repository or bundle cache, logging warnings when auto-update is blocked.

Local and cached version fallback logic:

  • Implemented _get_local_repository_tag, _check_local_tag_compatibility, and _find_compatible_cached_version in git_tag.py to support falling back to a compatible local tag or cached version if the latest tag is incompatible.

Error handling and logging improvements:

  • Improved error handling in _find_latest_tag_by_pattern in base.py to skip malformed version tags and log debug messages.
  • Enhanced debug and warning logs throughout the new compatibility logic, making it easier to trace fallback decisions and compatibility issues. [1] [2]

General codebase cleanup:

  • Minor import reordering and deduplication for clarity and consistency in both base.py and git_tag.py. [1] [2]
  • Small syntax fixes for consistency, e.g., variable naming in dict_from_uri.

These changes collectively ensure that bundle updates are safe and compatible with the user's Python environment, preventing runtime errors due to version mismatches and providing clear feedback when auto-updates are blocked.

@eduardoChaucaGallegos eduardoChaucaGallegos marked this pull request as ready for review December 4, 2025 21:01
@eduardoChaucaGallegos eduardoChaucaGallegos requested a review from a team December 4, 2025 21:02
Copy link
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk left a comment

Choose a reason for hiding this comment

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

Made some small code style suggestions, but overall looks good. I didn't reviewed the logic because I don't fully understand the goal.

@eduardoChaucaGallegos eduardoChaucaGallegos changed the title SG-40996 prevent config autoupdate SG-41529 prevent config autoupdate Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants