Closed hmstepanek closed 5 months ago
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
✅ PYTHON | black | 79 | 0 | 0 | 1.39s |
✅ PYTHON | flake8 | 79 | 0 | 0.86s | |
✅ PYTHON | isort | 79 | 0 | 0 | 0.29s |
❌ PYTHON | pylint | 79 | 27 | 10.21s |
See detailed report in MegaLinter reports
_Set VALIDATE_ALL_CODEBASE: true
in mega-linter.yml to validate all sources, not only the diff_
All modified and coverable lines are covered by tests :white_check_mark:
Please upload report for BASE (
main@44ccef0
). Learn more about missing BASE report.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I see the flag being set in the tests that do not need the package capture, but I am not seeing where the flag's status does anything with the function itself (in the config.py to set the setting/flag or the package capture function itself)
The package capture setting is in the config file here: https://github.com/newrelic/newrelic-python-agent/blob/main/newrelic/config.py#L567. It is used here inside the environment_settings function to skip capturing the plugins if it is disabled: https://github.com/newrelic/newrelic-python-agent/blob/main/newrelic/core/environment.py#L207.
I see the flag being set in the tests that do not need the package capture, but I am not seeing where the flag's status does anything with the function itself (in the config.py to set the setting/flag or the package capture function itself)
The package capture setting is in the config file here: https://github.com/newrelic/newrelic-python-agent/blob/main/newrelic/config.py#L567. It is used here inside the environment_settings function to skip capturing the plugins if it is disabled: https://github.com/newrelic/newrelic-python-agent/blob/main/newrelic/core/environment.py#L207.
Oh, OK, that's what I was missing--I did not realize this was a flag we already had. Looks good to me!
Overview
Package capturing is slow and we don't need to do it for every test. Disable package capturing unless we are explicitly testing it.
Previously, when it took too long to capture the package info, it caused application connect timeouts that raised an AssertionError of application.active.