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

chore: use guess-next-dev instead of release-branch-semver for versioning [2.16] #11228

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

erikayasuda
Copy link
Contributor

@erikayasuda erikayasuda commented Oct 30, 2024

We need to use guess-next-dev for versioning for release branches in order to ensure that system tests can work with them.

This is a manual PR, but the goal is to automate this PR generation (probably in the release.py script)

Great context from internal ticket:

Using "release-branch-semver" will allow the main branch to have its version computed from last tag adding +1 to minor and .dev decorator. This is what we want. The problem is that algorithm is used on any branch that is not a release branch. So it will also be used on any branch that targets a release branch, meaning all backport PRs.

Using "guess-next-dev" will set any non release branch to the same minor version as last tag. This works for backport branches but not for main that will get the same minor version as last release.

Why is version miscomputation a problem?
System tests are enabling new feature tests based on version. In the first case, the version on backports are one minor ahead, leading to possibly run system tests for the next version, causing errors for missing features. On the second case, most possibly system tests won’t be running the new tests for the main branch, which can be ever more problematic (CI green but feature just got silently broken).

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

CODEOWNERS have been resolved as:

.circleci/config.templ.yml                                              @DataDog/python-guild @DataDog/apm-core-python
pyproject.toml                                                          @DataDog/python-guild

@erikayasuda erikayasuda changed the base branch from main to 2.16 October 30, 2024 14:41
@erikayasuda erikayasuda added the changelog/no-changelog A changelog entry is not required for this PR. label Oct 30, 2024
@erikayasuda erikayasuda marked this pull request as ready for review October 30, 2024 14:41
@erikayasuda erikayasuda requested a review from a team as a code owner October 30, 2024 14:41
@datadog-dd-trace-py-rkomorn
Copy link

Datadog Report

Branch report: erikayasuda/use-guess-next-dev
Commit report: 8c6f8b6
Test service: dd-trace-py

✅ 0 Failed, 1286 Passed, 0 Skipped, 30m 11.4s Total duration (8m 25.5s time saved)

@erikayasuda erikayasuda enabled auto-merge (squash) October 30, 2024 14:52
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (2.16@d0bd7de). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             2.16   #11228   +/-   ##
=======================================
  Coverage        ?    7.45%           
=======================================
  Files           ?     1484           
  Lines           ?   127582           
  Branches        ?        0           
=======================================
  Hits            ?     9509           
  Misses          ?   118073           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erikayasuda erikayasuda merged commit 4079dab into 2.16 Oct 30, 2024
537 of 541 checks passed
@erikayasuda erikayasuda deleted the erikayasuda/use-guess-next-dev branch October 30, 2024 15:17
erikayasuda added a commit that referenced this pull request Nov 19, 2024
This PR automates two manual steps in the release process:
- Creating the new release branch for minor versions (ex - `2.17` branch
after 2.17.0rc1 is built and published, so contributors can backport)
- Automating [these manual
PRs](#11228) to update the
`version_scheme` in the `pyproject.toml` file from
`release-branch-semver` to `guess-next-dev`. This is a required step in
the release process after the first release candidate is triggered to
ensure system tests work properly for backports.

See sample PR that was generated via testing here:
#11426

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants