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

[Proposal] When releasing, set patch number automatically #248

Open
yonch opened this issue Dec 1, 2023 · 2 comments
Open

[Proposal] When releasing, set patch number automatically #248

yonch opened this issue Dec 1, 2023 · 2 comments

Comments

@yonch
Copy link
Contributor

yonch commented Dec 1, 2023

Describe the issue you're reporting

Background

Releases currently follow semantic versioning, i.e., the version has three numeric components {major}.{minor}.{patch}.

Those three components are set to constants in version.sh.

The Problem

The current setup requires a developer to bump the version manually after each release. This opens up the possibility of human error: a release could overwrite old artifacts with a newer version, if there hadn't been an intermediate version bump.

Proposal
To mitigate, we might auto-generate the patch number. Indeed, version.sh already computes a build number using the number of commits from a well known commit, which should be monotonically increasing if we only release from the main branch.

So the proposal is to automatically set the patch number to be the build number. Major and minor versions would still be updated manually.

Drawbacks
The drawback is that patch numbers would stop being contiguous, i.e., instead of having v0.10.0, v0.10.1, v0.10.2, ..., versions might be v.0.10.4001, v.0.10.4037, v.0.10.4099 etc.

@yonch
Copy link
Contributor Author

yonch commented Dec 1, 2023

cc @open-telemetry/network-maintainers @open-telemetry/network-approvers @open-telemetry/network-triagers

@bjandras
Copy link
Contributor

bjandras commented Dec 8, 2023

We used to do this, and then we abandoned it for a number of reasons:

  • it produces meaningless version numbers (we're doing semver);
  • doesn't work reliably across branches;
  • it is not practiced by other OpenTelemetry projects.

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

No branches or pull requests

2 participants