From 210828223d60c024f3de31977f5b08085bdcf1d2 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Wed, 16 Dec 2020 21:50:53 +0800 Subject: [PATCH 1/3] chore: only install extra modules when needed, bump up version --- README.md | 10 ++++++++-- setup.py | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3a8c8d5..feb9f2a0 100755 --- a/README.md +++ b/README.md @@ -20,8 +20,14 @@ microservices, cloud native and container-based (Docker, Kubernetes, Mesos) arch The Python agent module is published to [Pypi](https://pypi.org/project/apache-skywalking/), from where you can use `pip` to install: ```shell -# Install the latest version -pip install apache-skywalking +# Install the latest version, using the default gRPC protocol to report data to OAP +pip install "apache-skywalking" + +# Install the latest version, using the http protocol to report data to OAP +pip install "apache-skywalking[http]" + +# Install the latest version, using the kafka protocol to report data to OAP +pip install "apache-skywalking[kafka]" # Install a specific version x.y.z # pip install apache-skywalking==x.y.z diff --git a/setup.py b/setup.py index 276cf81e..295dd5c4 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ setup( name="apache-skywalking", - version="0.4.0", + version="0.5.0", description="Python Agent for Apache SkyWalking", long_description=README, long_description_content_type="text/markdown", @@ -38,7 +38,6 @@ install_requires=[ "grpcio", "grpcio-tools", - "requests", "packaging", ], extras_require={ @@ -47,6 +46,12 @@ "pyyaml", "pytest", ], + "http": [ + "requests", + ], + "kafka": [ + "kafka", + ], }, classifiers=[ "Framework :: Flake8", From b77f551ac480198aa4e689a5705cd025173bfd09 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Wed, 16 Dec 2020 23:18:34 +0800 Subject: [PATCH 2/3] test: remove some of the versions to shorten test time --- tests/plugin/sw_requests/test_request.py | 3 --- tests/plugin/sw_sanic/test_sanic.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/tests/plugin/sw_requests/test_request.py b/tests/plugin/sw_requests/test_request.py index 7b50c2fb..001f1f3a 100644 --- a/tests/plugin/sw_requests/test_request.py +++ b/tests/plugin/sw_requests/test_request.py @@ -33,10 +33,7 @@ class TestPlugin(TestPluginBase): 'requests==2.24.0', 'requests==2.20.0', 'requests==2.19.0', - 'requests==2.18.0', - 'requests==2.17.0', 'requests==2.13.0', - 'requests==2.11.0', 'requests==2.9.0', ]) def test_plugin(self, docker_compose, version): diff --git a/tests/plugin/sw_sanic/test_sanic.py b/tests/plugin/sw_sanic/test_sanic.py index 2473a524..8fdec99d 100644 --- a/tests/plugin/sw_sanic/test_sanic.py +++ b/tests/plugin/sw_sanic/test_sanic.py @@ -32,9 +32,6 @@ class TestPlugin(TestPluginBase): @pytest.mark.parametrize('version', [ 'sanic==20.3.0', 'sanic==20.6.0', - 'sanic==20.6.1', - 'sanic==20.6.2', - 'sanic==20.6.3', 'sanic==20.9.0', 'sanic==20.9.1', ]) From 45feaa0e0691b4affd3f470d2803d5c5ea12c483 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Wed, 16 Dec 2020 23:34:55 +0800 Subject: [PATCH 3/3] test: give an image name to avoid unnecessary builds --- tests/plugin/docker/Dockerfile.agent => Dockerfile | 0 tests/plugin/docker/docker-compose.base.yml | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) rename tests/plugin/docker/Dockerfile.agent => Dockerfile (100%) diff --git a/tests/plugin/docker/Dockerfile.agent b/Dockerfile similarity index 100% rename from tests/plugin/docker/Dockerfile.agent rename to Dockerfile diff --git a/tests/plugin/docker/docker-compose.base.yml b/tests/plugin/docker/docker-compose.base.yml index 8e70c24e..7a2a09f0 100644 --- a/tests/plugin/docker/docker-compose.base.yml +++ b/tests/plugin/docker/docker-compose.base.yml @@ -22,6 +22,7 @@ services: build: context: . dockerfile: Dockerfile.tool + image: skywalking-collector:ci ports: - 19876:19876 - 12800:12800 @@ -36,9 +37,9 @@ services: agent: build: context: ../../../ - dockerfile: tests/plugin/docker/Dockerfile.agent args: - SW_PYTHON_VERSION=${SW_PYTHON_VERSION:-latest} + image: skywalking-agent:ci environment: SW_AGENT_COLLECTOR_BACKEND_SERVICES: collector:19876 SW_AGENT_LOGGING_LEVEL: DEBUG