Skip to content

KAFKA-19422: Deflake streams_application_upgrade_test #20004

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

lucasbru
Copy link
Member

@lucasbru lucasbru commented Jun 20, 2025

In this upgrade test, applications sometimes crash before the upgrade,
so it's actually triggering a bug in several older versions (2.x and
possibly others). It seems to be a rare race condition that has been
happening since 2022. Since we are not going to roll out a patch release
for Kafka Streams 2.x, we should just allow applications to crash before
the upgrade.

In this upgrade test, applications sometimes crash before the upgrade,
so it's actually triggering a bug in several older versions (2.x and
possibly others). It seems to be a rare race condition that has been
happening since 2022. Since we are not going to roll out a patch
release for Kafka Streams 2.x, we should just allow applications
to crash before the upgrade.
@lucasbru lucasbru requested a review from Copilot June 20, 2025 09:15
@github-actions github-actions bot added the tests Test fixes (including flaky tests) label Jun 20, 2025
@lucasbru lucasbru requested a review from mjsax June 20, 2025 09:15
@github-actions github-actions bot added the small Small PRs label Jun 20, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the upgrade test for Kafka Streams to allow for applications crashing on shutdown in older versions. The changes modify verification patterns to accept either "EXCEPTION" or "CLOSED" events rather than only "CLOSED", thereby deflaking the streams application upgrade test.

  • Updated wait_for_verification regex patterns in the test for processor nodes.
  • Adjusted SSH grep commands to match the new regex pattern.

@lucasbru lucasbru requested a review from bbejeck June 20, 2025 09:45
@lucasbru
Copy link
Member Author

PTAL @aliehsaeedii

self.wait_for_verification(self.processor2, "SMOKE-TEST-CLIENT-CLOSED", self.processor2.STDOUT_FILE)
self.wait_for_verification(self.processor3, "SMOKE-TEST-CLIENT-CLOSED", self.processor3.STDOUT_FILE)
# some older versions crash on shutdown, so we allow crashes here.
self.wait_for_verification(self.processor1, "SMOKE-TEST-CLIENT-(EXCEPTION|CLOSED)", self.processor1.STDOUT_FILE)
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a version check, and apply this new verification only for the older version(s) which are problematic?

Same below.

@mjsax mjsax added the streams label Jun 21, 2025
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.

2 participants