Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[KIP-848] Added online upgrade and downgrade test#2012

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
pranavrth wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromdev_kip848_upgrade_downgrade_testing

Conversation

pranavrth
Copy link
Member

No description provided.

@CopilotCopilotAI review requested due to automatic review settingsJuly 17, 2025 07:11
@pranavrthpranavrth requested review fromMSeal anda team ascode ownersJuly 17, 2025 07:11
@confluent-cla-assistant

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@pranavrthpranavrth changed the titleAdded online upgrade and downgrade test[KIP-848] Added online upgrade and downgrade testJul 17, 2025
Copy link

@CopilotCopilotAI 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 adds comprehensive integration tests for Kafka consumer upgrade and downgrade scenarios, specifically testing the transition between classic and consumer group protocols. The tests verify that consumers can successfully upgrade from classic protocol to consumer protocol and downgrade back, while maintaining proper partition assignment and message consumption throughout the process.

Key changes:

  • Added new integration test file with upgrade/downgrade test logic for multiple partition assignment strategies
  • Enhanced cluster fixture with topic deletion capability and improved message seeding
  • Refactored common utility functions for better group protocol configuration handling

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

FileDescription
tests/integration/consumer/test_consumer_upgrade_downgrade.pyNew test file implementing consumer protocol upgrade/downgrade tests with partition assignment validation
tests/integration/cluster_fixture.pyAdded delete_topic method and improved seed_topic to generate proper test keys
tests/common/init.pyRefactored group protocol configuration utilities with new helper method and improved conditional logic

# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limit
Copy link
Preview

CopilotAIJul 17, 2025

Choose a reason for hiding this comment

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

The comment appears to be truncated. It should likely read '# limitations under the License.' to complete the Apache License header.

Suggested change
#limit
#limitations under the License.

Copilot uses AI. Check for mistakes.

Comment on lines +56 to +62
# def produce_messages(producer, topic, partitions, num_messages):
# for i in range(num_messages):
# key = "key-{}".format(i)
# value = "value-{}".format(i)
# partition = i % partitions
# producer.produce(topic, key=key, value=value, partition=partition)
# producer.flush()
Copy link
Preview

CopilotAIJul 17, 2025

Choose a reason for hiding this comment

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

This commented-out function should be removed as it's not being used and adds clutter to the codebase.

Suggested change
# def produce_messages(producer, topic, partitions, num_messages):
# for i in range(num_messages):
# key = "key-{}".format(i)
# value = "value-{}".format(i)
# partition = i % partitions
# producer.produce(topic, key=key, value=value, partition=partition)
# producer.flush()
# Removed the commented-out `produce_messages` function to reduce clutter.

Copilot uses AI. Check for mistakes.

"""
Test consumer upgrade and downgrade.
"""
topic = kafka_cluster.create_topic_and_wait_propogation(topic_prefix,
Copy link
Preview

CopilotAIJul 17, 2025

Choose a reason for hiding this comment

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

The method name contains a typo: 'propogation' should be 'propagation'.

Suggested change
topic=kafka_cluster.create_topic_and_wait_propogation(topic_prefix,
topic=kafka_cluster.create_topic_and_wait_propagation(topic_prefix,

Copilot uses AI. Check for mistakes.

Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqube-confluent
Copy link

Passed

Analysis Details

4 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 4 Code Smells

Coverage and Duplications

  • Coverage No coverage information (66.00% Estimated after merge)
  • Duplications No duplication information (5.20% Estimated after merge)

Project ID: confluent-kafka-python

View in SonarQube

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@MSealMSealAwaiting requested review from MSealMSeal is a code owner

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@pranavrth

[8]ページ先頭

©2009-2025 Movatter.jp