-
Notifications
You must be signed in to change notification settings - Fork 398
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
fix(setuptools): use guess-next-dev schema #8796
Conversation
A backport (#8367) changed our setuptools_scm schema from `guess-next-dev` to `release-branch-semver` for the 2.5 and 2.6 releases; but this change was never put into mainline. This change fixes the issue. Prior to this change, setuptools_scm reported the version for patch releases as the next minor release. Afterwards, versions are patch releases (as expected).
Datadog ReportBranch report: ✅ 0 Failed, 171692 Passed, 1071 Skipped, 11h 26m 11.03s Total duration (21m 58.36s time saved) |
BenchmarksBenchmark execution time: 2024-03-27 22:20:26 Comparing candidate commit 32ffb60 in PR branch Found 5 performance improvements and 3 performance regressions! Performance is the same for 193 metrics, 9 unstable metrics. scenario:flasksimple-appsec-telemetry
scenario:flasksimple-tracer
scenario:httppropagationextract-large_header_no_matches
scenario:httppropagationextract-medium_header_no_matches
scenario:httppropagationextract-none_propagation_style
scenario:httppropagationextract-wsgi_invalid_priority_header
scenario:httppropagationextract-wsgi_large_header_no_matches
scenario:httppropagationextract-wsgi_medium_header_no_matches
|
@@ -69,7 +69,7 @@ Homepage = "https://github.com/DataDog/dd-trace-py" | |||
"Source Code" = "https://github.com/DataDog/dd-trace-py/" | |||
|
|||
[tool.setuptools_scm] | |||
version_scheme = "release-branch-semver" | |||
version_scheme = "guess-next-dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment above this property explaining why this needs to be release-branch-semver
on the main branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am requesting this PR to be closed.
Explanations:
we have 2 possible policies for setup tools, none of them is ok for all cases.
Setuptools is looking back from current commit and looking for the first version tag in ancestor commit.
Then either it’s using that version with release-branch-semver
or using the next minor dev version with guess-next-dev
Currently we need the next minor dev version to be able to enable new system tests for new “just merged in main” features. But we need the same version policy for all backports, otherwise we will enable tests in system tests for features merged in the next version.
So for now, we are using “guess-next-dev” in main and as soon as it’s needed we change it into “release-branch-semver” for minor version branches for all backports.
(This is a known problem that I already explained to a guild meeting, while sponsoring for one of the following solution, but this was never supported by the guild)
What are doing other big python projects on that problem ?
- Do as we are doing (not really satisfying)
- Use always “release-branch-semver” but add a new minor dev tag (for next unreleased minor version, like 4.15.0.dev) to the main branch on an empty commit after each creation of a new minor/major branch (like v4.14). We would need to integrate that step to our release todo list
- Drop setuptools for version computation and have the version as constants in a file that would need to be updated for each release. Require more work but with less dependency, simpler build process and more control.
A backport (#8367) changed our setuptools_scm schema from
guess-next-dev
torelease-branch-semver
for the 2.5 and 2.6 releases; but this change was never put into mainline. This change fixes the issue.Prior to this change, setuptools_scm reported the version for patch releases as the next minor release. Afterwards, versions are patch releases (as expected).
Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.@DataDog/security-design-and-guidance
.Reviewer Checklist