[FIX] utils: Normalize Odoo versions for semver validation#16
Merged
Conversation
The semantic versioning comparisons were failing when processing non-standard version formats such as 'saas-19.2' and 'master'. Because they didn't follow the strictly numerical format, they were evaluated as older/invalid versions. This caused the entrypoint to incorrectly inject deprecated parameters like 'longpolling_port', 'xmlrpc_port', and 'logrotate' into the .odoorc when booting Odoo 19/20 instances. This change: - Introduces NormalizeVersionForSemver to clean the version strings - Handles 'master' as v999.0 to always consider it the latest - Handles 'saas-X' prefixes by stripping them - Applies the normalizer in SetupWorker and SetDefaults logic
Pinned the Go version to '1.26' across all workflows (test, release, and lint) to ensure consistent behavior and avoid compatibility issues. Updated GitHub actions to their latest available major versions: - actions/checkout to v6 - actions/setup-go to v6 - golangci/golangci-lint-action to v9 - goreleaser/goreleaser-action to v7
2e94e69 to
e1c066f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The semantic versioning comparisons were failing when processing non-standard version formats such as 'saas-19.2' and 'master'. Because they didn't follow the strictly numerical format, they were evaluated as older/invalid versions.
This caused the entrypoint to incorrectly inject deprecated parameters like 'longpolling_port', 'xmlrpc_port', and 'logrotate' into the .odoorc when booting Odoo 19/20 instances.
This change: