Skip to content

MINOR: Change ConnectDistributed system test to use KafkaVersion instead of string#7023

Merged
rajinisivaram merged 3 commits intoapache:trunkfrom
rhauch:fix-connect-distributed-system-tests
Jul 2, 2019
Merged

MINOR: Change ConnectDistributed system test to use KafkaVersion instead of string#7023
rajinisivaram merged 3 commits intoapache:trunkfrom
rhauch:fix-connect-distributed-system-tests

Conversation

@rhauch
Copy link
Copy Markdown
Contributor

@rhauch rhauch commented Jul 2, 2019

Recently, #7000 added a method to the KafkaVersion class used in the Kafka system tests. Until then, ConnectDistributed tests passed a string as the version, and this happened to work since no methods were required. But the KafkaVersion.support_named_listeners() method added in #7000 and required in tests/kafkatest/services/kafka/templates/kafka.properties appears to have broken the ConnectDistributed system tests. Changing the latter to use KafkaVersion instead of string fixes the system tests.

I'll run a system test build before this should be merged to trunk and at least 2.3 (ideally back to 1.0).

Committer Checklist (excluded from commit message)

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

@rhauch
Copy link
Copy Markdown
Contributor Author

rhauch commented Jul 2, 2019

The system test run of ConnectDistributedTest (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/2761/console) had 11 tests pass and 1 fail because Kafka Connect failed to start on node: ubuntu@worker5, which is a notoriously irritating error that happens only occasionally.

Given that all of these system tests failed before this change, we should still be able to merge this and backport at least to the 2.3 branch, and potentially back to the 1.0 branch.

Copy link
Copy Markdown
Contributor

@rajinisivaram rajinisivaram left a comment

Choose a reason for hiding this comment

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

@rhauch Thanks for the PR. Left a note about updating the caller instead. We use KafkaVersion in all other cases as argument to KafkaService, but the doc in KafkaService is out-of-date. It will be good to update that as well to avoid confusion.

self.kafka = KafkaService(self.test_context, self.num_brokers, self.zk,
security_protocol=security_protocol, interbroker_security_protocol=security_protocol,
topics=self.topics, version=broker_version,
topics=self.topics, version=KafkaVersion(broker_version),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would be better to update callers of setup_services to use KafkaVersion objects since at the moment they are converting to string. The default value DEV_BRANCH used here is already a KafkaVersion instance. Looks like we only need to update the parameters in this method:

@parametrize(broker_version=str(DEV_BRANCH), auto_create_topics=False, security_protocol=SecurityConfig.PLAINTEXT, connect_protocol='compatible')
.

Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

LGTM

@rajinisivaram rajinisivaram force-pushed the fix-connect-distributed-system-tests branch from 6f852bb to 96f88c1 Compare July 2, 2019 14:11
@rajinisivaram
Copy link
Copy Markdown
Contributor

System test run with the updated PR (https://jenkins.confluent.io/job/system-test-kafka-branch-builder/2767/) had the same two failures from Randall's test run yesterday with his PR. Randall mentioned that these looked like intermittent failures. But I am not sure the compatibility tests would ever have worked against a 0.9.0.1 broker. The logs show that the Connect client sent an ApiVersions request that the 0.9.0.1 broker didn't recognize. So I looked at the last successful run and those were working since all the compatibility tests were always running against a dev broker because version was being set as String rather than the expected KafkaVersion. Updated the test to remove compatibility test with 0.9.0.1 brokers.

Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

LGTM, please include the updated message in the commit with an explanation why we removed 0.9.x.

@rajinisivaram
Copy link
Copy Markdown
Contributor

@ijuma Thanks for the review, merging to trunk with detailed commit message.

@rajinisivaram rajinisivaram merged commit 6f91096 into apache:trunk Jul 2, 2019
rajinisivaram pushed a commit to confluentinc/kafka that referenced this pull request Jul 2, 2019
… compatibility test (apache#7023)

Connect tests were using String version for KafkaService instead of the expected KafkaVersion object. This broke due to recent changes to KafkaVersion. It turns out that the tests with String version were running compatibility tests against `dev` brokers rather than the older broker versions they were expecting to run against. When version was fixed, tests using 0.9.0.1 brokers started failing since new clients are not compatible with 0.9.0.1 brokers. So this PR fixes version parameter and removes the two tests against 0.9.0.1 brokers.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Rajini Sivaram <rajinisivaram@googlemail.com>
rajinisivaram pushed a commit to confluentinc/kafka that referenced this pull request Jul 2, 2019
… compatibility test (apache#7023)

Connect tests were using String version for KafkaService instead of the expected KafkaVersion object. This broke due to recent changes to KafkaVersion. It turns out that the tests with String version were running compatibility tests against `dev` brokers rather than the older broker versions they were expecting to run against. When version was fixed, tests using 0.9.0.1 brokers started failing since new clients are not compatible with 0.9.0.1 brokers. So this PR fixes version parameter and removes the two tests against 0.9.0.1 brokers.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Rajini Sivaram <rajinisivaram@googlemail.com>
gharris1727 added a commit to gharris1727/kafka that referenced this pull request Feb 3, 2020
(apache#7023) exposed an incompatibility between Kafka <=0.9 and Connect >0.9,
in which the broker does not recognize a request for ApiVersions.
For trunk and 2.4, this test case was removed rather than the issue addressed.
This effectively backports the other half of (apache#7023) which was left out of (apache#7791).

Signed-off-by: Greg Harris <gregh@confluent.io>
rhauch pushed a commit that referenced this pull request Feb 5, 2020
…DistributedTest (#8035)

(#7023) exposed an incompatibility between Kafka <=0.9 and Connect >0.9,
in which the broker does not recognize a request for ApiVersions.
For trunk and 2.4, this test case was removed rather than the issue addressed.
This effectively backports the other half of (#7023) which was left out of (#7791).

Signed-off-by: Greg Harris <gregh@confluent.io>

Author: Greg Harris <gregh@confluent.io>
Reviewers: Randall Hauch <rhauch@gmail.com>, Andrew Choi <andchoi@linkedin.com>
rhauch pushed a commit that referenced this pull request Feb 5, 2020
…DistributedTest (#8035)

(#7023) exposed an incompatibility between Kafka <=0.9 and Connect >0.9,
in which the broker does not recognize a request for ApiVersions.
For trunk and 2.4, this test case was removed rather than the issue addressed.
This effectively backports the other half of (#7023) which was left out of (#7791).

Signed-off-by: Greg Harris <gregh@confluent.io>

Author: Greg Harris <gregh@confluent.io>
Reviewers: Randall Hauch <rhauch@gmail.com>, Andrew Choi <andchoi@linkedin.com>
rhauch pushed a commit that referenced this pull request Feb 5, 2020
…DistributedTest (#8035)

(#7023) exposed an incompatibility between Kafka <=0.9 and Connect >0.9,
in which the broker does not recognize a request for ApiVersions.
For trunk and 2.4, this test case was removed rather than the issue addressed.
This effectively backports the other half of (#7023) which was left out of (#7791).

Signed-off-by: Greg Harris <gregh@confluent.io>

Author: Greg Harris <gregh@confluent.io>
Reviewers: Randall Hauch <rhauch@gmail.com>, Andrew Choi <andchoi@linkedin.com>
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