vvcephei commented on a change in pull request #8938: URL: https://github.com/apache/kafka/pull/8938#discussion_r448704043
########## File path: tests/kafkatest/tests/streams/streams_application_upgrade_test.py ########## @@ -0,0 +1,297 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# 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 +# limitations under the License. + +import random +from ducktape.mark import matrix +from ducktape.tests.test import Test +from ducktape.utils.util import wait_until +from kafkatest.services.kafka import KafkaService +from kafkatest.services.streams import StreamsSmokeTestDriverService, StreamsSmokeTestJobRunnerService +from kafkatest.services.zookeeper import ZookeeperService +from kafkatest.version import LATEST_2_2, LATEST_2_3, LATEST_2_4, LATEST_2_5, DEV_VERSION, KafkaVersion + +smoke_test_versions = [str(LATEST_2_2), str(LATEST_2_3), str(LATEST_2_4), str(LATEST_2_5)] +dev_version = [str(DEV_VERSION)] + +class StreamsUpgradeTest(Test): + """ + Test upgrading Kafka Streams (all version combination) + If metadata was changes, upgrade is more difficult + Metadata version was bumped in 0.10.1.0 and + subsequently bumped in 2.0.0 + """ + + def __init__(self, test_context): + super(StreamsUpgradeTest, self).__init__(test_context) + self.topics = { + 'echo' : { 'partitions': 5 }, + 'data' : { 'partitions': 5 }, + } + + processed_msg = "processed [0-9]* records" + base_version_number = str(DEV_VERSION).split("-")[0] + + def perform_broker_upgrade(self, to_version): + self.logger.info("First pass bounce - rolling broker upgrade") + for node in self.kafka.nodes: + self.kafka.stop_node(node) + node.version = KafkaVersion(to_version) + self.kafka.start_node(node) + + @matrix(from_version=smoke_test_versions, to_version=dev_version, bounce_type=["full"]) Review comment: Ah, thanks for the clarification. Yes, I was thinking we would just add new matrices for both rolling-bounceable and downgradable versions. E.g., after the two pending releases, we'd also have: ``` @matrix(from=[2.5.1, 2.6.0], to=[DEV_VERSION], bounce_type=[full, rolling]) @matrix(from=[DEV_VERSION], to=[2.5.1, 2.6.0], bounce_type=[full, rolling]) ``` (just for illustrative purposes, we'd probably declare a variable to make it maintainable) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org