You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Joe McDonnell (Code Review)" <ge...@cloudera.org> on 2020/10/30 04:48:19 UTC

[Impala-ASF-CR] IMPALA-10304: Fix log level and format for pytests

Joe McDonnell has uploaded this change for review. ( http://gerrit.cloudera.org:8080/16679


Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................

IMPALA-10304: Fix log level and format for pytests

Recent testing showed that the pytests are not
respecting the log level and format set in
conftest.py's configure_logging(). It is using
the default log level of WARNING and the
default formatter.

The issue is that logging.basicConfig() is only
effective the first time it is called. The code
in lib/python/impala_py_lib/helpers.py does a
call to logging.basicConfig() at the global
level, and conftest.py imports that file. This
renders the call in configure_logging()
ineffective.

To avoid this type of confusion, logging.basicConfig()
should only be called from the main() functions for
libraries. This removes the call in lib/python/impala_py_lib
(as it is not needed for a library without a main function).
It also fixes up various other locations to move the
logging.basicConfig() call to the main() function.

Testing:
 - Ran the end to end tests and custom cluster tests
 - Confirmed the logging format
 - Added an assert in configure_logging() to test that
   the INFO log level is applied to the root logger.

Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
---
M bin/dump_breakpad_symbols.py
M bin/run-workload.py
M bin/start-impala-cluster.py
M lib/python/impala_py_lib/helpers.py
M tests/conftest.py
M tests/shell/util.py
M tests/stress/query_retries_stress_runner.py
7 files changed, 14 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/79/16679/1
-- 
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>

[Impala-ASF-CR] IMPALA-10304: Fix log level and format for pytests

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16679 )

Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/16679/1/bin/start-impala-cluster.py
File bin/start-impala-cluster.py:

http://gerrit.cloudera.org:8080/#/c/16679/1/bin/start-impala-cluster.py@719
PS1, Line 719: "
flake8: E501 line too long (92 > 90 characters)


http://gerrit.cloudera.org:8080/#/c/16679/1/tests/stress/query_retries_stress_runner.py
File tests/stress/query_retries_stress_runner.py:

http://gerrit.cloudera.org:8080/#/c/16679/1/tests/stress/query_retries_stress_runner.py@295
PS1, Line 295: )
flake8: E501 line too long (91 > 90 characters)



-- 
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2020 04:49:23 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-10304: Fix log level and format for pytests

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16679 )

Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/6624/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2020 04:48:48 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10304: Fix log level and format for pytests

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16679 )

Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/7588/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2020 05:08:54 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10304: Fix log level and format for pytests

Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16679 )

Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................

IMPALA-10304: Fix log level and format for pytests

Recent testing showed that the pytests are not
respecting the log level and format set in
conftest.py's configure_logging(). It is using
the default log level of WARNING and the
default formatter.

The issue is that logging.basicConfig() is only
effective the first time it is called. The code
in lib/python/impala_py_lib/helpers.py does a
call to logging.basicConfig() at the global
level, and conftest.py imports that file. This
renders the call in configure_logging()
ineffective.

To avoid this type of confusion, logging.basicConfig()
should only be called from the main() functions for
libraries. This removes the call in lib/python/impala_py_lib
(as it is not needed for a library without a main function).
It also fixes up various other locations to move the
logging.basicConfig() call to the main() function.

Testing:
 - Ran the end to end tests and custom cluster tests
 - Confirmed the logging format
 - Added an assert in configure_logging() to test that
   the INFO log level is applied to the root logger.

Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Reviewed-on: http://gerrit.cloudera.org:8080/16679
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M bin/dump_breakpad_symbols.py
M bin/run-workload.py
M bin/start-impala-cluster.py
M lib/python/impala_py_lib/helpers.py
M tests/conftest.py
M tests/shell/util.py
M tests/stress/query_retries_stress_runner.py
7 files changed, 14 insertions(+), 8 deletions(-)

Approvals:
  Tim Armstrong: Looks good to me, approved
  Impala Public Jenkins: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR] IMPALA-10304: Fix log level and format for pytests

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16679 )

Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................


Patch Set 1: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2020 10:23:58 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10304: Fix log level and format for pytests

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/16679 )

Change subject: IMPALA-10304: Fix log level and format for pytests
......................................................................


Patch Set 1: Code-Review+2

Thank you for debugging and fixing this, this solves a mystery


-- 
To view, visit http://gerrit.cloudera.org:8080/16679
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d91b7f910b3606c50bcba4579179a0bc8c20588
Gerrit-Change-Number: 16679
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Fri, 30 Oct 2020 06:18:08 +0000
Gerrit-HasComments: No