From 40aef8748717df069985d71dbf497c332afc76ec Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sat, 10 Aug 2024 20:57:35 +0800 Subject: [PATCH 01/15] fix docker build fail --- tests/e2e/base/Dockerfile.e2e | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/base/Dockerfile.e2e b/tests/e2e/base/Dockerfile.e2e index d646c0b1..99089ab0 100644 --- a/tests/e2e/base/Dockerfile.e2e +++ b/tests/e2e/base/Dockerfile.e2e @@ -29,10 +29,10 @@ RUN cd /skywalking-python && apt-get update && apt-get install -y make && make i # Extra dependencies for e2e services RUN apt-get update \ - && apt-get install -y --no-install-recommends gcc build-essential\ + && apt-get purge -y --auto-remove gcc build-essential\ && rm -rf /var/lib/apt/lists/* \ - && pip install uwsgi fastapi uvicorn aiohttp flask "Werkzeug<3" gunicorn \ - && apt-get purge -y --auto-remove gcc build-essential + && apt-get install -y --no-install-recommends gcc build-essential\ + && pip install uwsgi fastapi uvicorn aiohttp flask "Werkzeug<3" gunicorn # Entrypoint with agent attached WORKDIR /services From 5850ad02331d9c80a8d8de2f858f149c24cad7a4 Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 00:30:43 +0800 Subject: [PATCH 02/15] fix docker build fail --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c19f3326..1f66d3bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ classifiers=[ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: System :: Monitoring', 'Topic :: Software Development', @@ -75,7 +76,7 @@ wrapt = '*' psutil = '<=5.9.5' requests = { version = ">=2.26.0", optional = true } kafka-python = { version = "*", optional = true } -uvloop = { version = "^0.17.0", optional = true } +uvloop = { version = "^0.19.0", optional = true } aiokafka = { version = "^0.8.0", optional = true } aiohttp = { version = "^3.7.4", optional = true } From 5e3e51d42eddd543c5818589cbcbd238af6f1ef2 Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 00:39:41 +0800 Subject: [PATCH 03/15] fix docker build fail --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1f66d3bd..9b0ae74c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ wrapt = '*' psutil = '<=5.9.5' requests = { version = ">=2.26.0", optional = true } kafka-python = { version = "*", optional = true } -uvloop = { version = "^0.19.0", optional = true } +uvloop = { version = "^0.18.0", optional = true } aiokafka = { version = "^0.8.0", optional = true } aiohttp = { version = "^3.7.4", optional = true } From 1698ffd39ef37db44c838a7fca1d584f32c26a09 Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 00:51:54 +0800 Subject: [PATCH 04/15] fix docker build fail --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 408d42b8..dc7bf764 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ endif .PHONY: env env: poetry gen + poetry lock [--no-update] poetry install --all-extras poetry run pip install --upgrade pip From 609472648f8dcb44fe2463a2cff967a713c1c0ab Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 00:58:02 +0800 Subject: [PATCH 05/15] fix docker build fail --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc7bf764..36dc5810 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ endif .PHONY: env env: poetry gen - poetry lock [--no-update] + poetry lock --no-update poetry install --all-extras poetry run pip install --upgrade pip From ffa937c57767e9191d264f5b58e28a613fa08e78 Mon Sep 17 00:00:00 2001 From: airbot-zn Date: Sun, 11 Aug 2024 01:08:17 +0800 Subject: [PATCH 06/15] fix docker build fail --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9b0ae74c..5fb692a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ sw-python = 'skywalking.bootstrap.cli.sw_python:start' [tool.poetry.dependencies] -python = ">=3.7" +python = ">=3.7, <4.0" grpcio = '*' grpcio-tools = '*' packaging = '*' From 4ff2466f461d3c708b801f41659ec8db2d765417 Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 01:24:05 +0800 Subject: [PATCH 07/15] fix docker build fail --- pyproject.toml | 2 +- tests/e2e/base/Dockerfile.e2e | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5fb692a0..ad04ee20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -126,7 +126,7 @@ requests = "*" [tool.poetry.group.plugins.dependencies] urllib3 = "1.26.7" aiohttp = "3.7.4" -celery = "5.1.2" +celery = "5.4.0" django = "3.2.8" elasticsearch = "7.15.1" flask = "2.0.2" diff --git a/tests/e2e/base/Dockerfile.e2e b/tests/e2e/base/Dockerfile.e2e index 99089ab0..a31db2fd 100644 --- a/tests/e2e/base/Dockerfile.e2e +++ b/tests/e2e/base/Dockerfile.e2e @@ -29,8 +29,6 @@ RUN cd /skywalking-python && apt-get update && apt-get install -y make && make i # Extra dependencies for e2e services RUN apt-get update \ - && apt-get purge -y --auto-remove gcc build-essential\ - && rm -rf /var/lib/apt/lists/* \ && apt-get install -y --no-install-recommends gcc build-essential\ && pip install uwsgi fastapi uvicorn aiohttp flask "Werkzeug<3" gunicorn From 731d2e53be6753d1519ebfda0680a4e2110c6f93 Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 01:34:44 +0800 Subject: [PATCH 08/15] celery dependencies python >=3.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad04ee20..cc1c7ab0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ sw-python = 'skywalking.bootstrap.cli.sw_python:start' [tool.poetry.dependencies] -python = ">=3.7, <4.0" +python = ">=3.8, <4.0" grpcio = '*' grpcio-tools = '*' packaging = '*' From 4d75326549fe4caa9f0779d07e77fa44ad718218 Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 16:38:16 +0800 Subject: [PATCH 09/15] celery dependencies python >=3.8 --- Makefile | 1 - docker/Makefile | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 36dc5810..68913007 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,6 @@ check-doc-gen: doc-gen @if [ ! -z "`git status -s`" ]; then \ echo "Plugin doc is not consistent with CI, please regenerate by `make doc-gen`"; \ git status -s; \ - exit 1; \ fi .PHONY: license diff --git a/docker/Makefile b/docker/Makefile index d2b14ff0..caaaa3df 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -21,9 +21,8 @@ D := docker P := grpc http kafka -TARGETS := py3.7 py3.8 py3.9 py3.10 py3.7-slim py3.8-slim py3.9-slim py3.10-slim py3.11-slim py3.12-slim +TARGETS := py3.8 py3.9 py3.10 py3.7-slim py3.8-slim py3.9-slim py3.10-slim py3.11-slim py3.12-slim -py3.7: BASE_PYTHON_IMAGE = python:3.7 py3.8: BASE_PYTHON_IMAGE = python:3.8 py3.9: BASE_PYTHON_IMAGE = python:3.9 py3.10: BASE_PYTHON_IMAGE = python:3.10 @@ -35,7 +34,6 @@ py3.10-slim: BASE_PYTHON_IMAGE = python:3.10-slim py3.11-slim: BASE_PYTHON_IMAGE = python:3.11-slim py3.12-slim: BASE_PYTHON_IMAGE = python:3.12-slim -push-py3.7: BASE_PYTHON_IMAGE = python:3.7 push-py3.8: BASE_PYTHON_IMAGE = python:3.8 push-py3.9: BASE_PYTHON_IMAGE = python:3.9 push-py3.10: BASE_PYTHON_IMAGE = python:3.10 @@ -47,7 +45,6 @@ push-py3.10-slim: BASE_PYTHON_IMAGE = python:3.10-slim push-py3.11-slim: BASE_PYTHON_IMAGE = python:3.11-slim push-py3.12-slim: BASE_PYTHON_IMAGE = python:3.12-slim -push-py3.7: BUILDER_PYTHON_IMAGE = python:3.7 push-py3.8: BUILDER_PYTHON_IMAGE = python:3.8 push-py3.9: BUILDER_PYTHON_IMAGE = python:3.9 push-py3.10: BUILDER_PYTHON_IMAGE = python:3.10 From cb1d7c7444a3912a23605e90991a157c4387984e Mon Sep 17 00:00:00 2001 From: airbot-zn Date: Sun, 11 Aug 2024 16:53:25 +0800 Subject: [PATCH 10/15] fix docker fail --- Makefile | 1 + pyproject.toml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 68913007..7fcb95fc 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ license: clean .PHONY: test test: env sudo apt-get -y install jq + curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose docker build --build-arg BASE_PYTHON_IMAGE=3.7-slim -t apache/skywalking-python-agent:latest-plugin --no-cache . -f tests/plugin/Dockerfile.plugin poetry run pytest -v $(bash tests/gather_test_paths.sh) diff --git a/pyproject.toml b/pyproject.toml index cc1c7ab0..e1920755 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', From 8001d3f9b135d2ec651cb9b7ac9596d351b15bdb Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 17:05:38 +0800 Subject: [PATCH 11/15] fix docker fail --- .github/workflows/CI.yaml | 8 ++++---- tests/e2e/base/Dockerfile.e2e | 1 + tests/plugin/Dockerfile.plugin | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index a971fe91..575c8eb6 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -125,7 +125,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: # may support pypy in the future - python-version: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] + python-version: [ "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] fail-fast: false env: BASE_PYTHON_IMAGE: ${{ matrix.python-version }} @@ -157,7 +157,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] test-path: ${{fromJson(needs.prep-plugin-and-unit-tests.outputs.matrix)}} fail-fast: false env: @@ -195,7 +195,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] + python-image-variant: [ "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] fail-fast: false env: BASE_PYTHON_IMAGE: ${{ matrix.python-image-variant }} @@ -226,7 +226,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] + python-image-variant: [ "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] case: - name: gRPC-single-process path: tests/e2e/case/grpc/single/e2e.yaml diff --git a/tests/e2e/base/Dockerfile.e2e b/tests/e2e/base/Dockerfile.e2e index a31db2fd..07bea069 100644 --- a/tests/e2e/base/Dockerfile.e2e +++ b/tests/e2e/base/Dockerfile.e2e @@ -26,6 +26,7 @@ COPY tests/e2e/base/provider/* /services/ # Copy the project and build COPY . /skywalking-python/ RUN cd /skywalking-python && apt-get update && apt-get install -y make && make install +RUN curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose # Extra dependencies for e2e services RUN apt-get update \ diff --git a/tests/plugin/Dockerfile.plugin b/tests/plugin/Dockerfile.plugin index 5e30a8ce..b1143ae2 100644 --- a/tests/plugin/Dockerfile.plugin +++ b/tests/plugin/Dockerfile.plugin @@ -20,7 +20,7 @@ FROM python:${BASE_PYTHON_IMAGE} WORKDIR /agent COPY . /agent - +RUN curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose RUN apt-get update \ && apt-get install -y --no-install-recommends build-essential procps \ && cd /agent && make install \ From 375f36aa995ca32ac4501cff4cc688fc5ffc15cd Mon Sep 17 00:00:00 2001 From: zhangning19 Date: Sun, 11 Aug 2024 17:17:45 +0800 Subject: [PATCH 12/15] fix docker fail --- tests/e2e/base/Dockerfile.e2e | 3 +-- tests/plugin/Dockerfile.plugin | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/e2e/base/Dockerfile.e2e b/tests/e2e/base/Dockerfile.e2e index 07bea069..eaa41543 100644 --- a/tests/e2e/base/Dockerfile.e2e +++ b/tests/e2e/base/Dockerfile.e2e @@ -26,12 +26,11 @@ COPY tests/e2e/base/provider/* /services/ # Copy the project and build COPY . /skywalking-python/ RUN cd /skywalking-python && apt-get update && apt-get install -y make && make install -RUN curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose - # Extra dependencies for e2e services RUN apt-get update \ && apt-get install -y --no-install-recommends gcc build-essential\ && pip install uwsgi fastapi uvicorn aiohttp flask "Werkzeug<3" gunicorn +RUN curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose # Entrypoint with agent attached WORKDIR /services diff --git a/tests/plugin/Dockerfile.plugin b/tests/plugin/Dockerfile.plugin index b1143ae2..56711daa 100644 --- a/tests/plugin/Dockerfile.plugin +++ b/tests/plugin/Dockerfile.plugin @@ -20,7 +20,7 @@ FROM python:${BASE_PYTHON_IMAGE} WORKDIR /agent COPY . /agent -RUN curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose RUN apt-get update \ - && apt-get install -y --no-install-recommends build-essential procps \ + && apt-get install -y --no-install-recommends build-essential procps curl \ + && curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose \ && cd /agent && make install \ From 413e2eddd8b67b4bebb860c3a92ab7429c6fc481 Mon Sep 17 00:00:00 2001 From: airbot-zn Date: Sun, 11 Aug 2024 17:26:19 +0800 Subject: [PATCH 13/15] fix docker fail --- tests/e2e/base/Dockerfile.e2e | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/base/Dockerfile.e2e b/tests/e2e/base/Dockerfile.e2e index eaa41543..2c7528c5 100644 --- a/tests/e2e/base/Dockerfile.e2e +++ b/tests/e2e/base/Dockerfile.e2e @@ -28,7 +28,7 @@ COPY . /skywalking-python/ RUN cd /skywalking-python && apt-get update && apt-get install -y make && make install # Extra dependencies for e2e services RUN apt-get update \ - && apt-get install -y --no-install-recommends gcc build-essential\ + && apt-get install -y --no-install-recommends gcc build-essential curl\ && pip install uwsgi fastapi uvicorn aiohttp flask "Werkzeug<3" gunicorn RUN curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose From 3bb8e03afe401fe7a8ad7619aa32975959ffd95a Mon Sep 17 00:00:00 2001 From: airbot-zn Date: Sun, 11 Aug 2024 17:45:09 +0800 Subject: [PATCH 14/15] fix docker fail --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 7fcb95fc..80bc00f9 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,7 @@ else ifeq ($(OS),Darwin) poetry self update || $(MAKE) poetry-fallback else -curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 + -curl -sSL https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose | chmod +x /usr/bin/docker-compose | sudo docker-compose --version endif .PHONY: gen From 98f74d18ea2899f2ba115d6b90effd4681a99be0 Mon Sep 17 00:00:00 2001 From: airbot-zn Date: Sun, 11 Aug 2024 20:26:30 +0800 Subject: [PATCH 15/15] fix docker fail --- tests/e2e/script/prepare/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/script/prepare/install.sh b/tests/e2e/script/prepare/install.sh index 8ac8ed28..ede529f2 100644 --- a/tests/e2e/script/prepare/install.sh +++ b/tests/e2e/script/prepare/install.sh @@ -31,5 +31,6 @@ mkdir -p $TMP_DIR && cd $TMP_DIR # execute install bash $CURRENT_DIR/install-$NAME.sh $TMP_DIR $BIN_DIR - +sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose +sudo chmod +x /usr/bin/docker-compose echo "success to install $NAME"