Skip to content

Fix meta-package-check failing on patch-only client bumps - #148

Merged
arandito merged 3 commits into
developfrom
meta-package-check-compatible
Nov 18, 2026
Merged

arandito merged 3 commits into
developfrom
meta-package-check-compatible

Conversation

@Alan4506

@Alan4506 Alan4506 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

meta-package-check expects each extra to be exactly <module>~=<client version>, but the release tooling only rewrites an extra when the client's major.minor changes (~=0.13.0 already covers 0.13.1). So the first release that patch-bumps a client fails the check: extra s3 is ['aws_sdk_s3~=0.13.0'], expected ['aws_sdk_s3~=0.13.1']. #147 hit this in the PR build.

This PR relaxes the check. The pin still has to be <module>~=<version> with the same major.minor as the client, but its patch may be anything up to the client's current patch. Verified locally:

  • develop passes
  • a client at 0.13.1 with extra ~=0.13.0 or ~=0.13.1 passes
  • a client at 0.13.1 with extra ~=0.13.2, ~=0.12.0, or ~=0.14.0 fails
  • == pins, extra entries, and non-x.y.z versions fail with a message indicating the expected form

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Alan4506
Alan4506 marked this pull request as ready for review November 17, 2026 22:43
@Alan4506
Alan4506 requested a review from a team as a code owner November 17, 2026 22:43
Comment thread scripts/meta-package/meta_package.py Outdated
def _compatible(version: str) -> str:
"""Return the ``~=`` floor for ``version``: ``<major>.<minor>.0``."""
major, minor = version.split(".")[:2]
return f"{major}.{minor}.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just compare the major and minor instead and not compare the patch at all?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be a weird case where we manually move the pin to something other than x.y.0 (e.g. x.y.1) for some reason and we should be okay with that.

I guess in that case, we'd need something to verify the current version if >= patch. Maybe we should compare:

  • major and minor are exact
  • patch is <= current package version

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed in latest commits. The PR title and description have been updated as well.

@Alan4506 Alan4506 changed the title Compare meta-package extras at major.minor Fix meta-package-check failing on patch-only client bumps Nov 17, 2026
@Alan4506
Alan4506 requested a review from jonathan343 November 18, 2026 17:29

@arandito arandito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@arandito
arandito merged commit 639bf9d into develop Nov 18, 2026
5 of 6 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.

3 participants