-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLDR-17304 capture internalError check stack traces into the system log #3447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except "tst" typo for "test" (I guess)
I wonder about thread safety when tests are run in parallel; it looks like reportTestInternalErrors is thread safe
tools/cldr-apps/src/main/java/org/unicode/cldr/web/STFactory.java
Outdated
Show resolved
Hide resolved
logging is thread safe |
Restructured so CheckCLDR does the logging directly, but also ConsoleCheck has that logging turned off (to not mess up output). As a bonus, CheckCLDR subclasses could call {
"type": "liberty_message",
"host": "txamm-gt0cvd2.localdomain",
"ibm_userDir": "/Users/srl295/src/cldr/tools/cldr-apps/target/liberty/wlp/usr/",
"ibm_serverName": "cldr",
"message": "Internal error: org.unicode.cldr.test.CheckForExemplars in ab",
"ibm_threadId": "000000b6",
"ibm_datetime": "2024-01-10T14:28:39.190-0600",
"module": "CheckCLDR",
"loglevel": "SEVERE",
"ibm_methodName": "addError",
"ibm_className": "org.unicode.cldr.test.CheckCLDR$CompoundCheckCLDR",
"ibm_sequence": "1704918519190_000000000009C",
"ibm_exceptionName": "java.util.ConcurrentModificationException",
"ibm_stackTrace": "java.util.ConcurrentModificationException\n\tat java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1095)\n\tat java.base/java.util.ArrayList$Itr.next(ArrayList.java:1049)\n\tat org.unicode.cldr.test.CheckForExemplars.extractDatePatternText(CheckForExemplars.java:784)\n\tat org.unicode.cldr.test.CheckForExemplars.handleCheck(CheckForExemplars.java:345)\n\tat org.unicode.cldr.test.CheckCLDR$CompoundCheckCLDR.handleCheck(CheckCLDR.java:1381)\n\tat org.unicode.cldr.test.CheckCLDR.check(CheckCLDR.java:1272)\n\tat…"
} |
- but add a facility so consolecheck does not see system logs
bad0803
to
0c4341a
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
@btangmu @macchiati could I get a review of the rewritten PR? This now comprehensively logs all |
@@ -344,6 +344,8 @@ static Level calculateCoverageLevel(final String coverageLevelInput, boolean for | |||
* @throws Throwable | |||
*/ | |||
public static void main(String[] args) throws Throwable { | |||
// turn off logging to not mess up html and other output. | |||
CheckCLDR.setLoggerLevel(java.util.logging.Level.OFF); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of disabling the log, how about capturing stderr and stdout separately as in java ... check ... 2> output.log 1> output.html
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@btangmu the errors are already handled as part of the checks in this case, though. This doesn't disable stderr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't suppress any errors, it only suppresses printing out the logging in the ConsoleCheckCLDR tool environment.
CLDR-17304
before shipping off to front end, call system logger on any Subtype.internalError messages
confirmed that they show up in the liberty logfile. so, should be picked up by datadog
This PR completes the ticket.
ALLOW_MANY_COMMITS=true