Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Updating code to 0.34.0 #8

Merged
merged 110 commits into from
Mar 4, 2020
Merged

Updating code to 0.34.0 #8

merged 110 commits into from
Mar 4, 2020

Conversation

codeboten
Copy link

No description provided.

brettlangdon and others added 30 commits November 4, 2019 09:12
The current quote enforcement is a restrictive and annoying.

Furthermore, it arbitrary enforces single quotes whereas tools like black —
which are now standard in Python ecosystem — sticks to the Python widely used
double quotes.
Checks that no except statement is used without specifying an exception type.
We only ignore W503 in favor of W504 to define where we put the line break
before binary operators.
This makes sure we pick proper variable names.
This makes sure that we use a correct logging format in our log strings.
This fixes various RST directives that we got wrong and log format
* internal: move health metrics enabled to config

* remove unused import
* ci: add black step to ci

* also ignore docs/
Version 8.0.18 is causing segfaults in sqlalchemy tests.

Signed-off-by: Alex Boten <aboten@lightstep.com>
* core: remove unused app type

* deprecate app_type
Signed-off-by: Alex Boten <aboten@lightstep.com>
* vendor: fix debtcollector imports

* use relative path for all other vendored libraries
* core: common span types

* include enum backport in install_requires

* attempt to fix tox issues in ci for celery
* Start black formatting some files

* fix flake8

* fix black too
* Add dogpile support

* Docs

* Tests

* Add to CI

* Apply suggestions from code review

Co-Authored-By: Tahir H. Butt <tahir@tahirbutt.com>

* Fix tests
* bottle: handle 400 responses

* fix tests

* cleaner conditionals
* core: Deprecate ddtrace.ext.AppTypes

* fix flake8

* Remove unused helper
…taDog#1166)

* core: fix new sampler defaults and add env variables to configure

* fix tests
jd and others added 27 commits February 14, 2020 09:29
ci(docs): modernize documentation building
There's no need to pull our custom images there.
This currently fails since the docs are not built by rake anymore (I presume).

- Remove unneeded `sudo` usage in docs target
- Upgrade deploy_dev to Python 3.8
* utils: Update get_env to support any number of parts
Changes get_env(integration, key) to get_env(*parts) to make it easier to get
an env built from 1 part or more than 2 parts

the major change here to pay attention to is the third positional argument used
to be the default, not the default *must* be provided as a keyword argument

* keyword argument after *args is not supported in Python2

* remove *
* tests: fix ordering of PYTHONPATH
If you run the sitecustomize test cases on their own they fail because
they import the ddtrace/bootstrap/sitecustomize.py module and not
the tests/commands/bootstrap/sitecustomize.py module.

This is because this helper code would put the test bootstrap module
on the end of the PYTHONPATH, which means it gets looked at last.

I have no idea how this seems to work ok when you run the entire
test suite together, must be an odd dependency on a previous test
case?

* fix flake8
ci(update): use standard Python images for black and flake8 jobs
* ci(update) use standard Python image for test_build job

* no longer use virtualenv

* Update .circleci/config.yml
* ci: rework .circleci/config.yml

* add labels to docker images

* fix test_build job

* don't forget to checkout code

* run test build on all versions

* restructure test builds

* fix docker definition

* run flask python tests in parallel

* organize more

* fix pip install for python34

* use sudo with py34 to install pip deps

* use python:3.4 image instead

* reorganize the build flow

* break out more test suites

* fix job keys

* rename wait_all_tests

* we don't need a placeholder for pre_test

* remove build_docs from pre_test requirement

* remove python specific integration jobs

Co-authored-by: Tahir H. Butt <tahir@tahirbutt.com>
* internal: Add ability to easily mark a span to be measured

* contrib: start to update integrations to indicate measured spans

* fix flake8

* tests: start work on _dd.measured test updates

* finish up tests for existing modified integrations

* fix flake8 issues

* fix s/assert_span_is_measured/assert_is_measured/g

* fix issue

* ensure we measure old patching method

* measure more integrations

* fix black formatting

* more integrations and tests

* add missing import

* finish up integration changes

* fix flake8 issues

* fix failed tests

* fix double dot

* fix failing test

* use span.set_tag(SPAN_MEASURED_KEY) instead

* move _dd.measured to metrics

* more consistently set _dd.measured value

Co-authored-by: Tahir H. Butt <tahir@tahirbutt.com>
* fix(tests): remove encoding argument to msgpack.encode

This has been removed in msgpack 1.0.0.
Just use the decoder decode method.

* style(black): black test_integrations
msgpack 1.0.0 has a different default behaviour which returns string rather
than bytes. Keep it to bytes by default for all versions.

Note that this is only used in testing anyway.
Signed-off-by: Alex Boten <aboten@lightstep.com>
Signed-off-by: Alex Boten <aboten@lightstep.com>
There's a regression in virtualenv >= 20 that makes one of the ddtrace-run +
Celery test to fails.

virtualenv now adds a site.py which modifies sys.path and breaks the PYTHONPATH
that is set by ddtrace-run.
ddtrace/__init__.py Show resolved Hide resolved
ddtrace/_worker.py Show resolved Hide resolved
ddtrace/constants.py Show resolved Hide resolved
ddtrace/context.py Show resolved Hide resolved
ddtrace/contrib/bottle/trace.py Show resolved Hide resolved
ddtrace/contrib/django/__init__.py Show resolved Hide resolved
ddtrace/contrib/django/utils.py Show resolved Hide resolved
ddtrace/contrib/django/utils.py Show resolved Hide resolved
@codeboten codeboten merged commit 03fb2ca into master Mar 4, 2020
@andrewhsu andrewhsu deleted the codeboten/0.34.0 branch August 11, 2020 22:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants