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

Check control file default version #36

Merged
merged 6 commits into from
Mar 7, 2025

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Mar 5, 2025

@chilagrow chilagrow self-assigned this Mar 5, 2025
@chilagrow chilagrow marked this pull request as ready for review March 5, 2025 07:46
@chilagrow chilagrow requested a review from AlekSi as a code owner March 5, 2025 07:46
@chilagrow chilagrow requested review from a team and noisersup March 5, 2025 07:47
@AlekSi AlekSi requested a review from Copilot March 5, 2025 07:51

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 {
noisersup
noisersup previously approved these changes Mar 5, 2025
Copy link
Member

@AlekSi AlekSi left a 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

Copy link

mergify bot commented Mar 6, 2025

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Mar 6, 2025
@mergify mergify bot removed the conflict PRs that have merge conflicts label Mar 7, 2025
@chilagrow chilagrow requested review from AlekSi and noisersup March 7, 2025 01:25
@AlekSi AlekSi requested a review from Copilot March 7, 2025 07:02
@AlekSi AlekSi added packages PRs that should build packages not ready Issues that are not ready to be worked on; PRs that should skip CI trust PRs that can access Actions secrets labels Mar 7, 2025

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.

@AlekSi AlekSi removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label Mar 7, 2025
@AlekSi AlekSi merged commit b5ed892 into FerretDB:ferretdb Mar 7, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages PRs that should build packages trust PRs that can access Actions secrets
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Build DocumentDB Docker images in the documentdb repo
3 participants