Skip to content
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

tests,backup: fix flakiness by using current timestamps #982

Merged

Conversation

davide-armand
Copy link
Contributor

@davide-armand davide-armand commented Oct 24, 2024

Using some (old) fixed timestamps when producing messages was causing the
messages to be automatically deleted because past message retention.

I think most of the time the test was managing to complete successfully
before the retention kicked in, making it fail only sometimes.

Copy link

Coverage report

This PR does not seem to contain any modification to coverable code.

@davide-armand davide-armand force-pushed the davide-armand/fix-flaky-test_roundtrip_from_kafka_state branch 2 times, most recently from 70484ef to 09a4d06 Compare October 25, 2024 07:05
@davide-armand davide-armand changed the title tests,backup: fix flaky test tests,backup: fix flakiness by using current timestamps Oct 25, 2024
@davide-armand davide-armand force-pushed the davide-armand/fix-flaky-test_roundtrip_from_kafka_state branch from 09a4d06 to bfc96a2 Compare October 25, 2024 07:19
@davide-armand davide-armand marked this pull request as ready for review October 25, 2024 07:26
@davide-armand davide-armand requested review from a team as code owners October 25, 2024 07:26
Using some (old) fixed timestamps when producing messages was causing the
messages to be automatically deleted because past message retention.
I think most of the time the test was managing to complete successfully
before the retention kicked in, making it fail only sometimes.
@davide-armand davide-armand force-pushed the davide-armand/fix-flaky-test_roundtrip_from_kafka_state branch from bfc96a2 to cfc4e1a Compare October 25, 2024 07:50
@aiven-anton
Copy link
Contributor

aiven-anton commented Oct 25, 2024

Nice finding, I guess alternative fix could be to disable retention? (Asking because we most likely have the exact same issue in an internal project)

Copy link
Contributor

@eliax1996 eliax1996 left a comment

Choose a reason for hiding this comment

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

LGTM, great finding. How did you realized it?

@eliax1996 eliax1996 merged commit 8e3d735 into main Oct 25, 2024
9 checks passed
@eliax1996 eliax1996 deleted the davide-armand/fix-flaky-test_roundtrip_from_kafka_state branch October 25, 2024 12:34
@davide-armand
Copy link
Contributor Author

davide-armand commented Oct 25, 2024

Nice finding, I guess alternative fix could be to disable retention? (Asking because we most likely have the exact same issue in an internal project)

@aiven-anton Ah yes I guess that would work too, did no think about that

@davide-armand
Copy link
Contributor Author

LGTM, great finding. How did you realized it?

@eliax1996 The beginning offset of the topic was mysteriously changing from 0 to the 2 (end offset) after a few seconds.
Doing consumer.seek to offset 0 was failing.
Then I simplified the test until I found out about the timestamps..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants