Fix invalid SemVer string parsing on Ubuntu #1182
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit updates the version parsing logic in prereqs.py to correctly handle Docker Compose version strings that include additional metadata.
This PR contains:
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:
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: