Skip to content

Conversation

@brettlangdon
Copy link
Member

Description

Backport of #4910

The fix for ensuring RCM used a SemVer compliant version string only took into account ddtrace versions that match x.y.zrc2 or x.y.zrc2.dev3+gf344hg, but not x.y.z.dev3+gf344hg.

This fix ensures that if we have a .dev without rc that we properly convert .dev -> -dev which will make it SemVer compliant.

Since the tests rely heavily on the version of ddtrace.__version__ writing a test is challenging. We should revisit this in the future so we can mock the version and parametrize the test to ensure all variations are tested.

Checklist

Reviewer Checklist

  • Title is accurate.
  • Description motivates each change.
  • No unnecessary changes were introduced in this PR.
  • Avoid breaking API changes unless absolutely necessary.
  • Tests provided or description of manual testing performed is included in the code or PR.
  • Release note has been added and follows the library release note guidelines, or else changelog/no-changelog label added.
  • All relevant GitHub issues are correctly linked.
  • Backports are identified and tagged with Mergifyio.

…ent (#4910)

## Description
The fix for ensuring RCM used a SemVer compliant version string only
took into account ddtrace versions that match `x.y.zrc2` or
`x.y.zrc2.dev3+gf344hg`, but not `x.y.z.dev3+gf344hg`.

This fix ensures that if we have a `.dev` without `rc` that we properly
convert `.dev` -> `-dev` which will make it SemVer compliant.

Since the tests rely heavily on the version of `ddtrace.__version__`
writing a test is challenging. We should revisit this in the future so
we can mock the version and parametrize the test to ensure all
variations are tested.

## Checklist
- [ ] Followed the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
when writing a release note.
- [ ] Add additional sections for `feat` and `fix` pull requests.
- [ ] [Library
documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs)
and/or [Datadog's documentation
site](https://github.com/DataDog/documentation/) is updated. Link to doc
PR in description.


## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] Avoid breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is
included in the code or PR.
- [ ] Release note has been added and follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines),
or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
@brettlangdon brettlangdon added the changelog/no-changelog A changelog entry is not required for this PR. label Jan 14, 2023
@brettlangdon brettlangdon requested a review from a team as a code owner January 14, 2023 02:06
@brettlangdon brettlangdon merged commit 87b1aee into 1.7 Jan 14, 2023
@brettlangdon brettlangdon deleted the backport.4910 branch January 14, 2023 02:40
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