Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

fix: Bump version ahead of lateset release - #571

Merged
c24t merged 4 commits into
googleapis:masterfrom
c24t:bump-version-v2.2.0a2
Jan 29, 2021
Merged

fix: Bump version ahead of lateset release#571
c24t merged 4 commits into
googleapis:masterfrom
c24t:bump-version-v2.2.0a2

Conversation

@c24t

@c24tc24t commented Dec 16, 2020

Copy link
Copy Markdown
Contributor

Update to avoid having the same version number in this repo as on PyPI.

In general we can handle version number updates one of two ways: (1) change the version number as part of the release commit that produces the GH and PyPI releases or (2) change the version number immediately after the release to the next one we expect to release. In either case we could add a "dev" segment to the version number, but that involves an extra manual step since we're not (yet) using release branches.

This PR changes the versioning scheme from (1) to (2). Note that the next release may be 2.2.1b0 instead, but this still solves the problem that the version in the repo matches the one on PyPI.

@c24t
c24t requested a review from a teamDecember 16, 2020 23:10
@google-clagoogle-claBot added the cla: yes This human has signed the Contributor License Agreement. label Dec 16, 2020
@product-auto-labelproduct-auto-labelBot added the api: spanner Issues related to the googleapis/python-spanner-django API. label Dec 16, 2020
@crwilcox

Copy link
Copy Markdown

@c24t can you help me understand why you would bump the version in the repository, but before release time? In a good deal fo the googleapis repositories we use release-tool and release-please, which automate releasing to PyPI, version reving, changelog generation, etc. And as part of that process the version number is updated. This would be a deviation and I'd like to understand how those tools fall short/don't align with your project.

Thanks!

@c24t

c24t commented Dec 17, 2020

Copy link
Copy Markdown
ContributorAuthor

I'd like to understand how those tools fall short/don't align with your project.

We're following (an admittedly odd) convention for django db driver packages here: the major/minor version components have to match the version of django we're targeting, and we only change the micro component. Since we're only targeting django 2.2.x now, our version number also has to be 2.2.x. Later when we target 3.1.x we'll have to maintain a separate branch. We're using release-tool/release-please, but we set the version number manually.

This PR isn't really necessary, just convenient. I think it's helpful to have a different version numbers for the code in the repo and the pip-installable package so you can tell quickly if e.g. a CI script is downloading something from PyPI that it should be installing from source.

In any case I'm happy to leave the version number as-is. Let me know if you've got any suggestions for how we should handle versioning or releases differently.

@crwilcox

Copy link
Copy Markdown

That all makes sense. Thank you for helping me to better understand. I think if you follow a process where you either

  1. rev right before release
  2. rev right after release

It should work well, or at least I would think. I couldn't find it but is the process for releasing this written down?

@c24t

c24t commented Dec 17, 2020

Copy link
Copy Markdown
ContributorAuthor

I couldn't find it but is the process for releasing this written down?

It's not written down here. We're using release-please as usual but setting the version number manually with empty "Release-As" commits, like this one: 803ad0a. That commit triggered this release PR with a custom version number: #505.

@c24t
c24t merged commit 36e5b82 into googleapis:masterJan 29, 2021
@c24t
c24t deleted the bump-version-v2.2.0a2 branch January 29, 2021 19:12
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spannerIssues related to the googleapis/python-spanner-django API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@c24t@crwilcox