Skip to content
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

Merge main into develop-graphql-async #892

Merged
merged 109 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
9a56f3a
Update Versioning Scheme (#651)
TimPansino Oct 10, 2022
65246e7
Fix Trace Finalizer Crashes (#652)
TimPansino Oct 10, 2022
b9bca3d
Add usage tracking metrics for Kafka clients. (#658)
umaannamalai Oct 17, 2022
968f3dc
Deprecate add_custom_parameter(s) API (#655)
lrafeei Oct 17, 2022
922db2f
Add usage metrics for Daphne and Hypercorn. (#665)
umaannamalai Oct 20, 2022
c96ffc5
Fix Flask view support in Code Level Metrics (#664)
TimPansino Oct 24, 2022
820e0b7
Fix aioredis version crash (#661)
TimPansino Oct 24, 2022
03131c9
Add double wrapped testing for Hypercorn and Daphne and dispatcher ar…
umaannamalai Oct 24, 2022
1e6c937
Add Python 3.11 Support (#654)
TimPansino Oct 24, 2022
ca420b3
Remove devcontainer submodule (#669)
TimPansino Oct 24, 2022
a66a33a
Uncomment NewRelicContextFormatter from agent.py (#676)
lrafeei Oct 26, 2022
7b82cb9
Fix botocore tests for botocore v1.28.1+ (#675)
lrafeei Oct 26, 2022
caa9485
Feature increased custom event limit (#674)
hmstepanek Oct 26, 2022
1d4e3e5
Add python 3.11 stable release to GHA (#671)
TimPansino Oct 26, 2022
1279bdf
Double kafka test runners (#677)
TimPansino Oct 27, 2022
d28f0d4
Fix failing flask_rest tests (#683)
hmstepanek Nov 5, 2022
cd7e150
Fix failing botocore tests (#684)
hmstepanek Nov 7, 2022
d4ff1ec
Add record_log_event to public api (#681)
hmstepanek Nov 7, 2022
062e702
Add patch for sentry SDK to correct ASGI v2/v3 detection. (#680)
umaannamalai Nov 10, 2022
f014708
Update pip install command (#688)
TimPansino Nov 10, 2022
52e1011
Validator transfer from fixtures.py to validators directory, Part 1 (…
lrafeei Nov 11, 2022
1bb2be4
Initialize ExternalNode properties (#687)
Nov 14, 2022
7ae0c94
Fix package_version_utils.py logic (#689)
lrafeei Nov 16, 2022
eb28b52
Pin Github Actions Runner to Ubuntu 20 for Py27 (#698)
TimPansino Nov 23, 2022
eead7a7
Fix Confluent Kafka Producer Arguments (#699)
TimPansino Nov 24, 2022
60a5d68
Fix tornado master tests & instrument redis 4.3.5 (#695)
hmstepanek Nov 28, 2022
67feaa7
Remove pylint codes from flake8 config (#701)
hmstepanek Nov 28, 2022
87b649f
Validator transfer from fixtures.py to validators directory, Part 2 (…
lrafeei Nov 30, 2022
864f086
Fix bug in celery where works don't report data (#696)
hmstepanek Nov 30, 2022
b849010
Reverts removal of flask_restful hooks. (#705)
TimPansino Dec 1, 2022
a63e33f
Update instrumented methods in redis. (#707)
TimPansino Dec 6, 2022
f977ba6
Add TraceCache Guarded Iteration (#704)
TimPansino Dec 7, 2022
fd0fd01
Fix Type Constructor Classes in Code Level Metrics (#708)
TimPansino Dec 7, 2022
9cbae01
Fix sanic and starlette tests (#734)
lrafeei Jan 3, 2023
d7987b9
Add methods to instrument (#738)
lrafeei Jan 9, 2023
045b8f8
Add card to instrumented methods in Redis (#740)
lrafeei Jan 11, 2023
05d8569
Add DevContainer (#711)
TimPansino Jan 18, 2023
b45bdd8
Module classmethod fix (#662)
lrafeei Jan 18, 2023
0db5fee
Fix log decorating to be JSON compatible (#736)
lrafeei Jan 20, 2023
01ceca7
Revert "Fix log decorating to be JSON compatible" (#746)
hmstepanek Jan 26, 2023
1d8d078
Add apdexPerfZone attribute to Transaction. (#753)
kanderson250 Jan 27, 2023
5844bb1
Fix tests in starlette v0.23.1 (#752)
lrafeei Jan 31, 2023
a765809
Support `redis.asyncio` (#744)
pauk-slon Jan 26, 2023
daf57b6
Redis Asyncio Testing (#750)
TimPansino Jan 31, 2023
0608ca4
CodeCov Integration (#710)
TimPansino Feb 9, 2023
b0d4e73
Mergify (#761)
TimPansino Feb 9, 2023
1bf6a65
Elasticsearch v8 support (#741)
lrafeei Feb 9, 2023
061ad59
Update contributors workspace link in CONTRIBUTING.rst. (#760)
umaannamalai Feb 9, 2023
300de2a
Add Retry to Pip Install (#763)
TimPansino Feb 9, 2023
3410270
Add aiohttp support for expected status codes (#735)
justin-richert Feb 10, 2023
6c06f9b
Fix PyPy Priority Sampling Test (#766)
TimPansino Feb 10, 2023
aae9563
Config linter fixes (#768)
lrafeei Feb 15, 2023
a75c076
Sync tests w/ agents/cross_agent_tests/pull/150 (#770)
hmstepanek Feb 15, 2023
59abb6a
Infinite Tracing Batching & Compression (#762)
TimPansino Feb 16, 2023
b54a7e9
Fix DT settings for txn feature tests (#771)
TimPansino Feb 16, 2023
86994c0
Fix pyramid testing versions (#764)
TimPansino Feb 16, 2023
b975754
Fix Ariadne Middleware Testing (#776)
TimPansino Mar 8, 2023
16a0b87
Exclude merged PRs from automatic mergify actions. (#774)
TimPansino Mar 8, 2023
572b24b
Refactor Code Coverage (#765)
TimPansino Mar 15, 2023
df9701c
Add GraphQL Introspection Setting (#783)
TimPansino Mar 20, 2023
fbb851e
Fix instance info tests for redis. (#784)
umaannamalai Mar 20, 2023
912d088
Fix Redis Instance Info (#790)
TimPansino Mar 30, 2023
637879a
Guard GraphQL Settings Lookup (#787)
TimPansino Mar 30, 2023
107c0a6
Errors Inbox Improvements (#791)
TimPansino Mar 30, 2023
11c1cda
Update Packages (#793)
TimPansino Apr 5, 2023
4d644c6
Remove Unused Instrumentation and Tests (#794)
TimPansino Apr 5, 2023
153690f
Fix Loguru Instrumentation for v0.7.0 (#798)
TimPansino Apr 12, 2023
caef2cc
Remove Twisted framework (#800)
lrafeei Apr 25, 2023
363122a
Pin virtualenv, fix pip arg deprecation & disable kafka tests (#803)
hmstepanek May 1, 2023
7103506
Add tests for pyodbc (#796)
hmstepanek May 1, 2023
be4fb3d
Add tests for Waitress (#797)
lrafeei May 1, 2023
fd0fa35
Add testing for genshi and mako. (#799)
umaannamalai May 2, 2023
3d82845
Omit some frameworks from coverage analysis (#810)
lrafeei May 3, 2023
a963649
Run coverage around pytest (#813)
hmstepanek May 9, 2023
c2d4629
Add required option for tox v4 (#795)
TimPansino May 10, 2023
f192c24
Fix Testing Failures (#828)
TimPansino Jun 12, 2023
3def8b0
Fix pytest test filtering when running tox (#823)
hmstepanek Jun 12, 2023
90ccb4c
Validator transfer p3 (#745)
lrafeei Jun 14, 2023
668b0a9
Fix set output warning using new GHA syntax (#833)
TimPansino Jun 21, 2023
abb6405
Remove Python 2.7 and pypy2 testing (#835)
lrafeei Jun 21, 2023
ab92daf
Containerized CI Pipeline (#836)
TimPansino Jun 22, 2023
4422b95
Fix CI Image Tagging (#838)
TimPansino Jun 22, 2023
4da4612
Temporarily Restore Old CI Pipeline (#841)
TimPansino Jun 22, 2023
658f818
Rework CI Pipeline (#839)
TimPansino Jun 22, 2023
57720fd
Fix Tests on New CI (#843)
TimPansino Jun 23, 2023
a7dfe33
Instrument Redis waitaof (#851)
TimPansino Jun 26, 2023
33aa111
Ignore patched hooks files. (#849)
umaannamalai Jun 26, 2023
e707cc0
Fix local scoped package reporting (#837)
hmstepanek Jun 26, 2023
ab590a2
MSSQL Testing (#852)
TimPansino Jun 27, 2023
db07523
Exclude command line functionality from test coverage (#855)
lrafeei Jun 27, 2023
c2fd5e3
FIX: resilient environment settings (#825)
aaeabdo Jun 27, 2023
9883c2b
Replace drop_transaction logic by using transaction context manager (…
lrafeei Jun 28, 2023
998b035
Upgrade to Pypy38 for TypedDict (#861)
lrafeei Jun 30, 2023
66c2e19
Add profile_trace testing (#858)
umaannamalai Jun 30, 2023
e663c36
Add Transaction API Tests (#857)
lrafeei Jun 30, 2023
3bdb013
Add tests for jinja2. (#842)
umaannamalai Jun 30, 2023
6644846
Add tests for newrelic/config.py (#860)
hmstepanek Jun 30, 2023
ee92363
Fix starlette testing matrix for updated behavior. (#869)
TimPansino Jul 14, 2023
53fc51a
Correct Serverless Distributed Tracing Logic (#870)
TimPansino Jul 14, 2023
2f580af
Fix Kafka CI (#863)
TimPansino Jul 14, 2023
a7080e9
Change image tag to latest (#871)
hmstepanek Jul 17, 2023
56ea815
Add full version for pypy3.8 to tox (#872)
lrafeei Jul 18, 2023
a248688
Instrument RedisCluster (#809)
hmstepanek Jul 27, 2023
08eec5e
Ignore Django instrumentation from older versions (#859)
lrafeei Jul 28, 2023
4b3768b
Modify postgresql tests to include WITH query (#885)
lrafeei Aug 2, 2023
17f8937
Develop redis addons (#888)
lrafeei Aug 10, 2023
e023030
Merge branch 'main' into develop-graphql-async
TimPansino Aug 10, 2023
051d44b
Fix drift
TimPansino Aug 10, 2023
fdd15ec
Fix ariadne middleware tests for all versions.
umaannamalai Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG IMAGE=ghcr.io/newrelic-experimental/pyenv-devcontainer:latest

# To target other architectures, change the --platform directive in the Dockerfile.
FROM --platform=linux/amd64 ${IMAGE}
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// For format details, see https://containers.dev/implementors/json_reference/.
{
"name": "pyenv",
"build":{
// To target other architectures, change the --platform directive in the Dockerfile.
"dockerfile": "Dockerfile",
"args": {
"IMAGE": "ghcr.io/newrelic-experimental/pyenv-devcontainer:latest"
}
},
"remoteUser": "vscode",
"runArgs": ["--network=host"],
"features": {
// Available Features: https://containers.dev/features
// "ghcr.io/devcontainers/features/docker-from-docker:1": {"moby": false},
// "ghcr.io/devcontainers/features/aws-cli:1": {},
// "ghcr.io/devcontainers/features/github-cli:1": {}
},
"containerEnv": {
"NEW_RELIC_HOST": "${localEnv:NEW_RELIC_HOST}",
"NEW_RELIC_LICENSE_KEY": "${localEnv:NEW_RELIC_LICENSE_KEY}",
"NEW_RELIC_INSERT_KEY": "${localEnv:NEW_RELIC_INSERT_KEY}",
"NEW_RELIC_DEVELOPER_MODE": "${localEnv:NEW_RELIC_DEVELOPER_MODE}"
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"ms-python.python",
"ms-vsliveshare.vsliveshare",
"eamodio.gitlens"
]
}
}
}
45 changes: 0 additions & 45 deletions .github/actions/setup-python-matrix/action.yml

This file was deleted.

98 changes: 98 additions & 0 deletions .github/containers/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:20.04

# Install OS packages
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
bash \
build-essential \
curl \
expat \
freetds-common \
freetds-dev \
gcc \
git \
libbz2-dev \
libcurl4-openssl-dev \
libffi-dev \
libgmp-dev \
libkrb5-dev \
liblzma-dev \
libmpfr-dev \
libncurses-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
locales \
make \
odbc-postgresql \
openssl \
python2-dev \
python3-dev \
python3-pip \
tzdata \
unixodbc-dev \
unzip \
wget \
zip \
zlib1g \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*

# Build librdkafka from source
ARG LIBRDKAFKA_VERSION=2.1.1
RUN cd /tmp && \
wget https://github.com/confluentinc/librdkafka/archive/refs/tags/v${LIBRDKAFKA_VERSION}.zip -O ./librdkafka.zip && \
unzip ./librdkafka.zip && \
rm ./librdkafka.zip && \
cd ./librdkafka-${LIBRDKAFKA_VERSION} && \
./configure && \
make all install && \
cd /tmp && \
rm -rf ./librdkafka-${LIBRDKAFKA_VERSION}

# Setup ODBC config
RUN sed -i 's|Driver=psqlodbca.so|Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so|g' /etc/odbcinst.ini && \
sed -i 's|Driver=psqlodbcw.so|Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so|g' /etc/odbcinst.ini && \
sed -i 's|Setup=libodbcpsqlS.so|Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so|g' /etc/odbcinst.ini

# Set the locale
RUN locale-gen --no-purge en_US.UTF-8
ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US:en \ LC_ALL=en_US.UTF-8
ENV TZ="Etc/UTC"
RUN ln -fs "/usr/share/zoneinfo/${TZ}" /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata

# Use root user
ENV HOME /root
WORKDIR "${HOME}"

# Install pyenv
ENV PYENV_ROOT="${HOME}/.pyenv"
RUN curl https://pyenv.run/ | /bin/bash
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:${PATH}"
RUN echo 'eval "$(pyenv init -)"' >>$HOME/.bashrc && \
pyenv update

# Install Python
ARG PYTHON_VERSIONS="3.10 3.9 3.8 3.7 3.11 2.7 pypy2.7-7.3.12 pypy3.8-7.3.11"
COPY --chown=1000:1000 --chmod=+x ./install-python.sh /tmp/install-python.sh
COPY ./requirements.txt /requirements.txt
RUN /tmp/install-python.sh && \
rm /tmp/install-python.sh
48 changes: 48 additions & 0 deletions .github/containers/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Repository root for mounting into container.
MAKEFILE_DIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
REPO_ROOT:=$(realpath $(MAKEFILE_DIR)../../)

.PHONY: default
default: test

.PHONY: build
build:
@# Perform a shortened build for testing
@docker build $(MAKEFILE_DIR) \
-t ghcr.io/newrelic/newrelic-python-agent-ci:local \
--build-arg='PYTHON_VERSIONS=3.10 2.7'

.PHONY: test
test: build
@# Ensure python versions are usable
@docker run --rm ghcr.io/newrelic/python-agent-ci:local /bin/bash -c '\
python3.10 --version && \
python2.7 --version && \
touch tox.ini && tox --version && \
echo "Success! Python versions installed."'

.PHONY: run
run: build
@docker run --rm -it \
--mount type=bind,source="$(REPO_ROOT)",target=/home/github/python-agent \
--workdir=/home/github/python-agent \
--add-host=host.docker.internal:host-gateway \
-e NEW_RELIC_HOST="${NEW_RELIC_HOST}" \
-e NEW_RELIC_LICENSE_KEY="${NEW_RELIC_LICENSE_KEY}" \
-e NEW_RELIC_DEVELOPER_MODE="${NEW_RELIC_DEVELOPER_MODE}" \
-e GITHUB_ACTIONS="true" \
ghcr.io/newrelic/newrelic-python-agent-ci:local /bin/bash
53 changes: 53 additions & 0 deletions .github/containers/install-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash
# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail

main() {
# Coerce space separated string to array
if [[ ${#PYTHON_VERSIONS[@]} -eq 1 ]]; then
PYTHON_VERSIONS=($PYTHON_VERSIONS)
fi

if [[ -z "${PYTHON_VERSIONS[@]}" ]]; then
echo "No python versions specified. Make sure PYTHON_VERSIONS is set." 1>&2
exit 1
fi

# Find all latest pyenv supported versions for requested python versions
PYENV_VERSIONS=()
for v in "${PYTHON_VERSIONS[@]}"; do
LATEST=$(pyenv latest -k "$v" || pyenv latest -k "$v-dev")
if [[ -z "$LATEST" ]]; then
echo "Latest version could not be found for ${v}." 1>&2
exit 1
fi
PYENV_VERSIONS+=($LATEST)
done

# Install each specific version
for v in "${PYENV_VERSIONS[@]}"; do
pyenv install "$v" &
done
wait

# Set all installed versions as globally accessible
pyenv global ${PYENV_VERSIONS[@]}

# Install dependencies for main python installation
pyenv exec pip install --upgrade -r /requirements.txt
}

main
5 changes: 5 additions & 0 deletions .github/containers/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pip
setuptools
wheel
virtualenv<20.22.0
tox
80 changes: 80 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# For condition grammar see: https://docs.mergify.com/conditions/#grammar

shared:
conditions:
- and: &pr_ready_checks
- "#approved-reviews-by>=1" # A '#' pulls the length of the underlying list
- "label=ready-to-merge"
- "check-success=tests"
- "-draft" # Don't include draft PRs
- "-merged"
- or: # Only handle branches that target main or develop branches
- "base=main"
- "base~=^develop"

queue_rules:
- name: default
conditions:
- and: *pr_ready_checks
merge_method: squash

pull_request_rules:
# Merge Queue PR Rules
- name: Regular PRs - Add to merge queue on approval (squash)
conditions:
- and: *pr_ready_checks
- "-head~=^develop" # Don't include PRs from develop branches
actions:
queue:
method: squash

# Automatic PR Updates
- name: Automatic PR branch updates
conditions:
- "queue-position=-1" # Not queued
- "-draft" # Don't include draft PRs
- "-merged"
actions:
update:

# Automatic Labeling
- name: Clean up after merge
conditions:
- merged
actions:
delete_head_branch:
label:
remove:
- "merge-conflicts"
- "ready-to-merge"
- "tests-failing"

- name: Toggle label on merge conflicts
conditions:
- "-merged"
- conflict
actions:
label:
toggle:
- "merge-conflicts"

# Don't use a toggle for this, as the label constantly gets applied and removed when tests are rerun.
- name: Add label on test failures
conditions:
- "-merged"
- or:
- check-failure=tests
- check-skipped=tests
actions:
label:
add:
- "tests-failing"

- name: Remove label on test success
conditions:
- "-merged"
- check-success=tests
actions:
label:
remove:
- "tests-failing"
Loading
Loading