Mihaly Szjatinya created IMPALA-15129:
-----------------------------------------

             Summary: TestBannedLogMessages.test_no_tuniqueid: false positives 
from scanning non-log files (JUnit XML, Jacoco/gcovr HTML)
                 Key: IMPALA-15129
                 URL: https://issues.apache.org/jira/browse/IMPALA-15129
             Project: IMPALA
          Issue Type: Bug
            Reporter: Mihaly Szjatinya
            Assignee: Mihaly Szjatinya


`TestBannedLogMessages.test_no_tuniqueid` fails with false positives.
The test uses `assert_message_absent` which walks all files under 
`$IMPALA_LOGS_DIR` and greps for `[^a-zA-Z]TUniqueId(`. This inadvertently 
matches content in pytest JUnit XML result files, Jacoco Java HTML coverage 
reports, and gcovr C++ HTML coverage reports — none of which are Impala daemon 
logs.

These are NOT violations of the log formatting policy established in 
IMPALA-13252; they are false positives caused by the overly broad scan scope.

*Case 1 — pytest JUnit XML:*
File: logs/ee_tests/results/TEST-*.log
A test (test_registration_ids_different) failed for an unrelated reason. Pytest 
captured a local variable old_reg_id = TUniqueId(hi=..., lo=...) in the JUnit 
XML failure report. This is the Python Thrift-generated TUniqueId.__repr__() 
output — not an Impala log message.

*Case 2 — Jacoco HTML coverage report:*
File: 
logs/fe_tests/coverage/org.apache.impala.extdatasource.thrift/TOpenParams.java.html
The Jacoco HTML coverage report renders TOpenParams.java source code, which 
contains Thrift-generated Java constructor calls such as:
  this.query_id = new org.apache.impala.thrift.TUniqueId(other.query_id);
The regex matches .TUniqueId( in the source code snippet. This is not a log 
statement.

*Case 3 — gcovr C++ HTML coverage report:*
File: logs/coverage/index.*.html
Rendered C++ source code contains e.g. NAME##_catalogd_registration_id_ = 
TUniqueId();

*Fix:* Add a skip_subdirs (or equivalent) parameter to assert_message_absent 
and call it from test_no_tuniqueid excluding the coverage and results 
subdirectories, which contain only non-log coverage/test-result files.

Related: IMPALA-13252, IMPALA-13397



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to