-
Notifications
You must be signed in to change notification settings - Fork 468
Change version detection mecanism #2802
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
Conversation
brettlangdon
left a comment
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.
big picture looks good
Kyle-Verhoog
left a comment
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.
@maxday @brettlangdon what are the plans for how/when the _version file will be generated?
|
|
@maxday do you have performance/profile results with this change? how much of an improvement does it make? |
@brettlangdon Yes : over 10 runs, result is the average Before : 853ms This is a massive win for our cold start duration. (Full disclosure, I had to comment the import in debug.py as well since it also imports |
Kyle-Verhoog
left a comment
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.
awesome! lgtm with just a tweak to the test cases
| "Programming Language :: Python :: 3.9", | ||
| ], | ||
| use_scm_version=True, | ||
| use_scm_version={"write_to": "ddtrace/_version.py"}, |
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.
oh sweet - that was easy!
Codecov Report
@@ Coverage Diff @@
## master #2802 +/- ##
=======================================
Coverage 84.87% 84.87%
=======================================
Files 592 595 +3
Lines 43384 43421 +37
=======================================
+ Hits 36820 36855 +35
- Misses 6564 6566 +2
Continue to review full report at Codecov.
|
…:DataDog/dd-trace-py into maxday/change-version-detection-mecanism
|
I have moved tests under |
Description
pkg_resourcesis quite heavy and slows down cold start when dd-trace-py is used in a AWS Lambda environment.This PR uses the
write_tomecanism to write this version to a file (and defaulting to pkg_resources in case of an unexpected error)Checklist