From 3c6daec3f515a6ed80e52faeddd1a477458e6d48 Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Mon, 18 Mar 2024 15:26:33 -0600 Subject: [PATCH] Silence github actions --- .ci/.matrix_exclude.yml | 291 ------------------ .ci/.matrix_framework.yml | 57 ---- .ci/.matrix_framework_full.yml | 89 ------ .ci/.matrix_python.yml | 3 - .ci/.matrix_python_full.yml | 9 - .ci/.matrix_windows.yml | 21 -- .ci/bench.sh | 26 -- .ci/create-arn-table.sh | 25 -- .ci/docker/README.md | 34 -- .ci/docker/util.sh | 57 ---- .ci/publish-aws.sh | 66 ---- .ci/snapshoty.yml | 36 --- .../updatecli.d/update-gherkin-specs.yml | 84 ----- .../updatecli.d/update-json-specs.yml | 84 ----- .ci/updatecli/updatecli.d/update-specs.yml | 86 ------ .ci/updatecli/values.yml | 14 - .github/ISSUE_TEMPLATE/Bug_report.md | 44 --- .github/ISSUE_TEMPLATE/Feature_request.md | 17 - .github/PULL_REQUEST_TEMPLATE.md | 9 - .github/community-label.yml | 5 - .github/dependabot.yml | 31 -- .github/labeler-config.yml | 3 - .github/workflows/README.md | 55 ---- .github/workflows/addToProject.yml | 20 -- .github/workflows/build-distribution.yml | 20 -- .github/workflows/labeler.yml | 46 --- .github/workflows/matrix-command.yml | 49 --- .github/workflows/microbenchmark.yml | 47 --- .github/workflows/opentelemetry.yml | 22 -- .github/workflows/packages.yml | 37 --- .github/workflows/pre-commit.yml | 14 - .github/workflows/release.yml | 151 --------- .github/workflows/run-matrix.yml | 37 --- .github/workflows/snapshoty.yml | 35 --- .github/workflows/test-docs.yml | 42 --- .github/workflows/test-reporter.yml | 20 -- .github/workflows/test.yml | 217 ------------- .github/workflows/updatecli.yml | 29 -- 38 files changed, 1932 deletions(-) delete mode 100644 .ci/.matrix_exclude.yml delete mode 100644 .ci/.matrix_framework.yml delete mode 100644 .ci/.matrix_framework_full.yml delete mode 100644 .ci/.matrix_python.yml delete mode 100644 .ci/.matrix_python_full.yml delete mode 100644 .ci/.matrix_windows.yml delete mode 100755 .ci/bench.sh delete mode 100755 .ci/create-arn-table.sh delete mode 100644 .ci/docker/README.md delete mode 100755 .ci/docker/util.sh delete mode 100755 .ci/publish-aws.sh delete mode 100644 .ci/snapshoty.yml delete mode 100644 .ci/updatecli/updatecli.d/update-gherkin-specs.yml delete mode 100644 .ci/updatecli/updatecli.d/update-json-specs.yml delete mode 100644 .ci/updatecli/updatecli.d/update-specs.yml delete mode 100644 .ci/updatecli/values.yml delete mode 100644 .github/ISSUE_TEMPLATE/Bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/community-label.yml delete mode 100644 .github/dependabot.yml delete mode 100644 .github/labeler-config.yml delete mode 100644 .github/workflows/README.md delete mode 100644 .github/workflows/addToProject.yml delete mode 100644 .github/workflows/build-distribution.yml delete mode 100644 .github/workflows/labeler.yml delete mode 100644 .github/workflows/matrix-command.yml delete mode 100644 .github/workflows/microbenchmark.yml delete mode 100644 .github/workflows/opentelemetry.yml delete mode 100644 .github/workflows/packages.yml delete mode 100644 .github/workflows/pre-commit.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/run-matrix.yml delete mode 100644 .github/workflows/snapshoty.yml delete mode 100644 .github/workflows/test-docs.yml delete mode 100644 .github/workflows/test-reporter.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/updatecli.yml diff --git a/.ci/.matrix_exclude.yml b/.ci/.matrix_exclude.yml deleted file mode 100644 index d7d05f2af..000000000 --- a/.ci/.matrix_exclude.yml +++ /dev/null @@ -1,291 +0,0 @@ -exclude: - - VERSION: pypy-3 # pypy3 currently fails on CI, e.g. https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-python%2Fapm-agent-python-mbp/detail/PR-1099/2/pipeline#step-3497-log-1 - FRAMEWORK: none - # Django - # Django 4.0 requires Python 3.8+ - - VERSION: pypy-3 # current pypy-3 is compatible with Python 3.7 - FRAMEWORK: django-4.0 - - VERSION: python-3.6 - FRAMEWORK: django-4.0 - - VERSION: python-3.7 - FRAMEWORK: django-4.0 - - VERSION: pypy-3 # current pypy-3 is compatible with Python 3.7 - FRAMEWORK: celery-5-django-4 - - VERSION: python-3.6 - FRAMEWORK: celery-5-django-4 - - VERSION: python-3.7 - FRAMEWORK: celery-5-django-4 - # Flask - - VERSION: pypy-3 - FRAMEWORK: flask-0.11 # see https://github.com/pallets/flask/commit/6e46d0cd, 0.11.2 was never released - # Python 3.10 removed a bunch of classes from collections, now in collections.abc - - VERSION: python-3.10 - FRAMEWORK: django-1.11 - - VERSION: python-3.10 - FRAMEWORK: django-2.0 - - VERSION: python-3.10 - FRAMEWORK: celery-4-django-2.0 - - VERSION: python-3.10 - FRAMEWORK: celery-4-django-1.11 - - VERSION: python-3.11 # cannot import name 'formatargspec' from 'inspect' - FRAMEWORK: celery-4-flask-1.0 - - VERSION: python-3.11 # https://github.com/celery/billiard/issues/377 - FRAMEWORK: celery-5-flask-2 - - VERSION: python-3.11 # https://github.com/celery/billiard/issues/377 - FRAMEWORK: celery-5-django-3 - - VERSION: python-3.11 # https://github.com/celery/billiard/issues/377 - FRAMEWORK: celery-5-django-4 - - VERSION: python-3.12 # cannot import name 'formatargspec' from 'inspect' - FRAMEWORK: celery-4-flask-1.0 - - VERSION: python-3.12 # https://github.com/celery/billiard/issues/377 - FRAMEWORK: celery-5-flask-2 - - VERSION: python-3.12 # https://github.com/celery/billiard/issues/377 - FRAMEWORK: celery-5-django-3 - - VERSION: python-3.12 # https://github.com/celery/billiard/issues/377 - FRAMEWORK: celery-5-django-4 - - VERSION: python-3.10 - FRAMEWORK: graphene-2 - - VERSION: python-3.10 - FRAMEWORK: aiohttp-3.0 - - VERSION: python-3.10 - FRAMEWORK: aiohttp-4.0 - - VERSION: python-3.10 - FRAMEWORK: cassandra-3.4 - - VERSION: python-3.10 - FRAMEWORK: pymongo-3.5 - - VERSION: python-3.11 - FRAMEWORK: django-1.11 - - VERSION: python-3.11 - FRAMEWORK: django-2.0 - - VERSION: python-3.11 - FRAMEWORK: django-2.1 - - VERSION: python-3.11 - FRAMEWORK: celery-4-django-2.0 - - VERSION: python-3.11 - FRAMEWORK: celery-4-django-1.11 - - VERSION: python-3.11 - FRAMEWORK: graphene-2 - - VERSION: python-3.11 - FRAMEWORK: aiohttp-3.0 - - VERSION: python-3.11 - FRAMEWORK: aiohttp-4.0 - - VERSION: python-3.11 - FRAMEWORK: cassandra-3.4 - - VERSION: python-3.11 - FRAMEWORK: pymongo-3.5 - - VERSION: python-3.12 - FRAMEWORK: django-1.11 - - VERSION: python-3.12 - FRAMEWORK: django-2.0 - - VERSION: python-3.12 - FRAMEWORK: django-2.1 - - VERSION: python-3.12 - FRAMEWORK: celery-4-django-2.0 - - VERSION: python-3.12 - FRAMEWORK: celery-4-django-1.11 - - VERSION: python-3.12 - FRAMEWORK: graphene-2 - - VERSION: python-3.12 - FRAMEWORK: aiohttp-3.0 - - VERSION: python-3.12 - FRAMEWORK: aiohttp-4.0 - - VERSION: python-3.12 - FRAMEWORK: cassandra-3.4 - - VERSION: python-3.12 - FRAMEWORK: pymongo-3.5 - # pymongo - - VERSION: python-3.10 - FRAMEWORK: pymongo-3.1 - - VERSION: python-3.11 - FRAMEWORK: pymongo-3.1 - - VERSION: python-3.12 - FRAMEWORK: pymongo-3.1 - - VERSION: python-3.10 - FRAMEWORK: pymongo-3.2 - - VERSION: python-3.11 - FRAMEWORK: pymongo-3.2 - - VERSION: python-3.12 - FRAMEWORK: pymongo-3.2 - - VERSION: python-3.10 - FRAMEWORK: pymongo-3.3 - - VERSION: python-3.11 - FRAMEWORK: pymongo-3.3 - - VERSION: python-3.12 - FRAMEWORK: pymongo-3.3 - - VERSION: python-3.8 - FRAMEWORK: pymongo-3.4 - - VERSION: python-3.9 - FRAMEWORK: pymongo-3.4 - - VERSION: python-3.10 - FRAMEWORK: pymongo-3.4 - - VERSION: python-3.11 - FRAMEWORK: pymongo-3.4 - - VERSION: python-3.12 - FRAMEWORK: pymongo-3.4 - - VERSION: pypy-3 - FRAMEWORK: pymongo-3.0 - # pymssql - - VERSION: pypy-3 # currently fails with error on pypy3 - FRAMEWORK: pymssql-newest - - VERSION: python-3.6 # dropped support for py3.6 - FRAMEWORK: pymssql-newest - # pyodbc - - VERSION: pypy-3 - FRAMEWORK: pyodbc-newest - # boto3 - - VERSION: python-3.10 - FRAMEWORK: boto3-1.5 - - VERSION: python-3.10 - FRAMEWORK: boto3-1.6 - - VERSION: python-3.11 - FRAMEWORK: boto3-1.5 - - VERSION: python-3.11 - FRAMEWORK: boto3-1.6 - - VERSION: python-3.12 - FRAMEWORK: boto3-1.5 - - VERSION: python-3.12 - FRAMEWORK: boto3-1.6 - # aiohttp client, only supported in Python 3.7+ - - VERSION: pypy-3 - FRAMEWORK: aiohttp-3.0 - - VERSION: python-3.6 - FRAMEWORK: aiohttp-3.0 - - VERSION: pypy-3 - FRAMEWORK: aiohttp-4.0 - - VERSION: python-3.6 - FRAMEWORK: aiohttp-4.0 - - VERSION: pypy-3 - FRAMEWORK: aiohttp-newest - - VERSION: python-3.6 - FRAMEWORK: aiohttp-newest - # tornado, only supported in Python 3.7+ - - VERSION: pypy-3 - FRAMEWORK: tornado-newest - - VERSION: python-3.6 - FRAMEWORK: tornado-newest - # Starlette, only supported in python 3.7+ - - VERSION: pypy-3 - FRAMEWORK: starlette-0.13 - - VERSION: python-3.6 - FRAMEWORK: starlette-0.13 - - VERSION: pypy-3 - FRAMEWORK: starlette-0.14 - - VERSION: python-3.6 - FRAMEWORK: starlette-0.14 - - VERSION: pypy-3 - FRAMEWORK: starlette-newest - - VERSION: python-3.6 - FRAMEWORK: starlette-newest - # aiopg - - VERSION: pypy-3 - FRAMEWORK: aiopg-newest - - VERSION: python-3.6 - FRAMEWORK: aiopg-newest - # asyncpg - - VERSION: pypy-3 - FRAMEWORK: asyncpg-newest - - VERSION: pypy-3 - FRAMEWORK: asyncpg-0.28 - - VERSION: python-3.6 - FRAMEWORK: asyncpg-newest - - VERSION: python-3.6 - FRAMEWORK: asyncpg-0.28 - # sanic - - VERSION: pypy-3 - FRAMEWORK: sanic-newest - - VERSION: pypy-3 - FRAMEWORK: sanic-20.12 - - VERSION: python-3.6 - FRAMEWORK: sanic-20.12 - - VERSION: python-3.6 - FRAMEWORK: sanic-newest - - VERSION: pypy-3 - # aioredis - FRAMEWORK: aioredis-newest - - VERSION: python-3.6 - FRAMEWORK: aioredis-newest - # aiomysql - - VERSION: pypy-3 - FRAMEWORK: aiomysql-newest - - VERSION: python-3.6 - FRAMEWORK: aiomysql-newest - # aiobotocore - - VERSION: pypy-3 - FRAMEWORK: aiobotocore-newest - - VERSION: python-3.6 - FRAMEWORK: aiobotocore-newest - # mysql-connector-python - - VERSION: python-3.6 - FRAMEWORK: mysql_connector-newest - # twisted - - VERSION: python-3.11 - FRAMEWORK: twisted-18 - - VERSION: python-3.11 - FRAMEWORK: twisted-17 - - VERSION: python-3.11 - FRAMEWORK: twisted-16 - - VERSION: python-3.11 - FRAMEWORK: twisted-15 - - VERSION: python-3.12 - FRAMEWORK: twisted-18 - - VERSION: python-3.12 - FRAMEWORK: twisted-17 - - VERSION: python-3.12 - FRAMEWORK: twisted-16 - - VERSION: python-3.12 - FRAMEWORK: twisted-15 - # pylibmc - - VERSION: python-3.11 - FRAMEWORK: pylibmc-1.4 - - VERSION: python-3.12 - FRAMEWORK: pylibmc-1.4 - # grpc - - VERSION: python-3.6 - FRAMEWORK: grpc-newest - - VERSION: python-3.7 - FRAMEWORK: grpc-1.24 - - VERSION: python-3.8 - FRAMEWORK: grpc-1.24 - - VERSION: python-3.9 - FRAMEWORK: grpc-1.24 - - VERSION: python-3.10 - FRAMEWORK: grpc-1.24 - - VERSION: python-3.11 - FRAMEWORK: grpc-1.24 - - VERSION: python-3.12 - FRAMEWORK: grpc-1.24 - - VERSION: python-3.7 - FRAMEWORK: flask-1.0 - - VERSION: python-3.7 - FRAMEWORK: flask-1.1 - - VERSION: python-3.7 - FRAMEWORK: jinja2-2 - - VERSION: python-3.7 - FRAMEWORK: celery-4-flask-1.0 - # TODO py3.12 - - VERSION: python-3.12 - FRAMEWORK: pymssql-newest # no wheels available yet - - VERSION: python-3.12 - FRAMEWORK: aiohttp-newest # no wheels available yet - - VERSION: python-3.12 - FRAMEWORK: elasticsearch-7 # relies on aiohttp - - VERSION: python-3.12 - FRAMEWORK: elasticsearch-8 # relies on aiohttp - - VERSION: python-3.12 - FRAMEWORK: aiobotocore-newest # relies on aiohttp - - VERSION: python-3.12 - FRAMEWORK: sanic-20.12 # no wheels available yet - - VERSION: python-3.12 - FRAMEWORK: sanic-newest # no wheels available yet - - VERSION: python-3.12 - FRAMEWORK: kafka-python-newest # https://github.com/dpkp/kafka-python/pull/2376 - - VERSION: python-3.12 - FRAMEWORK: pyodbc-newest # error on wheel - - VERSION: python-3.12 - FRAMEWORK: cassandra-newest # c extension issue - - VERSION: python-3.12 - FRAMEWORK: starlette-newest # waiting for 3.12.2 for this fix: https://github.com/python/cpython/pull/111221 - - VERSION: python-3.12 - FRAMEWORK: starlette-0.14 # waiting for 3.12.2 for this fix: https://github.com/python/cpython/pull/111221 - - VERSION: python-3.12 - FRAMEWORK: starlette-0.13 # waiting for 3.12.2 for this fix: https://github.com/python/cpython/pull/111221 diff --git a/.ci/.matrix_framework.yml b/.ci/.matrix_framework.yml deleted file mode 100644 index 6bf64ab44..000000000 --- a/.ci/.matrix_framework.yml +++ /dev/null @@ -1,57 +0,0 @@ -# this is a limited list of matrix builds to be used for PRs -# see .jenkins_framework_full.yml for a full list -FRAMEWORK: - - none - - django-1.11 - - django-2.0 - - django-3.1 - - django-3.2 - - django-4.0 - - flask-0.12 - - flask-1.1 - - flask-2.0 - - jinja2-3 - - opentelemetry-newest - - opentracing-newest - - twisted-newest - - celery-4-flask-1.0 - - celery-4-django-2.0 - - celery-5-flask-2 - - celery-5-django-4 - - requests-newest - - boto3-newest - - pymongo-newest - - redis-newest - - aioredis-newest - #- aioredis-2 # not supported yet - - psycopg-newest - - psycopg2-newest - - pymssql-newest - - pyodbc-newest - - memcached-newest - - pylibmc-newest - - elasticsearch-2 - - elasticsearch-7 - - elasticsearch-8 - - cassandra-newest - - psutil-newest - #- eventlet-newest - - gevent-newest - - mysql_connector-newest - - pymysql-newest - - mysqlclient-newest - - aiohttp-newest - - aiopg-newest - - asyncpg-newest - - tornado-newest - - starlette-newest - - pymemcache-newest - - graphene-2 - - httpx-newest - - httplib2-newest - - prometheus_client-newest - - sanic-newest - - aiomysql-newest - - aiobotocore-newest - - kafka-python-newest - - grpc-newest diff --git a/.ci/.matrix_framework_full.yml b/.ci/.matrix_framework_full.yml deleted file mode 100644 index 7b1ee213e..000000000 --- a/.ci/.matrix_framework_full.yml +++ /dev/null @@ -1,89 +0,0 @@ -# This is the full list of matrix builds, to be triggered with a daily build -# or manually -FRAMEWORK: - - none - - django-1.11 - - django-2.0 - - django-2.1 - - django-2.2 - - django-3.0 - - django-3.1 - - django-3.2 - - django-4.0 - # - django-master - - flask-0.10 - - flask-0.11 - - flask-0.12 - - flask-1.0 - - flask-1.1 - - flask-2.0 - - jinja2-2 - - jinja2-3 - - celery-4-flask-1.0 - - celery-4-django-1.11 - - celery-4-django-2.0 - - celery-5-flask-2 - - celery-5-django-3 - - celery-5-django-4 - - opentelemetry-newest - - opentracing-newest - - opentracing-2.0 - - twisted-newest - - twisted-18 - - twisted-17 - - twisted-16 - - twisted-15 - - requests-newest - - boto3-1.5 - - boto3-1.6 - - boto3-newest - - pymongo-3.1 - - pymongo-3.2 - - pymongo-3.3 - - pymongo-3.4 - - pymongo-3.5 - - pymongo-newest - - redis-3 - - redis-2 - - redis-newest - - psycopg-newest - - psycopg2-newest - - pymssql-newest - - memcached-newest - - pylibmc-1.4 - - pylibmc-newest - - cassandra-3.4 - - cassandra-newest - - psutil-newest - - psutil-5.0 - - psutil-4.0 - #- eventlet-newest - - elasticsearch-2 - - elasticsearch-5 - - elasticsearch-6 - - elasticsearch-7 - - elasticsearch-8 - - gevent-newest - - aiohttp-3.0 - - aiohttp-newest - - aiopg-newest - - asyncpg-0.28 - - asyncpg-newest - - tornado-newest - - starlette-0.13 - - starlette-0.14 - - starlette-newest - - pymemcache-3.0 - - pymemcache-newest - - graphene-2 - - httpx-0.13 - - httpx-0.14 - - httpx-0.21 - - httpx-newest - - httplib2-newest - - sanic-20.12 - - sanic-newest - - aiobotocore-newest - - kafka-python-newest - - grpc-newest - #- grpc-1.24 # This appears to have problems with python>3.6? diff --git a/.ci/.matrix_python.yml b/.ci/.matrix_python.yml deleted file mode 100644 index dbb9c7bf6..000000000 --- a/.ci/.matrix_python.yml +++ /dev/null @@ -1,3 +0,0 @@ -VERSION: - - python-3.6 - - python-3.12 diff --git a/.ci/.matrix_python_full.yml b/.ci/.matrix_python_full.yml deleted file mode 100644 index 03fead7ab..000000000 --- a/.ci/.matrix_python_full.yml +++ /dev/null @@ -1,9 +0,0 @@ -VERSION: - - python-3.6 - - python-3.7 - - python-3.8 - - python-3.9 - - python-3.10 - - python-3.11 - - python-3.12 -# - pypy-3 # excluded due to build issues with SQLite/Django diff --git a/.ci/.matrix_windows.yml b/.ci/.matrix_windows.yml deleted file mode 100644 index 0f12b9422..000000000 --- a/.ci/.matrix_windows.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This is the limited list of matrix builds in Windows, to be triggered on a PR basis -# The format is: -# VERSION: Major.Minor python version. -# FRAMEWORK: What framework to be tested. String format. -# ASYNCIO: Whether it's enabled or disabled. Boolean format. -# -# TODO: Remove this file when fully migrated to GH Actions - -windows: -# - VERSION: "3.6" -# FRAMEWORK: "none" -# ASYNCIO: "true" -# - VERSION: "3.7" -# FRAMEWORK: "none" -# ASYNCIO: "true" - - VERSION: "3.8" - FRAMEWORK: "none" - ASYNCIO: "true" - - VERSION: "3.9" # waiting for greenlet to have binary wheels for 3.9 - FRAMEWORK: "none" - ASYNCIO: "true" diff --git a/.ci/bench.sh b/.ci/bench.sh deleted file mode 100755 index 80de20975..000000000 --- a/.ci/bench.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -set -exo pipefail - -## Buildkite specific configuration -if [ "$CI" == "true" ] ; then - # If HOME is not set then use the Buildkite workspace - # that's normally happening when running in the CI - # owned by Elastic. - if [ -z "$HOME" ] ; then - HOME=$BUILDKITE_BUILD_CHECKOUT_PATH - export HOME - fi - - # required when running the benchmark - PATH=$PATH:$HOME/.local/bin - export PATH -fi - -## Bench specific -LANG='C.UTF-8' -LC_ALL="${LANG}" -export LANG -export LC_ALL - -# APM_AGENT_PYTHON* env variables are provided by the Buildkite hooks. -./scripts/run-benchmarks.sh "$(pwd)" "${APM_AGENT_PYTHON_ES_URL_SECRET}" "${APM_AGENT_PYTHON_ES_USER_SECRET}" "${APM_AGENT_PYTHON_ES_PASS_SECRET}" diff --git a/.ci/create-arn-table.sh b/.ci/create-arn-table.sh deleted file mode 100755 index 3105822ea..000000000 --- a/.ci/create-arn-table.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -set -o pipefail - -# -# Create the AWS ARN table given the below environment variables: -# -# AWS_FOLDER - that's the location of the publish-layer-version output for each region - -AWS_FOLDER=${AWS_FOLDER?:No aws folder provided} -ARN_FILE=".arn-file.md" - -{ - echo "### Elastic APM Python agent layer ARNs" - echo '' - echo '|Region|ARN|' - echo '|------|---|' -} > "${ARN_FILE}" - -for f in $(ls "${AWS_FOLDER}"); do - LAYER_VERSION_ARN=$(grep '"LayerVersionArn"' "$AWS_FOLDER/${f}" | cut -d":" -f2- | sed 's/ //g' | sed 's/"//g' | cut -d"," -f1) - echo "INFO: create-arn-table ARN(${LAYER_VERSION_ARN}):region(${f})" - echo "|${f}|${LAYER_VERSION_ARN}|" >> "${ARN_FILE}" -done - -echo '' >> "${ARN_FILE}" diff --git a/.ci/docker/README.md b/.ci/docker/README.md deleted file mode 100644 index 1241a7f05..000000000 --- a/.ci/docker/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# apm-agent-python docker images for testing - -Utility script for building and pushing the images based on `.ci/.matrix_python_full.yml`. - -> :information_source: This script is mainly used in [publish-docker-images](https://github.com/elastic/apm-pipeline-library/actions/workflows/publish-docker-images.yml) workflow, -which can be triggered safely at any time. - -## Options - -| Name | Description | -|----------|-----------------------------------------------------------| -| name | Name of the docker image. (`/:`) | -| registry | Registry of the docker image. (`/:`) | -| action | Either `build` or `push`. | - -## Usage - -### Build - -To build the images run - -```bash - ./util.sh --action build -``` - -You can set your own docker registry with the flag `--registry x.y.z/org`. The default is `elasticobservability`. - -### Push - -To push the images run - -```bash - ./util.sh --action push -``` diff --git a/.ci/docker/util.sh b/.ci/docker/util.sh deleted file mode 100755 index 9326a5773..000000000 --- a/.ci/docker/util.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -project_root=$(dirname "$(dirname "$(dirname "$(realpath "$0" )")")") - -IMAGE_NAME="apm-agent-python-testing" -REGISTRY="elasticobservability" - -while (( "$#" )); do - case "$1" in - -n|--name) - IMAGE_NAME=$2 - shift 2 - ;; - -r|--registry) - REGISTRY=$2 - shift 2 - ;; - -a|--action) - ACTION=$2 - shift 2 - ;; - --) # end argument parsing - shift - break - ;; - -*|--*=) # unsupported flags - echo "Error: Unsupported flag $1" >&2 - exit 1 - ;; - *) # preserve positional arguments - shift - ;; - esac -done - -versions=$(yq '.VERSION[]' "${project_root}/.ci/.matrix_python_full.yml") - -for version in $versions; do - - full_image_name="${REGISTRY}/${IMAGE_NAME}:${version}" - - case $ACTION in - build) - DOCKER_BUILDKIT=1 docker build \ - --cache-from="${full_image_name}" \ - -f "${project_root}/tests/Dockerfile" \ - --build-arg PYTHON_IMAGE="${version/-/:}" \ - -t "${full_image_name}" \ - "${project_root}/tests" - ;; - push) - docker push "${full_image_name}" - ;; - esac -done diff --git a/.ci/publish-aws.sh b/.ci/publish-aws.sh deleted file mode 100755 index aac092bad..000000000 --- a/.ci/publish-aws.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# -# Publishes the created artifacts from ./dev-utils/make-distribution.sh to AWS as AWS Lambda Layers in every region. -# Finalized by generating an ARN table which will be used in the release notes. -# -# AWS_FOLDER is used for temporary output of publishing layers used to create the arn table. (Optional) -# ELASTIC_LAYER_NAME is the name of the lambda layer e.g. elastic-apm-python-ver-3-44-1 for the git tag v3.44.1 (Required) - - -# This needs to be set in GH actions -# https://dotjoeblog.wordpress.com/2021/03/14/github-actions-aws-error-exit-code-255/ -# eu-west-1 is just a random region -export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-eu-west-1} - -export AWS_FOLDER=${AWS_FOLDER:-.aws} -FULL_LAYER_NAME=${ELASTIC_LAYER_NAME:?layer name not provided} -ALL_AWS_REGIONS=$(aws ec2 describe-regions --output json --no-cli-pager | jq -r '.Regions[].RegionName') - -rm -rf "${AWS_FOLDER}" -mkdir -p "${AWS_FOLDER}" - -# Delete previous layers -for region in $ALL_AWS_REGIONS; do - layer_versions=$(aws lambda list-layer-versions --region="${region}" --layer-name="${ELASTIC_LAYER_NAME}" | jq '.LayerVersions[].Version') - echo "Found layer versions for ${FULL_LAYER_NAME} in ${region}: ${layer_versions:-none}" - for version_number in $layer_versions; do - echo "- Deleting ${FULL_LAYER_NAME}:${version_number} in ${region}" - aws lambda delete-layer-version \ - --region="${region}" \ - --layer-name="${FULL_LAYER_NAME}" \ - --version-number="${version_number}" - done -done - - -zip_file="./build/dist/elastic-apm-python-lambda-layer.zip" - -for region in $ALL_AWS_REGIONS; do - echo "Publish ${FULL_LAYER_NAME} in ${region}" - publish_output=$(aws lambda \ - --output json \ - publish-layer-version \ - --region="${region}" \ - --layer-name="${FULL_LAYER_NAME}" \ - --description="AWS Lambda Extension Layer for the Elastic APM Python Agent" \ - --license-info="BSD-3-Clause" \ - --compatible-runtimes python3.6 python3.7 python3.8 python3.9 python3.10 python3.11\ - --zip-file="fileb://${zip_file}") - echo "${publish_output}" > "${AWS_FOLDER}/${region}" - layer_version=$(echo "${publish_output}" | jq '.Version') - echo "Grant public layer access ${FULL_LAYER_NAME}:${layer_version} in ${region}" - grant_access_output=$(aws lambda \ - --output json \ - add-layer-version-permission \ - --region="${region}" \ - --layer-name="${FULL_LAYER_NAME}" \ - --action="lambda:GetLayerVersion" \ - --principal='*' \ - --statement-id="${FULL_LAYER_NAME}" \ - --version-number="${layer_version}") - echo "${grant_access_output}" > "${AWS_FOLDER}/.${region}-public" -done - -sh -c "./.ci/create-arn-table.sh" diff --git a/.ci/snapshoty.yml b/.ci/snapshoty.yml deleted file mode 100644 index ccebc3426..000000000 --- a/.ci/snapshoty.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- - -# Version of configuration to use -version: '1.0' - -# You can define a Google Cloud Account to use -account: - # Project id of the service account - project: '${GCS_PROJECT}' - # Private key id of the service account - private_key_id: '${GCS_PRIVATE_KEY_ID}' - # Private key of the service account - private_key: '${GCS_PRIVATE_KEY}' - # Email of the service account - client_email: '${GCS_CLIENT_EMAIL}' - # URI token - token_uri: 'https://oauth2.googleapis.com/token' - -# List of artifacts -artifacts: - # Path to use for artifacts discovery - - path: './dist' - # Files pattern to match - files_pattern: 'elastic_apm-(?P\d+\.\d+\.\d+)-(.*)\.whl' - # File layout on GCS bucket - output_pattern: '{project}/{github_branch_name}/elastic-apm-python-{app_version}-{github_sha_short}.whl' - # List of metadata processors to use. - metadata: - # Define static custom metadata - - name: 'custom' - data: - project: 'apm-agent-python' - # Add git metadata - - name: 'git' - # Add github_actions metadata - - name: 'github_actions' diff --git a/.ci/updatecli/updatecli.d/update-gherkin-specs.yml b/.ci/updatecli/updatecli.d/update-gherkin-specs.yml deleted file mode 100644 index f12ece861..000000000 --- a/.ci/updatecli/updatecli.d/update-gherkin-specs.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: update-gherkin-specs -pipelineid: update-gherkin-specs - -scms: - default: - kind: github - spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' - owner: "{{ .github.owner }}" - repository: "{{ .github.repository }}" - token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' - branch: "{{ .github.branch }}" - apm: - kind: github - spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' - owner: "{{ .github.owner }}" - repository: "{{ .github.apm_repository }}" - token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' - branch: "{{ .github.branch }}" - -sources: - sha: - kind: file - spec: - file: 'https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ .github.branch }}.patch' - matchpattern: "^From\\s([0-9a-f]{40})\\s" - transformers: - - findsubmatch: - pattern: "[0-9a-f]{40}" - pull_request: - kind: shell - dependson: - - sha - spec: - command: gh api /repos/{{ .github.owner }}/{{ .github.apm_repository }}/commits/{{ source "sha" }}/pulls --jq '.[].html_url' - environments: - - name: GITHUB_TOKEN - - name: PATH - agents-gherkin-specs-tarball: - kind: shell - scmid: apm - dependson: - - sha - spec: - command: tar cvzf {{ requiredEnv "GITHUB_WORKSPACE" }}/gherkin-specs.tgz . - environments: - - name: PATH - workdir: "{{ .specs.apm_gherkin_path }}" - -actions: - pr: - kind: "github/pullrequest" - scmid: default - spec: - automerge: false - draft: false - labels: - - "automation" - description: |- - ### What - APM agent Gherkin specs automatic sync - - ### Why - *Changeset* - * {{ source "pull_request" }} - * https://github.com/elastic/apm/commit/{{ source "sha" }} - title: '[Automation] Update Gherkin specs' - -targets: - agent-gherkin-specs: - name: APM agent gherkin specs {{ source "sha" }} - scmid: default - disablesourceinput: true - kind: shell - spec: - # git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied. - # See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target - command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/gherkin-specs.tgz && git --no-pager diff' - workdir: "{{ .apm_agent.gherkin_specs_path }}" diff --git a/.ci/updatecli/updatecli.d/update-json-specs.yml b/.ci/updatecli/updatecli.d/update-json-specs.yml deleted file mode 100644 index e05aaecdb..000000000 --- a/.ci/updatecli/updatecli.d/update-json-specs.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: update-json-specs -pipelineid: update-json-specs - -scms: - default: - kind: github - spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' - owner: "{{ .github.owner }}" - repository: "{{ .github.repository }}" - token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' - branch: "{{ .github.branch }}" - apm: - kind: github - spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' - owner: "{{ .github.owner }}" - repository: "{{ .github.apm_repository }}" - token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' - branch: "{{ .github.branch }}" - -sources: - sha: - kind: file - spec: - file: 'https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ .github.branch }}.patch' - matchpattern: "^From\\s([0-9a-f]{40})\\s" - transformers: - - findsubmatch: - pattern: "[0-9a-f]{40}" - pull_request: - kind: shell - dependson: - - sha - spec: - command: gh api /repos/{{ .github.owner }}/{{ .github.apm_repository }}/commits/{{ source "sha" }}/pulls --jq '.[].html_url' - environments: - - name: GITHUB_TOKEN - - name: PATH - agents-json-specs-tarball: - kind: shell - scmid: apm - dependson: - - sha - spec: - command: tar cvzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-specs.tgz . - environments: - - name: PATH - workdir: "{{ .specs.apm_json_path }}" - -actions: - pr: - kind: "github/pullrequest" - scmid: default - spec: - automerge: false - draft: false - labels: - - "automation" - description: |- - ### What - APM agent specs automatic sync - - ### Why - *Changeset* - * {{ source "pull_request" }} - * https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ source "sha" }} - title: '[Automation] Update JSON specs' - -targets: - agent-json-specs: - name: APM agent json specs {{ source "sha" }} - scmid: default - disablesourceinput: true - kind: shell - spec: - # git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied. - # See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target - command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-specs.tgz && git --no-pager diff' - workdir: "{{ .apm_agent.json_specs_path }}" diff --git a/.ci/updatecli/updatecli.d/update-specs.yml b/.ci/updatecli/updatecli.d/update-specs.yml deleted file mode 100644 index 554140da2..000000000 --- a/.ci/updatecli/updatecli.d/update-specs.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: update-specs -pipelineid: update-schema-specs - -scms: - default: - kind: github - spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' - owner: "{{ .github.owner }}" - repository: "{{ .github.repository }}" - token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' - branch: "{{ .github.branch }}" - - apm-data: - kind: github - spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' - owner: "{{ .github.owner }}" - repository: "{{ .github.apm_data_repository }}" - token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' - branch: "{{ .github.branch }}" - -sources: - sha: - kind: file - spec: - file: 'https://github.com/{{ .github.owner }}/{{ .github.apm_data_repository }}/commit/{{ .github.branch }}.patch' - matchpattern: "^From\\s([0-9a-f]{40})\\s" - transformers: - - findsubmatch: - pattern: "[0-9a-f]{40}" - pull_request: - kind: shell - dependson: - - sha - spec: - command: gh api /repos/{{ .github.owner }}/{{ .github.apm_data_repository }}/commits/{{ source "sha" }}/pulls --jq '.[].html_url' - environments: - - name: GITHUB_TOKEN - - name: PATH - agent-specs-tarball: - kind: shell - scmid: apm-data - dependson: - - sha - spec: - command: tar cvzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-schema.tgz . - environments: - - name: PATH - workdir: "{{ .specs.apm_data_path }}" - -actions: - pr: - kind: "github/pullrequest" - scmid: default - sourceid: sha - spec: - automerge: false - draft: false - labels: - - "automation" - description: |- - ### What - APM agent json server schema automatic sync - - ### Why - *Changeset* - * {{ source "pull_request" }} - * https://github.com/{{ .github.owner }}/{{ .github.apm_data_repository }}/commit/{{ source "sha" }} - title: '[Automation] Update JSON server schema specs' - -targets: - agent-json-schema: - name: APM agent json server schema {{ source "sha" }} - scmid: default - disablesourceinput: true - kind: shell - spec: - # git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied. - # See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target - command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-schema.tgz && git --no-pager diff' - workdir: "{{ .apm_agent.server_schema_specs_path }}" diff --git a/.ci/updatecli/values.yml b/.ci/updatecli/values.yml deleted file mode 100644 index b0b58d73e..000000000 --- a/.ci/updatecli/values.yml +++ /dev/null @@ -1,14 +0,0 @@ -github: - owner: "elastic" - repository: "apm-agent-python" - apm_repository: "apm" - apm_data_repository: "apm-data" - branch: "main" -specs: - apm_data_path: "input/elasticapm/docs/spec/v2" - apm_json_path: "tests/agents/json-specs" - apm_gherkin_path: "tests/agents/gherkin-specs" -apm_agent: - gherkin_specs_path: "tests/bdd/features" - json_specs_path: "tests/upstream/json-specs" - server_schema_specs_path: "tests/upstream/json-specs" \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md deleted file mode 100644 index cfde8bd48..000000000 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug**: ... - -**To Reproduce** - -1. ... -2. ... -3. ... -4. ... - -**Environment (please complete the following information)** -- OS: [e.g. Linux] -- Python version: -- Framework and version [e.g. Django 2.1]: -- APM Server version: -- Agent version: - - -**Additional context** - -Add any other context about the problem here. - -- Agent config options -
- Click to expand - - ``` - replace this line with your agent config options - remember to mask any sensitive fields like tokens - ``` -
-- `requirements.txt`: -
- Click to expand - - ``` - replace this line with your `requirements.txt` - ``` -
diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md deleted file mode 100644 index 066b2d920..000000000 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 318f60abc..000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -## What does this pull request do? - - - -## Related issues - -Closes #ISSUE diff --git a/.github/community-label.yml b/.github/community-label.yml deleted file mode 100644 index 8872df2d5..000000000 --- a/.github/community-label.yml +++ /dev/null @@ -1,5 +0,0 @@ -# add 'community' label to all new issues and PRs created by the community -community: - - '.*' -triage: - - '.*' \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index eb1cff95b..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -version: 2 -updates: - # Enable version updates for python - - package-ecosystem: "pip" - # Look for `requirements.txt` file in the `dev-utils` directory - directory: "/dev-utils/" - # Check for updates once a week - schedule: - interval: "weekly" - day: "sunday" - time: "22:00" - reviewers: - - "elastic/apm-agent-python" - ignore: - - dependency-name: "urllib3" # ignore until lambda runtimes use OpenSSL 1.1.1+ - versions: [">=2.0.0"] - - # GitHub actions - - package-ecosystem: "github-actions" - directory: "/" - reviewers: - - "elastic/observablt-ci" - schedule: - interval: "weekly" - day: "sunday" - time: "22:00" - groups: - github-actions: - patterns: - - "*" diff --git a/.github/labeler-config.yml b/.github/labeler-config.yml deleted file mode 100644 index a1e4dbc29..000000000 --- a/.github/labeler-config.yml +++ /dev/null @@ -1,3 +0,0 @@ -# add 'agent-python' label to all new issues -agent-python: - - '.*' diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index c224d62b8..000000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,55 +0,0 @@ -## CI/CD - -There are 5 main stages that run on GitHub actions: - -* Linting -* Test -* Packaging -* Benchmarking -* Release - -The whole process should look like: - -`Checkout` -> `Linting` -> `Test` -> `Packaging` -> `Benchmark` -> `Release` - -### Scenarios - -* Full matrix compatibility should be triggered on a daily basis or manually. -* Subset matrix compatibility runs on branches, tags and PRs basis. -* Automated release in the CI gets triggered when a tag release is created. -* Pull Requests that are only affecting the docs files should not trigger any test or similar stages that are not required. -* Builds do not get triggered automatically for Pull Requests from contributors that are not Elasticians when need to access to any GitHub Secrets. - -### Compatibility matrix - -Python agent supports compatibility to different python versions and frameworks, those are defined in: - -* [frameworks](https://github.com/elastic/apm-agent-python/blob/main/.ci/.matrix_framework.yml) for all the PRs. -* [frameworks](https://github.com/elastic/apm-agent-python/blob/main/.ci/.matrix_framework_full.yml) for the `daily` builds. -* Python [versions](https://github.com/elastic/apm-agent-python/blob/main/.ci/.matrix_python_full.yml) for all the `daily` builds. -* Python [versions](https://github.com/elastic/apm-agent-python/blob/main/.ci/.matrix_python.yml) for all the `*nix` builds. -* Python [versions](https://github.com/elastic/apm-agent-python/blob/1e38ec53115edc70c36c6485259733a8cde02ed9/.github/workflows/test.yml#L88-L101) for all the `windows` builds. -* [Exclude list](https://github.com/elastic/apm-agent-python/blob/main/.ci/.matrix_exclude.yml) for the above entries. - -### How to interact with the CI? - -#### On a PR basis - -Once a PR has been opened then there are two different ways you can trigger builds in the CI: - -1. Commit based -1. UI based, any Elasticians can force a build through the GitHub UI -1. PR review comment-based, any Elastic employees can force a full matrix test run through a PR review comment with the following syntax: `/test matrix`. - -#### Branches - -Every time there is a merge to main or any release branches the whole workflow will compile and test every entry in the compatibility matrix for Linux and Windows. - -### Release process - -This process has been fully automated and it gets triggered when a tag release has been created. -The tag release follows the naming convention: `v...`, where ``, `` and `` are numbers as defined [here](https://github.com/elastic/apm-agent-python/blob/1e38ec53115edc70c36c6485259733a8cde02ed9/.github/workflows/release.yml#L5-L6C1) - -### OpenTelemetry - -There is a GitHub workflow in charge to populate what the workflow run in terms of jobs and steps. Those details can be seen in [here](https://ela.st/oblt-ci-cd-stats) (**NOTE**: only available for Elasticians). diff --git a/.github/workflows/addToProject.yml b/.github/workflows/addToProject.yml deleted file mode 100644 index 0a3b76924..000000000 --- a/.github/workflows/addToProject.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Auto Assign to Project(s) - -on: - issues: - types: [opened, edited, milestoned] -env: - MY_GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }} - -jobs: - assign_one_project: - runs-on: ubuntu-latest - name: Assign milestoned to Project - steps: - - name: Assign issues with milestones to project - uses: elastic/assign-one-project-github-action@1.2.2 - if: github.event.issue && github.event.issue.milestone - with: - project: 'https://github.com/orgs/elastic/projects/454' - project_id: '5882982' - column_name: 'Planned' diff --git a/.github/workflows/build-distribution.yml b/.github/workflows/build-distribution.yml deleted file mode 100644 index 8b728c3bf..000000000 --- a/.github/workflows/build-distribution.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: build-distribution - -on: - workflow_call: ~ - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Build lambda layer zip - run: ./dev-utils/make-distribution.sh - - uses: actions/upload-artifact@v4 - with: - name: build-distribution - path: ./build/ - if-no-files-found: error diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 377caaa5c..000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: "Issue Labeler" -on: - issues: - types: [opened] - pull_request_target: - types: [opened] -env: - MY_GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }} -jobs: - triage: - runs-on: ubuntu-latest - steps: - - name: Add agent-python label - uses: AlexanderWert/issue-labeler@v2.3 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler-config.yml - enable-versioned-regex: 0 - - name: Check team membership for user - uses: elastic/get-user-teams-membership@1.1.0 - id: checkUserMember - with: - username: ${{ github.actor }} - team: 'apm' - usernamesToExclude: | - apmmachine - dependabot - GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }} - - name: Show team membership - run: | - echo "::debug::isTeamMember: ${{ steps.checkUserMember.outputs.isTeamMember }}" - echo "::debug::isExcluded: ${{ steps.checkUserMember.outputs.isExcluded }}" - - name: Add community and triage lables - if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true' - uses: AlexanderWert/issue-labeler@v2.3 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/community-label.yml - enable-versioned-regex: 0 - - name: Assign new internal pull requests to project - uses: elastic/assign-one-project-github-action@1.2.2 - if: (steps.checkUserMember.outputs.isTeamMember == 'true' || steps.checkUserMember.outputs.isExcluded == 'true') && github.event.pull_request - with: - project: 'https://github.com/orgs/elastic/projects/454' - project_id: '5882982' - column_name: 'In Progress' diff --git a/.github/workflows/matrix-command.yml b/.github/workflows/matrix-command.yml deleted file mode 100644 index f2c32658f..000000000 --- a/.github/workflows/matrix-command.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: matrix-command - -on: - pull_request_review: - types: - - submitted - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -permissions: - contents: read - -jobs: - command-validation: - if: startsWith(github.event.review.body, '/test matrix') - runs-on: ubuntu-latest - timeout-minutes: 5 - permissions: - pull-requests: write - steps: - - name: Is comment allowed? - uses: actions/github-script@v7 - with: - script: | - const actorPermission = (await github.rest.repos.getCollaboratorPermissionLevel({ - ...context.repo, - username: context.actor - })).data.permission - const isPermitted = ['write', 'admin'].includes(actorPermission) - if (!isPermitted) { - const errorMessage = 'Only users with write permission to the repository can run GitHub commands' - await github.rest.issues.createComment({ - ...context.repo, - issue_number: context.issue.number, - body: errorMessage, - }) - core.setFailed(errorMessage) - return - } - - test: - needs: - - command-validation - uses: ./.github/workflows/test.yml - with: - full-matrix: true - ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/microbenchmark.yml b/.github/workflows/microbenchmark.yml deleted file mode 100644 index 9af88a6b1..000000000 --- a/.github/workflows/microbenchmark.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: microbenchmark - -on: - workflow_dispatch: - push: - branches: - - main - paths-ignore: - - '**.md' - - '**.asciidoc' - -# limit the access of the generated GITHUB_TOKEN -permissions: - contents: read - -jobs: - microbenchmark: - runs-on: ubuntu-latest - # wait up to 1 hour - timeout-minutes: 60 - steps: - - id: buildkite - name: Run buildkite pipeline - uses: elastic/apm-pipeline-library/.github/actions/buildkite@current - with: - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - pipeline: apm-agent-microbenchmark - waitFor: true - printBuildLogs: true - buildEnvVars: | - script=.ci/bench.sh - repo=apm-agent-python - sha=${{ github.sha }} - BRANCH_NAME=${{ github.ref_name }} - - - if: ${{ failure() }} - uses: elastic/apm-pipeline-library/.github/actions/slack-message@current - with: - url: ${{ secrets.VAULT_ADDR }} - roleId: ${{ secrets.VAULT_ROLE_ID }} - secretId: ${{ secrets.VAULT_SECRET_ID }} - channel: "#apm-agent-python" - message: | - :ghost: [${{ github.repository }}] microbenchmark *${{ github.ref_name }}* failed to run in Buildkite. - Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>) diff --git a/.github/workflows/opentelemetry.yml b/.github/workflows/opentelemetry.yml deleted file mode 100644 index 84a6209ff..000000000 --- a/.github/workflows/opentelemetry.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Look up results at https://ela.st/oblt-ci-cd-stats. -# There will be one service per GitHub repository, including the org name, and one Transaction per Workflow. -name: OpenTelemetry Export Trace - -on: - workflow_run: - workflows: [ "*" ] - types: [completed] - -permissions: - contents: read - -jobs: - otel-export-trace: - runs-on: ubuntu-latest - steps: - - uses: elastic/apm-pipeline-library/.github/actions/opentelemetry@current - with: - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml deleted file mode 100644 index af485c455..000000000 --- a/.github/workflows/packages.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: packages - -on: - workflow_call: ~ - pull_request: - paths-ignore: - - '**/*.md' - - '**/*.asciidoc' - push: - branches: - - main - paths-ignore: - - '**/*.md' - - '**/*.asciidoc' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Install wheel - run: pip install --user wheel - - name: Building universal wheel - run: python setup.py bdist_wheel - - name: Building source distribution - run: python setup.py sdist - - name: Upload Packages - uses: actions/upload-artifact@v4 - with: - name: packages - path: | - dist/*.whl - dist/*tar.gz - diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 65947d33b..000000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: pre-commit - -on: - pull_request: - push: - branches: [main] - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 0e297bb95..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,151 +0,0 @@ -name: release - -on: - push: - tags: - - "v*.*.*" - -permissions: - contents: read - -jobs: - test: - uses: ./.github/workflows/test.yml - - packages: - uses: ./.github/workflows/packages.yml - - publish-pypi: - needs: - - test - - packages - runs-on: ubuntu-latest - environment: release - permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - name: packages - path: dist - - name: Upload - uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf - with: - repository-url: https://upload.pypi.org/legacy/ - - build-distribution: - uses: ./.github/workflows/build-distribution.yml - - publish-lambda-layers: - needs: - - build-distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: hashicorp/vault-action@v2.8.0 - with: - url: ${{ secrets.VAULT_ADDR }} - method: approle - roleId: ${{ secrets.VAULT_ROLE_ID }} - secretId: ${{ secrets.VAULT_SECRET_ID }} - secrets: | - secret/observability-team/ci/service-account/apm-agent-python access_key_id | AWS_ACCESS_KEY_ID ; - secret/observability-team/ci/service-account/apm-agent-python secret_access_key | AWS_SECRET_ACCESS_KEY - - uses: actions/download-artifact@v4 - with: - name: build-distribution - path: ./build - - name: Publish lambda layers to AWS - run: | - # Convert v1.2.3 to ver-1-2-3 - VERSION=${GITHUB_REF_NAME/v/ver-} - VERSION=${VERSION//./-} - - ELASTIC_LAYER_NAME="elastic-apm-python-${VERSION}" .ci/publish-aws.sh - - uses: actions/upload-artifact@v4 - with: - name: arn-file - path: ".arn-file.md" - if-no-files-found: error - - publish-docker: - needs: - - build-distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current - with: - registry: docker.elastic.co - secret: secret/observability-team/ci/docker-registry/prod - url: ${{ secrets.VAULT_ADDR }} - roleId: ${{ secrets.VAULT_ROLE_ID }} - secretId: ${{ secrets.VAULT_SECRET_ID }} - - uses: actions/download-artifact@v4 - with: - name: build-distribution - path: ./build - - id: setup-docker - name: Set up docker variables - run: |- - # version without v prefix (e.g. 1.2.3) - echo "tag=${GITHUB_REF_NAME/v/}" >> "${GITHUB_OUTPUT}" - echo "name=docker.elastic.co/observability/apm-agent-python" >> "${GITHUB_OUTPUT}" - - name: Docker build - run: >- - docker build - -t ${{ steps.setup-docker.outputs.name }}:${{ steps.setup-docker.outputs.tag }} - --build-arg AGENT_DIR=./build/dist/package/python - . - - name: Docker retag - run: >- - docker tag - ${{ steps.setup-docker.outputs.name }}:${{ steps.setup-docker.outputs.tag }} - ${{ steps.setup-docker.outputs.name }}:latest - - name: Docker push - run: |- - docker push ${{ steps.setup-docker.outputs.name }}:${{ steps.setup-docker.outputs.tag }} - docker push ${{ steps.setup-docker.outputs.name }}:latest - - github-draft: - permissions: - contents: write - needs: - - publish-lambda-layers - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - name: arn-file - - name: Create GitHub Draft Release - run: >- - gh release create "${GITHUB_REF_NAME}" - --title="${GITHUB_REF_NAME}" - --generate-notes - --notes-file=".arn-file.md" - --draft - env: - GH_TOKEN: ${{ github.token }} - - notify: - runs-on: ubuntu-latest - if: always() - needs: - - publish-lambda-layers - - publish-pypi - - publish-docker - - github-draft - steps: - - id: check - uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current - with: - needs: ${{ toJSON(needs) }} - - uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current - with: - status: ${{ steps.check.outputs.status }} - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - slackChannel: "#apm-agent-python" diff --git a/.github/workflows/run-matrix.yml b/.github/workflows/run-matrix.yml deleted file mode 100644 index 827212527..000000000 --- a/.github/workflows/run-matrix.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: run-matrix - -on: - workflow_call: - inputs: - include: - required: true - description: Matrix include JSON string - type: string - -jobs: - docker: - name: "docker (version: ${{ matrix.version }}, framework: ${{ matrix.framework }})" - runs-on: ubuntu-latest - strategy: - fail-fast: false - max-parallel: 10 - matrix: - include: ${{ fromJSON(inputs.include) }} - steps: - - uses: actions/checkout@v4 - - name: Run tests - run: ./tests/scripts/docker/run_tests.sh ${{ matrix.version }} ${{ matrix.framework }} - env: - LOCALSTACK_VOLUME_DIR: localstack_data - - if: success() || failure() - name: Upload JUnit Test Results - uses: actions/upload-artifact@v3 - with: - name: test-results - path: "**/*-python-agent-junit.xml" - - if: success() || failure() - name: Upload Coverage Reports - uses: actions/upload-artifact@v3 - with: - name: coverage-reports - path: "**/.coverage*" diff --git a/.github/workflows/snapshoty.yml b/.github/workflows/snapshoty.yml deleted file mode 100644 index 49d1b3423..000000000 --- a/.github/workflows/snapshoty.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# Publish a snapshot. A "snapshot" is a packaging of the latest *unreleased* APM agent, -# published to a known GCS bucket for use in edge demo/test environments. -name: snapshoty - -on: - workflow_run: - workflows: - - test - types: - - completed - branches: - - main - -jobs: - packages: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - uses: ./.github/workflows/packages.yml - upload: - needs: - - packages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - name: packages - path: dist - - name: Publish snaphosts - uses: elastic/apm-pipeline-library/.github/actions/snapshoty-simple@current - with: - config: '.ci/snapshoty.yml' - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml deleted file mode 100644 index 86b24cc0c..000000000 --- a/.github/workflows/test-docs.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# This workflow sets the test / all status check to success in case it's a docs only PR and test.yml is not triggered -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks -name: test # The name must be the same as in test.yml - -on: - pull_request: - paths-ignore: # This expression needs to match the paths ignored on test.yml. - - '**' - - '!**/*.md' - - '!**/*.asciidoc' - -permissions: - contents: read - -jobs: - all: - runs-on: ubuntu-latest - steps: - - run: 'echo "No build required"' - # As long as this workflow uses the same name than .github/workflows/test.yml and - # the test-reporter requires artifacts with the test results to exist. - # let's produce a dummy test so the test-report don't fail in this particular - # case - - name: Generate junit placeholder - to integrate with test-reporter - run: |- - cat > docs-python-agent-junit.xml << ENDOFFILE - - - - - - - - - ENDOFFILE - - if: success() || failure() - name: Upload JUnit Test Results - uses: actions/upload-artifact@v3 - with: - name: test-results - path: "docs-python-agent-junit.xml" diff --git a/.github/workflows/test-reporter.yml b/.github/workflows/test-reporter.yml deleted file mode 100644 index 4b0b7620d..000000000 --- a/.github/workflows/test-reporter.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -## Workflow to process the JUnit test results and add a report to the checks. -name: test-reporter -on: - workflow_run: - workflows: - - test - types: - - completed - -jobs: - report: - runs-on: ubuntu-latest - steps: - - uses: elastic/apm-pipeline-library/.github/actions/test-report@current - with: - artifact: test-results - name: JUnit Tests - path: "**/*-python-agent-junit.xml" - reporter: java-junit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 4638ab5d3..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,217 +0,0 @@ -name: test # The name must be the same as in test-docs.yml - -on: - workflow_call: - inputs: - full-matrix: - description: "Run the full matrix" - required: true - type: boolean - ref: - description: "The git ref of elastic/apm-agent-python to run test workflow from." - required: false - type: string - pull_request: - paths-ignore: - - "**/*.md" - - "**/*.asciidoc" - push: - branches: - - main - paths-ignore: - - "**/*.md" - - "**/*.asciidoc" - schedule: - - cron: "0 2 * * *" - workflow_dispatch: - inputs: - full-matrix: - description: "Run the full matrix" - required: true - type: boolean - -jobs: - build-distribution: - uses: ./.github/workflows/build-distribution.yml - - create-matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.generate.outputs.matrix }} - data: ${{ steps.split.outputs.data }} - chunks: ${{ steps.split.outputs.chunks }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref || github.ref }} - - id: generate - uses: elastic/apm-pipeline-library/.github/actions/version-framework@current - with: - # Use .ci/.matrix_python_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_python.yml - versionsFile: .ci/.matrix_python${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml - # Use .ci/.matrix_framework_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_framework.yml - frameworksFile: .ci/.matrix_framework${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml - excludedFile: .ci/.matrix_exclude.yml - - name: Split matrix - shell: python - id: split - run: | - import os - import json - - def split(lst, n): - return [lst[i::n] for i in range(n)] - - matrix = json.loads(os.environ['GENERATED_MATRIX']) - - # Using the number 4 because the full matrix has roughly 400+ items - # Hence, it is split into chunks of size ~100 - # We are doing this because the matrix in GH actions has a max limit of 256 - chunks = split(matrix['include'], 4) - chunks_json = json.dumps(chunks) - - with open(os.environ['GITHUB_OUTPUT'], 'a') as f: - print(f'chunks={chunks_json}', file=f) - - env: - GENERATED_MATRIX: ${{ steps.generate.outputs.matrix }} - - chunks-0: - needs: create-matrix - uses: ./.github/workflows/run-matrix.yml - with: - include: ${{ toJSON(fromJSON(needs.create-matrix.outputs.chunks)[0]) }} - - chunks-1: - needs: create-matrix - uses: ./.github/workflows/run-matrix.yml - with: - include: ${{ toJSON(fromJSON(needs.create-matrix.outputs.chunks)[1]) }} - - chunks-2: - needs: create-matrix - uses: ./.github/workflows/run-matrix.yml - with: - include: ${{ toJSON(fromJSON(needs.create-matrix.outputs.chunks)[2]) }} - - chunks-3: - needs: create-matrix - uses: ./.github/workflows/run-matrix.yml - with: - include: ${{ toJSON(fromJSON(needs.create-matrix.outputs.chunks)[3]) }} - - windows: - name: "windows (version: ${{ matrix.version }}, framework: ${{ matrix.framework }}, asyncio: ${{ matrix.asyncio }})" - runs-on: windows-2019 - strategy: - fail-fast: false - matrix: - include: - # - version: "3.6" - # framework: "none" - # asyncio: "true" - # - version: "3.7" - # framework: none - # asyncio: true - - version: "3.8" - framework: none - asyncio: true - - version: "3.9" # waiting for greenlet to have binary wheels for 3.9 - framework: none - asyncio: true - env: - VERSION: ${{ matrix.version }} - FRAMEWORK: ${{ matrix.framework }} - ASYNCIO: ${{ matrix.asyncio }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref || github.ref }} - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.version }} - cache: pip - cache-dependency-path: "tests/requirements/reqs-${{ matrix.framework }}.txt" - - name: Install tools - run: .\scripts\install-tools.bat - - name: Run tests - run: .\scripts\run-tests.bat - - if: success() || failure() - name: Upload JUnit Test Results - uses: actions/upload-artifact@v3 - with: - name: test-results - path: "**/*-python-agent-junit.xml" - - if: success() || failure() - name: Upload Coverage Reports - uses: actions/upload-artifact@v3 - with: - name: coverage-reports - path: "**/.coverage*" - # This job is here to have a single status check that can be set as required. - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds - # If a run contains a series of jobs that need each other, a failure applies to all jobs in the dependency chain from the point of failure onwards. - all: - if: always() - runs-on: ubuntu-latest - needs: - - chunks-0 - - chunks-1 - - chunks-2 - - chunks-3 - - windows - steps: - - id: check - uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current - with: - needs: ${{ toJSON(needs) }} - - run: ${{ steps.check.outputs.isSuccess }} - - if: failure() && (github.event_name == 'schedule' || github.event_name == 'push') - uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current - with: - status: ${{ steps.check.outputs.status }} - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - slackChannel: "#apm-agent-python" - - coverage: - name: Combine & check coverage. - needs: all - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref || github.ref }} - - - uses: actions/setup-python@v5 - with: - # Use latest Python, so it understands all syntax. - python-version: 3.11 - - - run: python -Im pip install --upgrade coverage[toml] - - - uses: actions/download-artifact@v3 - with: - name: coverage-reports - - - name: Combine coverage & fail if it's <84%. - run: | - python -Im coverage combine - python -Im coverage html --skip-covered --skip-empty - - # Report and write to summary. - python -Im coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY - - # Report again and fail if under 84%. - python -Im coverage report --fail-under=84 - - - name: Upload HTML report - uses: actions/upload-artifact@v4 - with: - name: html-coverage-report - path: htmlcov - - uses: geekyeggo/delete-artifact@65041433121f7239077fa20be14c0690f70569de - with: - name: coverage-reports diff --git a/.github/workflows/updatecli.yml b/.github/workflows/updatecli.yml deleted file mode 100644 index 4fc00bd71..000000000 --- a/.github/workflows/updatecli.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: updatecli - -on: - workflow_dispatch: ~ - schedule: - - cron: '0 6 * * *' - -permissions: - contents: read - -jobs: - bump: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: elastic/apm-pipeline-library/.github/actions/updatecli@current - with: - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - pipeline: .ci/updatecli/updatecli.d - values: .ci/updatecli/values.yml - - if: failure() - uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current - with: - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - slackChannel: "#apm-agent-python"