Skip to content

KAFKA-10505: Fix parsing of generation log string.#9312

Merged
guozhangwang merged 2 commits intoapache:trunkfrom
nizhikov:KAFKA-10505
Sep 23, 2020
Merged

KAFKA-10505: Fix parsing of generation log string.#9312
guozhangwang merged 2 commits intoapache:trunkfrom
nizhikov:KAFKA-10505

Conversation

@nizhikov
Copy link
Copy Markdown
Contributor

Two tests fails with the same reason:

  File "/opt/kafka-dev/tests/kafkatest/tests/streams/streams_upgrade_test.py", line 533, in extract_highest_generation
    return int(found_generations[-1])
ValueError: invalid literal for int() with base 10: "Generation{generationId=6,memberId='StreamsUpgradeTest-8a6ac110-1c65-40eb-af05-8bee270f1701-StreamThread-1-consumer-207de872-6588-407a-8485-101a19ba2bf0',protocol='stream'}\n"
  File "/opt/kafka-dev/tests/kafkatest/tests/streams/streams_static_membership_test.py", line 86, in test_rolling_bounces_will_not_trigger_rebalance_under_static_membership
    generation = int(generation)
ValueError: invalid literal for int() with base 10: "Generation{generationId=5,memberId='consumer-A-2-3e9cc50c-9835-4772-b282-29e07b2f9ad6',protocol='stream'}\n"

This PR fix the above errors by extracting the correct number from the log string.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@nizhikov
Copy link
Copy Markdown
Contributor Author

Hello, @mjsax @ableegoldman

2 system tests for streams are fails because of an unexpected string format.
I fixed it.

Please, take a look at my PR.

@mjsax
Copy link
Copy Markdown
Member

mjsax commented Sep 22, 2020

@nizhikov @ableegoldman Do we know when this broke? What was the old log line and what is the new one?

Triggered system test run: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/4181/

@mjsax mjsax added streams tests Test fixes (including flaky tests) labels Sep 22, 2020
@nizhikov
Copy link
Copy Markdown
Contributor Author

@mjsax These tests are broken with the 7e7bb18

Line logging only generationId - 7e7bb18#diff-30048900127c988a69027b70b0ce4eacL504

New line with the whole Generation object logging - 7e7bb18#diff-30048900127c988a69027b70b0ce4eacR590

@ableegoldman
Copy link
Copy Markdown
Member

Original system test run was aborted for some reason. Kicked off a new set: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/4182/

@guozhangwang
Copy link
Copy Markdown
Contributor

https://jenkins.confluent.io/job/system-test-kafka-branch-builder/4182/ passed now. I'm going to merge this one.

@guozhangwang guozhangwang merged commit bc7674f into apache:trunk Sep 23, 2020
@nizhikov
Copy link
Copy Markdown
Contributor Author

Thanks for the review and merge!

@ableegoldman
Copy link
Copy Markdown
Member

@guozhangwang I think this needs to be cherrypicked back to 2.6

abbccdda pushed a commit to abbccdda/kafka that referenced this pull request Sep 25, 2020
Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Matthias J. Sax <mjsax@apache.org>, Guozhang Wang <wangguoz@gmail.com>
guozhangwang pushed a commit that referenced this pull request Sep 27, 2020
Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Matthias J. Sax <mjsax@apache.org>, Guozhang Wang <wangguoz@gmail.com>
@guozhangwang
Copy link
Copy Markdown
Contributor

Yup, cherry-picked to 2.6 as well.

cadonna pushed a commit to confluentinc/kafka that referenced this pull request Oct 15, 2020
Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Matthias J. Sax <mjsax@apache.org>, Guozhang Wang <wangguoz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants