[
https://issues.apache.org/jira/browse/IMPALA-15129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18093411#comment-18093411
]
ASF subversion and git services commented on IMPALA-15129:
----------------------------------------------------------
Commit bd28681dcf6fe50b3d6ce5d89952fee42c55faa9 in impala's branch
refs/heads/master from Mihaly Szjatinya
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=bd28681dc ]
IMPALA-15129: Fix test_no_tuniqueid false positives from coverage/results dirs
assert_message_absent walks all files under $IMPALA_LOGS_DIR, which
inadvertently matches TUniqueId in non-daemon-log files:
- pytest JUnit XML (logs/ee_tests/results/): failure tracebacks capture
TUniqueId.__repr__() from Python test local variables
- Jacoco HTML coverage (logs/fe_tests/coverage/): rendered Java source
contains Thrift-generated constructor calls like new TUniqueId(...)
- gcovr HTML coverage (logs/coverage/): rendered C++ source contains
e.g. NAME##_catalogd_registration_id_ = TUniqueId()
Add a skip_subdirs parameter to assert_message_absent that prunes the
os.walk traversal in-place. test_no_tuniqueid passes
skip_subdirs={'coverage', 'results'} to exclude all three categories.
Change-Id: I275e34724ab16db9225389b1299c5c4f10bc878a
Assisted-by: Claude Sonnet 4.6 (GitHub Copilot)
Reviewed-on: http://gerrit.cloudera.org:8080/24529
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> 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
> Priority: Major
>
> `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)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]