-
Notifications
You must be signed in to change notification settings - Fork 412
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(pytest+unittest): add safety check for Windows paths #7627
Conversation
BenchmarksBenchmark execution time: 2023-11-20 15:32:23 Comparing candidate commit 9991bac in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 90 metrics, 0 unstable metrics. |
This reverts commit c6f5b63.
Co-authored-by: Romain Komorn <136473744+romainkomorndatadog@users.noreply.github.com>
@ZStriker19 , if you're comfortable merging this so we can get in to |
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.
This fix looks good from a core prespective.
[CIVIS-8034 ](https://datadoghq.atlassian.net/browse/CIVIS-8034?atlOrigin=eyJpIjoiNTVhNTFmZjkxYWRkNGUwOThiYzExYjhkZTkxZjU5NzQiLCJwIjoiaiJ9) ## Motivation This PR aims to fix a GitHub issue regarding ValueErrors on Windows machines when using different path drives. ## What does this PR change? Adds a few type safety checks around `os.path.relpath` calls to ensure that the plugin will continue to work smoothly when encountering these edge cases. ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] 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) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. --------- Co-authored-by: Romain Komorn <136473744+romainkomorndatadog@users.noreply.github.com> Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com> (cherry picked from commit 1c9765f)
CIVIS-8034
Motivation
This PR aims to fix a GitHub issue regarding ValueErrors on Windows machines when using different path drives.
What does this PR change?
Adds a few type safety checks around
os.path.relpath
calls to ensure that the plugin will continue to work smoothly when encountering these edge cases.Checklist
changelog/no-changelog
.Reviewer Checklist
@DataDog/security-design-and-guidance
.