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 invalid SemVer string parsing on Ubuntu #1182

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

crsqq
Copy link
Contributor

@crsqq crsqq commented Jan 24, 2025

This commit updates the version parsing logic in prereqs.py to correctly handle Docker Compose version strings that include additional metadata.

This PR contains:

  • New features
  • Changes to dev-tools e.g. CI config / github tooling
  • Docs
  • Bug fixes
  • Code refactor

What is the current behavior? (You can also link to an open issue here)

The previous implementation failed to parse versions like 2.27.1+ds1-0ubuntu1~24.04.1, resulting in an invalid SemVer error.
Example:

WARNING  Unexpected error executing docker: 2.27.1+ds1-0ubuntu1~24.04.1 is not valid SemVer string                                                                                                                        prereqs.py:88

ERROR: Docker sandbox environments require Docker Engine
...

What is the new behavior?

The updated logic removes the "v" prefix and separates the version string at the "+" character, additional metadata after the "+" character which might be included in the output of docker compose version --format json is removed.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No

Other information:

crsqq and others added 3 commits January 24, 2025 08:56
This commit updates the version parsing logic in prereqs.py to correctly handle Docker Compose version strings that include additional metadata.
@jjallaire jjallaire merged commit da66ea0 into UKGovernmentBEIS:main Jan 24, 2025
9 checks passed
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.

2 participants