-
Notifications
You must be signed in to change notification settings - Fork 3
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
Check control file default version #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR refactors the version handling logic for Debian packages and Docker images so that a unified version representation is used, addressing discrepancies reported in FerretDB/FerretDB#4725.
- Introduces a new "versions" struct to consolidate Docker image and Debian version information.
- Updates functions (defineVersion, defineVersionForPR/Branch/Tag, and setSummary) to use the new struct.
- Updates tests and removes deprecated docker and Debian helper functions.
Reviewed Changes
File | Description |
---|---|
ferretdb_packaging/defineversion/main.go | Introduces the versions struct and updates version definition and summary functions. |
ferretdb_packaging/defineversion/main_test.go | Updates tests to assert the new versions struct and expected outputs. |
ferretdb_packaging/defineversion/docker_test.go | Removes legacy test code related to the old images struct. |
ferretdb_packaging/defineversion/docker.go | Eliminates unused docker version functions; retains image URL helper. |
ferretdb_packaging/defineversion/debian.go | Removes deprecated Debian version helper functions. |
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
ferretdb_packaging/defineversion/main.go:22
- [nitpick] The struct name 'versions' may be misleading because it represents a single version record. Consider renaming it to 'Version' or 'VersionInfo' for improved clarity.
type versions struct {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are conflicts now
@chilagrow this pull request has merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR verifies that the git tag version matches the control file’s default version. It updates the tests to use an explicit controlDefaultVersion, adds a new test case to catch mismatches, and adjusts the defineVersionForTag function to check and enforce the version match.
Reviewed Changes
File | Description |
---|---|
ferretdb_packaging/defineversion/main_test.go | Removes embedded constants and passes controlDefaultVersion from test cases; adds new test case. |
ferretdb_packaging/defineversion/main.go | Reorders parameters in defineVersionForTag and adds an explicit version comparison check. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Closes FerretDB/FerretDB#4725.