Skip to content

KAFKA-19058 Running the streams/streams-scala module tests produces a streams-scala.log #19324

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

Merged
merged 3 commits into from
Apr 2, 2025

Conversation

m1a2st
Copy link
Collaborator

@m1a2st m1a2st commented Mar 31, 2025

Remove streams-scala module log4j2 file appender.

Reviewers: PoAn Yang [email protected], Matthias J. Sax [email protected]

@github-actions github-actions bot added triage PRs from the community streams tests Test fixes (including flaky tests) small Small PRs labels Mar 31, 2025
@m1a2st
Copy link
Collaborator Author

m1a2st commented Mar 31, 2025

use command ./gradlew clean :streams:streams-scala:test in my local
image

@mjsax
Copy link
Member

mjsax commented Mar 31, 2025

I am ok with this change, but I don't understand the problem? The Jira say

Running tests should not produce untracked files.

What do you mean by this? logs is part of .gitignore similar build/

https://github.com/apache/kafka/blob/trunk/.gitignore#L32
https://github.com/apache/kafka/blob/trunk/.gitignore#L5

So I don't see a difference?

Also, comparing the log4j2.yaml with other in streams context, the other don't configure any file appender, so I am wondering if we should not just change the directory, but remove the file appender entirely?

@m1a2st
Copy link
Collaborator Author

m1a2st commented Apr 1, 2025

Hello @mjsax. thanks for review

What do you mean by this? logs is part of .gitignore similar build/

filePattern: "streams-scala-%d{yyyy-MM-dd}.log" this is leak, When I test on trunk, it will generate the streams-scala log file.
image
image

Also, comparing the log4j2.yaml with other in streams context, the other don't configure any file appender, so I am wondering if we should not just change the directory, but remove the file appender entirely?

I'm not sure why we're using a file appender, but if we don't check the log files, removing the appender seems like a good approach.

@FrankYang0529
Copy link
Member

Also, comparing the log4j2.yaml with other in streams context, the other don't configure any file appender, so I am wondering if we should not just change the directory, but remove the file appender entirely?

I'm not sure why we're using a file appender, but if we don't check the log files, removing the appender seems like a good approach.

It looks like the file appender was introduced by #4756. There is no more information why we did it. I'm +1 to remove the appender.

@mjsax
Copy link
Member

mjsax commented Apr 1, 2025

Seems we all agree that removing the file appender is the best thing to do.

@m1a2st
Copy link
Collaborator Author

m1a2st commented Apr 1, 2025

test on my local machine
image

@@ -22,19 +22,11 @@ Configuration:
Appenders:
Console:
name: A1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we rename this to STDOUT ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, addressed it.

@github-actions github-actions bot removed the triage PRs from the community label Apr 2, 2025
Copy link
Member

@FrankYang0529 FrankYang0529 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the patch.

@mjsax mjsax merged commit d619cc5 into apache:trunk Apr 2, 2025
25 checks passed
janchilling pushed a commit to janchilling/kafka that referenced this pull request Apr 4, 2025
… streams-scala.log (apache#19324)

Remove streams-scala module log4j2 file appender.

Reviewers: PoAn Yang <[email protected]>, Matthias J. Sax <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Small PRs streams tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants