darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.45k stars 348 forks source link

Is v12.3 currently usable? #809

Closed ieshin closed 6 months ago

ieshin commented 7 months ago

Hello,

I would like to inquire if v12.3 is currently usable. It appears that the release notes have been completed, but the version has not been released on the official site yet. https://pgbadger.darold.net/

Furthermore, when I attempted to test the v12.3 tag, I encountered two failures, which did not occur in v12.2 and earlier versions.

Here is my testing log.

$ prove
t/01_lint.t ......... ok
t/02_basics.t ....... 9/17
#   Failed test 'Multiple output format '13487315897134873' = '13511215985135112''
#   at t/02_basics.t line 46.
t/02_basics.t ....... 10/17
#   Failed test 'syslog report to stdout'
#   at t/02_basics.t line 49.
t/02_basics.t ....... 17/17 # Looks like you failed 2 tests of 17.
t/02_basics.t ....... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/17 subtests
t/03_consistency.t .. ok
t/04_advanced.t ..... ok

Test Summary Report
-------------------
t/02_basics.t     (Wstat: 512 Tests: 17 Failed: 2)
  Failed tests:  9-10
  Non-zero exit status: 2

I tried to output the results of failed testing case, and I found something wired in v12.3.

9/17: Add two rows to t/02_basics.t to save the file.

 43 $ret = `perl pgbadger -q --outdir '.' -o $TEXT -o $JSON -o - -x json $LOG > t/ret.json`;
 44 my $ret2 = `stat --printf='%s' t/ret.json $TEXT $JSON`;
 45 chomp($ret);
 46 ok( $? == 0 && $ret2 eq '13511215985135112', "Multiple output format '$ret2' = '13511215985135112'");
 47 ################
 48 `cp $TEXT /somewhere/newtext.text`;
 49 `cp $JSON /somewhere/newjson.json`;
 50 ################

10/17: $ perl pgbadger -q -o - 't/fixtures/pg-syslog.1.bz2' &> somewhere/10.log

According to /somewhere/newtext.text and somewhere/10.log, looks like there is 1 ERROR in $LOG and $SYSLOG.

Logs type       Count   Percentage
ERROR           1       0.16%
LOG             629     99.84%
Logs type       Count   Percentage
ERROR           1       0.00%
HINT            1       0.00%
LOG             59,895  100.00%

However, when I tried to check the t/fixtures/light.postgres.log.bz2 and t/fixtures/pg-syslog.1.bz2, there is not any ERROR in these 2 files.

I will appreciate if you anyone could give me a suggestion or answer.

df7cb commented 7 months ago

I'm seeing the regression failure in the Debian package build as well:

t/02_basics.t ....... 
1..17
ok 1 - Inline help
ok 2 - Light log report to stdout
ok 3 - Light log report to HTML
ok 4 - Light log to binary
ok 5 - From binary to JSON
ok 6 - Incremental mode report
ok 7 - Ressources files in incremental mode
ok 8 - Light log from STDIN
not ok 9 - Multiple output format '13487315897134873' = '13511215985135112'

#   Failed test 'Multiple output format '13487315897134873' = '13511215985135112''
#   at t/02_basics.t line 46.
not ok 10 - syslog report to stdout

#   Failed test 'syslog report to stdout'
#   at t/02_basics.t line 49.
ok 11 - statement type
ok 12 - French encoding
ok 13 - Cyrillic encoding
ok 14 - Anonymization \#1
ok 15 - Anonymization \#2
ok 16 - Anonymization \#3
ok 17
# Looks like you failed 2 tests of 17.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/17 subtests 
darold commented 7 months ago

Yes, got it too. I'm working on this. I think it is also related to #807 with the problem on error count. I will produce a v12.4 after the fixes.

darold commented 7 months ago

Fixed with commit b1aaa97. New release will be pushed later today.

$ prove
t/01_lint.t ......... ok   
t/02_basics.t ....... ok     
t/03_consistency.t .. ok     
t/04_advanced.t ..... ok     
All tests successful.
Files=4, Tests=54, 115 wallclock secs ( 0.03 usr  0.00 sys + 43.80 cusr  1.09 csys = 44.92 CPU)
Result: PASS
darold commented 6 months ago

A thousand apologies for not being able to find the time to post the new release. It is done now, see https://github.com/darold/pgbadger/releases/tag/v12.4