Flaky Rolling Appender tests

2024-11-11 Thread Piotr P. Karwasz

Hi Gary,

On 9.11.2024 14:11, Gary Gregory wrote:

I get this failure:

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
4.963 s <<< FAILURE! -- in
org.apache.logging.log4j.core.appender.rolling.RollingAppenderDirectCronTest
[ERROR]
org.apache.logging.log4j.core.appender.rolling.RollingAppenderDirectCronTest.testAppender(LoggerContext,
RollingFileAppender) -- Time elapsed: 4.601 s <<< FAILURE!

Details:
https://gist.github.com/garydgregory/889c0b9aaea1edc3aa56cad075802b83
The tests of the rolling appender and especially those that use the 
`CronTriggeringPolicy` are notably flaky[1]. I am keeping them for lack 
of a better alternative, but they should probably be rewritten from 
scratch. Since the `CronTriggeringPolicy` always performs rollovers 
asynchronously, we should decide:


1. How synchronized should the tests be? I can pretty much modify them 
so that log statements and rollovers happen sequentially in a predefined 
order. Would that be a good test?


2. The tests are in my opinion overspecified: they make assertions on 
the content of a log file. Those assertions should probably be dropped 
and left to the layout unit tests. In the case of the 
`CronTriggeringPolicy` tests, we can not even make assertions on the 
relative position of the log event timestamp to the rollover timestamp. 
They can be arbitrary.


In the gist you shared above, nothing indicates that the rolling 
appender is malfunctioning: the status logger shows at least on rollover.


Piotr

[1] 
https://ge.apache.org/scans/tests?search.rootProjectNames=Apache%20Log4j%20BOM&search.timeZoneId=Europe%2FWarsaw




Re: [VOTE] Release Apache Log4j `3.0.0-beta3` (RC1)

2024-11-11 Thread Gary Gregory
+1

Finally builds all the way through.
ASC OK, SHA512 OK.

Gary

On Sat, Nov 9, 2024 at 8:11 AM Gary Gregory  wrote:

> Hi All,
>
> Running:
>
> mvn clean verify -Dreference.repo=
> https://repository.apache.org/content/repositories/orgapachelogging-1307
> -Prelease artifact:compare
>
> I get this failure:
>
> [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> 4.963 s <<< FAILURE! -- in
> org.apache.logging.log4j.core.appender.rolling.RollingAppenderDirectCronTest
> [ERROR]
> org.apache.logging.log4j.core.appender.rolling.RollingAppenderDirectCronTest.testAppender(LoggerContext,
> RollingFileAppender) -- Time elapsed: 4.601 s <<< FAILURE!
>
> Details:
> https://gist.github.com/garydgregory/889c0b9aaea1edc3aa56cad075802b83
>
> Using:
>
> openjdk version "17.0.13" 2024-10-15
> OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
> OpenJDK 64-Bit Server VM Homebrew (build 17.0.13+0, mixed mode, sharing)
>
> Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
> Maven home: /usr/local/Cellar/maven/3.9.9/libexec
> Java version: 17.0.13, vendor: Homebrew, runtime:
> /usr/local/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "15.0.1", arch: "x86_64", family: "mac"
>
> Darwin  24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:36:30 PDT
> 2024; root:xnu-11215.1.12~1/RELEASE_X86_64 x86_64
>
> Gary
>
>
> On Sat, Nov 9, 2024 at 1:11 AM Piotr P. Karwasz 
> wrote:
>
>> This is a vote to release the Apache Log4j `3.0.0-beta3`.
>>
>> Website: https://logging.staged.apache.org/log4j/3.0.0-beta3/index.html
>> GitHub: https://github.com/apache/logging-log4j2
>> Commit: 28117e55f69892d3454672f9399e53fb7b74a321
>> Distribution:
>> https://dist.apache.org/repos/dist/dev/logging/log4j/3.0.0-beta3
>> Nexus:
>> https://repository.apache.org/content/repositories/orgapachelogging-1307
>> Signing key: 0x077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0
>> Review kit:
>> https://logging.apache.org/logging-parent/release-review-instructions.html
>>
>> Please download, test, and cast your votes on this mailing list.
>>
>> [ ] +1, release the artifacts
>> [ ] -1, don't release, because...
>>
>> This vote is open for 72 hours and will pass unless getting a
>> net negative vote count. All votes are welcome and we encourage
>> everyone to test the release, but only the Logging Services PMC
>> votes are officially counted. At least 3 +1 votes and more
>> positive than negative votes are required.
>>
>> == Release Notes
>>
>> This release terminates the modularization process of Log4j Core, by
>> moving all the code that uses optional `log4j-core` dependencies into
>> new modules:
>>
>> * Support for the JAnsi library has been removed since recent Windows
>> OSes support ANSI escape sequences.
>> See
>> xref:manual/pattern-layout.adoc#ansi-windows[ANSI styling on Windows]
>> for more details.
>> * The
>> xref:manual/appenders/delegating.adoc#DisruptorBlockingQueueFactory[`DisruptorBlockinQueue`
>>
>> queue factory]
>> has been moved to a new
>> xref:components.adoc#log4j-conversant[`log4j-conversant` artifact].
>> * Support for
>> xref:manual/appenders/rolling-file.adoc#RolloverStrategy-compress[advanced
>>
>> compression algorithms]
>> has been moved to a new
>> xref:components.adoc#log4j-compress[`log4j-compress` artifact].
>> The Gzip and Zip formats are still supported out-of-the-box.
>>
>> === Separate lifecycle
>>
>> * The
>> xref:manual/appenders/message-queue.adoc#FlumeAppender[Flume Appender]
>> releases will follow its own lifecycle.
>> * All the
>> xref:manual/installation.adoc#impl-core-bridges[logging bridges]
>> from and to Log4j API have been removed from the Log4j Core 3.x release.
>> Please manage your dependencies with
>> xref:components.adoc#log4j-bom[`log4j-bom`]
>> to always use the compatible version of the logging bridges.
>>
>>
>> === Added
>>
>> * Add `useFqdn` configuration attribute to RFC5424 Layout. (#1740)
>> * Split off JNDI support of `log4j-jdbc` to a new `log4j-jdbc-jndi`
>> module (#1914)
>> * Add _"Plugin Reference"_ to the website. It is a Javadoc-on-steroids
>> focusing on Log4j plugins. (#1954)
>> * Split extended compression algorithm support to new `log4j-compress`
>> module. (#2921)
>>
>> === Changed
>>
>> * Remove JAnsi library support, since Windows console supports ANSI
>> escapes now. (#1736)
>> * Move `DisruptorBlockingQueue` plugin to new `log4j-conversant` module.
>> (#2914)
>> * Rewrite `JAnsiTextRenderer` to work without JAnsi library. (#2916)
>>
>> === Fixed
>>
>> * Switch MongoDB tests to use Docker. (#2229)
>> * Fix custom thread-context data provider handling in lookups and
>> filters. (#2331)
>> * Fix reloading of the configuration from an HTTP(S) source (#2937)
>> * Fix Android-related issues in Log4j Core. (#3056)
>> * Website is migrated to Antora with several formatting and link fixes
>> (#2443)
>>
>> === Removed
>>
>> * Remove _named_ date & time formatting pa

Re: [VOTE] Release Apache Log4j `3.0.0-beta3` (RC1)

2024-11-11 Thread Matt Sicker
+1

Went through the review kit, all looks good.

> On Nov 9, 2024, at 00:09, Piotr P. Karwasz  wrote:
> 
> This is a vote to release the Apache Log4j `3.0.0-beta3`.
> 
> Website: https://logging.staged.apache.org/log4j/3.0.0-beta3/index.html
> GitHub: https://github.com/apache/logging-log4j2
> Commit: 28117e55f69892d3454672f9399e53fb7b74a321
> Distribution: https://dist.apache.org/repos/dist/dev/logging/log4j/3.0.0-beta3
> Nexus: 
> https://repository.apache.org/content/repositories/orgapachelogging-1307
> Signing key: 0x077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0
> Review kit: 
> https://logging.apache.org/logging-parent/release-review-instructions.html
> 
> Please download, test, and cast your votes on this mailing list.
> 
> [ ] +1, release the artifacts
> [ ] -1, don't release, because...
> 
> This vote is open for 72 hours and will pass unless getting a
> net negative vote count. All votes are welcome and we encourage
> everyone to test the release, but only the Logging Services PMC
> votes are officially counted. At least 3 +1 votes and more
> positive than negative votes are required.
> 
> == Release Notes
> 
> This release terminates the modularization process of Log4j Core, by moving 
> all the code that uses optional `log4j-core` dependencies into new modules:
> 
> * Support for the JAnsi library has been removed since recent Windows OSes 
> support ANSI escape sequences.
> See
> xref:manual/pattern-layout.adoc#ansi-windows[ANSI styling on Windows]
> for more details.
> * The
> xref:manual/appenders/delegating.adoc#DisruptorBlockingQueueFactory[`DisruptorBlockinQueue`
>  queue factory]
> has been moved to a new
> xref:components.adoc#log4j-conversant[`log4j-conversant` artifact].
> * Support for
> xref:manual/appenders/rolling-file.adoc#RolloverStrategy-compress[advanced 
> compression algorithms]
> has been moved to a new
> xref:components.adoc#log4j-compress[`log4j-compress` artifact].
> The Gzip and Zip formats are still supported out-of-the-box.
> 
> === Separate lifecycle
> 
> * The
> xref:manual/appenders/message-queue.adoc#FlumeAppender[Flume Appender]
> releases will follow its own lifecycle.
> * All the
> xref:manual/installation.adoc#impl-core-bridges[logging bridges]
> from and to Log4j API have been removed from the Log4j Core 3.x release.
> Please manage your dependencies with
> xref:components.adoc#log4j-bom[`log4j-bom`]
> to always use the compatible version of the logging bridges.
> 
> 
> === Added
> 
> * Add `useFqdn` configuration attribute to RFC5424 Layout. (#1740)
> * Split off JNDI support of `log4j-jdbc` to a new `log4j-jdbc-jndi` module 
> (#1914)
> * Add _"Plugin Reference"_ to the website. It is a Javadoc-on-steroids 
> focusing on Log4j plugins. (#1954)
> * Split extended compression algorithm support to new `log4j-compress` 
> module. (#2921)
> 
> === Changed
> 
> * Remove JAnsi library support, since Windows console supports ANSI escapes 
> now. (#1736)
> * Move `DisruptorBlockingQueue` plugin to new `log4j-conversant` module. 
> (#2914)
> * Rewrite `JAnsiTextRenderer` to work without JAnsi library. (#2916)
> 
> === Fixed
> 
> * Switch MongoDB tests to use Docker. (#2229)
> * Fix custom thread-context data provider handling in lookups and filters. 
> (#2331)
> * Fix reloading of the configuration from an HTTP(S) source (#2937)
> * Fix Android-related issues in Log4j Core. (#3056)
> * Website is migrated to Antora with several formatting and link fixes (#2443)
> 
> === Removed
> 
> * Remove _named_ date & time formatting patterns in Pattern Layout, except 
> for `UNIX` and `UNIX_MILLIS` (#3150)
> * Move Flume Appender to its own release lifecycle. (#2902)
> * Remove `ThrowableProxy` and its usages (#3047)
> * Remove logging bridges from distribution and reference their 2.x 
> equivalents in `log4j-bom`.
> * Remove CLI tools to generate logger wrappers and convert configuration 
> files. These tools will be available in the next release of 
> https://logging.apache.org/log4j/transform/latest/[Log4j Transform].
> * Remove deprecated 
> `org.apache.logging.log4j.core.appender.rolling.action.Duration` class.
> * Remove `log4j-1.2-api` module (#2621)
> * Remove `log4j-iostreams` module (#2630)
> 
> === Updated
> 
> * Rename the log4j-mongodb4, module, package, and classes in favor of 
> log4j-mongodb, in other words, drop the `4`; tracks the current MongoDB 
> client driver.
> * Update `apache/logging-parent` to version `` (#2598)
> * Update `com.fasterxml.jackson:jackson-bom` to version `2.18.1` (#3136)
> * Update `io.fabric8:docker-maven-plugin` to version `0.45.1` (#3036)
> * Update `org.apache.commons:commons-compress` to version `1.27.1` (#2870)
> * Update `org.apache.commons:commons-csv` to version `1.12.0` (#3020)
> * Update `org.apache.commons:commons-dbcp2` to version `2.12.0` (#2342)
> * Update `org.apache.logging.log4j:log4j-api` to version `2.24.1` (#3035)
> * Update `org.jctools:jctools-core` to version `4.0.5` (#2638)
> * Update `org.jspecify:jspecify` to versio

Re: Flaky Rolling Appender tests

2024-11-11 Thread Gary Gregory
Hi Piotr,

Thank you for your detailed comments.

I'll try building again... until the build goes all the way through...

Gary

On Mon, Nov 11, 2024 at 12:11 PM Piotr P. Karwasz 
wrote:

> Hi Gary,
>
> On 9.11.2024 14:11, Gary Gregory wrote:
> > I get this failure:
> >
> > [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> > 4.963 s <<< FAILURE! -- in
> >
> org.apache.logging.log4j.core.appender.rolling.RollingAppenderDirectCronTest
> > [ERROR]
> >
> org.apache.logging.log4j.core.appender.rolling.RollingAppenderDirectCronTest.testAppender(LoggerContext,
> > RollingFileAppender) -- Time elapsed: 4.601 s <<< FAILURE!
> >
> > Details:
> > https://gist.github.com/garydgregory/889c0b9aaea1edc3aa56cad075802b83
> The tests of the rolling appender and especially those that use the
> `CronTriggeringPolicy` are notably flaky[1]. I am keeping them for lack
> of a better alternative, but they should probably be rewritten from
> scratch. Since the `CronTriggeringPolicy` always performs rollovers
> asynchronously, we should decide:
>
> 1. How synchronized should the tests be? I can pretty much modify them
> so that log statements and rollovers happen sequentially in a predefined
> order. Would that be a good test?
>
> 2. The tests are in my opinion overspecified: they make assertions on
> the content of a log file. Those assertions should probably be dropped
> and left to the layout unit tests. In the case of the
> `CronTriggeringPolicy` tests, we can not even make assertions on the
> relative position of the log event timestamp to the rollover timestamp.
> They can be arbitrary.
>
> In the gist you shared above, nothing indicates that the rolling
> appender is malfunctioning: the status logger shows at least on rollover.
>
> Piotr
>
> [1]
>
> https://ge.apache.org/scans/tests?search.rootProjectNames=Apache%20Log4j%20BOM&search.timeZoneId=Europe%2FWarsaw
>
>


[RESULT][VOTE] Release Apache Log4j `3.0.0-beta3` (RC1)

2024-11-11 Thread Piotr P. Karwasz

Hi all,

On 9.11.2024 07:09, Piotr P. Karwasz wrote:

This is a vote to release the Apache Log4j `3.0.0-beta3`.

Website: https://logging.staged.apache.org/log4j/3.0.0-beta3/index.html
GitHub: https://github.com/apache/logging-log4j2
Commit: 28117e55f69892d3454672f9399e53fb7b74a321
Distribution: 
https://dist.apache.org/repos/dist/dev/logging/log4j/3.0.0-beta3
Nexus: 
https://repository.apache.org/content/repositories/orgapachelogging-1307

Signing key: 0x077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0
Review kit: 
https://logging.apache.org/logging-parent/release-review-instructions.html


Please download, test, and cast your votes on this mailing list.

[ ] +1, release the artifacts
[ ] -1, don't release, because...

This vote is open for 72 hours and will pass unless getting a
net negative vote count. All votes are welcome and we encourage
everyone to test the release, but only the Logging Services PMC
votes are officially counted. At least 3 +1 votes and more
positive than negative votes are required.


And this is my +1.

The vote passes with 4 binding +1 from Jan Friedrich, Gary Gregory, Matt 
Sicker and me.


I will continue with the release process.

Piotr