newrelic / newrelic-python-agent

New Relic Python Agent
https://docs.newrelic.com/docs/agents/python-agent
Apache License 2.0
178 stars 102 forks source link

Add NEW_RELIC_K8S_OPERATOR_ENABLED #1127

Closed hmstepanek closed 7 months ago

hmstepanek commented 7 months ago

Overview

Add a configuration setting to indicate that the agent is being injected by the Kubernetes Agent Operator and that we should skip the python version safety check in sitecustomize. See agent spec for details (open PR).

github-actions[bot] commented 7 months ago

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 4 0 5.69s
✅ PYTHON black 10 0 0 2.23s
✅ PYTHON flake8 10 0 1.15s
✅ PYTHON isort 10 0 0 0.24s
✅ PYTHON pylint 10 0 7.25s

See detailed report in MegaLinter reports _Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff_

_MegaLinter is graciously provided by OX Security_

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 72.97297% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 81.73%. Comparing base (3b46fad) to head (fc7381a).

Files Patch % Lines
newrelic/hooks/application_celery.py 72.41% 6 Missing and 2 partials :warning:
newrelic/bootstrap/sitecustomize.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop-k8s-agent-operator #1127 +/- ## ============================================================== - Coverage 81.77% 81.73% -0.04% ============================================================== Files 192 192 Lines 21303 21306 +3 Branches 3707 3706 -1 ============================================================== - Hits 17420 17414 -6 - Misses 2806 2816 +10 + Partials 1077 1076 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lrafeei commented 7 months ago

I preemptively marked this as approved, but there's some test failures (mostly timeouts for some reason)