Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Remove ELASTIC_APM_LOG_LEVEL from python tests/apps #962

Merged
merged 3 commits into from Nov 7, 2020

Conversation

basepi
Copy link
Contributor

@basepi basepi commented Nov 6, 2020

What does this PR do?

Remove ELASTIC_APM_LOG_LEVEL from python tests/apps

Why is it important?

Previously, this didn't actually do anything because log_level
was not an established config value for the python agent.

As of elastic/apm-agent-python#946, this is
now a setting in python and it was causing tests to fail due to the
way python logging works. This PR cleans up all of those references
and will make tests pass.

Related issues

elastic/apm-agent-python#946

Previously, this didn't actually do anything because log_level
was not an established config value for the python agent.

As of elastic/apm-agent-python#946 this is
now a setting in python and it was causing tests to fail due to the
way python logging works. This PR cleans up all of those references
and will make tests pass.
All uses of this setting use `self.options.get` with a default,
so we can remove the default in `argparse`. This allows the python
agent to only use this setting if it's explicitly set, which is better
for how the python agent's `log_level` works.
@@ -363,7 +363,6 @@ def init_start_parser(self, parser, services, argv=None):
action="store",
help="APM log level to use",
choices=["off", "error", "warn", "info", "debug", "trace"],
default=DEFAULT_APM_LOG_LEVEL
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All uses of this setting use self.options.get with a default,
so we can remove the default in argparse. This allows the python
agent to only use this setting if it's explicitly set, which is better
for how the python agent's log_level works.

@apmmachine
Copy link
Collaborator

apmmachine commented Nov 6, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #962 updated]

  • Start Time: 2020-11-06T23:41:33.917+0000

  • Duration: 53 min 18 sec

Test stats 🧪

Test Results
Failed 0
Passed 428
Skipped 14
Total 442

@basepi basepi merged commit a6ece14 into elastic:master Nov 7, 2020
basepi added a commit that referenced this pull request Nov 9, 2020
* Fix for argparse.get not using our default

* Don't set log_level for python agent in agent.sh

* Update .ci/scripts/agent.sh

Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>

* Lint fixes

Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants