Skip to content

MINOR: add support for kafka 2.4 and 2.5 to downgrade test#8518

Closed
lbradstreet wants to merge 2 commits into
apache:trunkfrom
lbradstreet:downgrade-test-2.4-2.5
Closed

MINOR: add support for kafka 2.4 and 2.5 to downgrade test#8518
lbradstreet wants to merge 2 commits into
apache:trunkfrom
lbradstreet:downgrade-test-2.4-2.5

Conversation

@lbradstreet

@lbradstreet lbradstreet commented Apr 19, 2020

Copy link
Copy Markdown
Contributor

The downgrade test does not currently support 2.4 and 2.5. When you enable them, it fails as a result of consumer group static membership. This PR makes the downgrade test work with all of our released versions again.

@ijuma

ijuma commented Apr 19, 2020

Copy link
Copy Markdown
Member

ok to test

@lbradstreet

lbradstreet commented Apr 19, 2020

Copy link
Copy Markdown
Contributor Author

Result after running in ducker:

SESSION REPORT (ALL TESTS)                                                                                                                                                                                                                                   
ducktape version: 0.7.7                                                                                                                                                                                                                                      
session_id:       2020-04-19--001                                                                                                                                                                                                                            
run time:         26 minutes 12.963 seconds                                                                                                                                                                                                                  
tests run:        14                                                                                                                                                                                                                                         
passed:           14                                                                                                                                                                                                                                         
failed:           0                                                                                                                                                                                                                                          
ignored:          0                                                                                                                                                                                                                                          ================================================================================                                                                                                                                                                             
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=1.1.1.compression_types=.none                                                                                                                               
status:     PASS                                                                                                                                                                                                                                             
run time:   1 minute 30.012 seconds                                                                                                                                                                                                                          --------------------------------------------------------------------------------                                              
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=1.1.1.security_protocol=SASL_SSL.compression_types=.lz4                                                                                                     
status:     PASS                                                                                                                                                                                                                                             run time:   2 minutes 11.369 seconds                                                                                                                                                                                                                         
--------------------------------------------------------------------------------                                              
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.0.1.compression_types=.none                                                                                                                               status:     PASS                                                                                                              
run time:   1 minute 35.772 seconds                                                                                                                                                                                                                          
--------------------------------------------------------------------------------                                                                                                                                                                             
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.0.1.security_protocol=SASL_SSL.compression_types=.snappy                                                                                                  
status:     PASS                                                                                                                                                                                                                                             
run time:   2 minutes 6.033 seconds                                                                                                                                                                                                                          
--------------------------------------------------------------------------------                                              
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.1.1.compression_types=.none                                                                                                                               
status:     PASS                                                                                                                                                                                                                                             
run time:   1 minute 34.356 seconds                                                                                           
--------------------------------------------------------------------------------                                                                                                                                                                             
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.1.1.security_protocol=SASL_SSL.compression_types=.lz4                                                                                                     
status:     PASS                                                                                                              
run time:   2 minutes 8.580 seconds                                                                                                                                                                                                                          
--------------------------------------------------------------------------------                                                                                                                                                                             
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.2.2.compression_types=.none                                                                                                                               
status:     PASS                                                                                                                                                                                                                                             
run time:   1 minute 31.125 seconds                                                                                                                                                                                                                          
--------------------------------------------------------------------------------                                                                                                                                                                             
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.2.2.security_protocol=SASL_SSL.compression_types=.zstd                                                                                                    
status:     PASS                                                                                                                                                                                                                                             
run time:   2 minutes 9.064 seconds
--------------------------------------------------------------------------------
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.3.1.compression_types=.none 
status:     PASS
run time:   1 minute 33.144 seconds
--------------------------------------------------------------------------------
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.3.1.security_protocol=SASL_SSL.compression_types=.zstd
status:     PASS
run time:   2 minutes 15.622 seconds
--------------------------------------------------------------------------------
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.4.1.compression_types=.none 
status:     PASS
run time:   1 minute 34.951 seconds
--------------------------------------------------------------------------------
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.4.1.security_protocol=SASL_SSL.compression_types=.zstd
status:     PASS
run time:   2 minutes 10.738 seconds
--------------------------------------------------------------------------------
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.5.0.compression_types=.none 
status:     PASS
run time:   1 minute 40.067 seconds
--------------------------------------------------------------------------------
test_id:    kafkatest.tests.core.downgrade_test.TestDowngrade.test_upgrade_and_downgrade.version=2.5.0.security_protocol=SASL_SSL.compression_types=.zstd
status:     PASS
run time:   2 minutes 11.798 seconds
--------------------------------------------------------------------------------

version=kafka_version)
self.producer.start()

static_membership = kafka_version == DEV_BRANCH or kafka_version >= LATEST_2_3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why does static membership make a difference here?

@lbradstreet lbradstreet Apr 20, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question, without it the verifiable consumer fails with:

usage: verifiable-consumer [-h]                                                                                                                                                                                                                              
                           --broker-list HOST1:PORT1[,HOST2:PORT2[...]]                                                                                                                                                                                      
                           --topic TOPIC --group-id GROUP_ID                                                                                                                                                                                                 
                           --group-instance-id GROUP_INSTANCE_ID                                                                                                                                                                                             
                           [--max-messages MAX-MESSAGES]                                                                                                                                                                                                     
                           [--session-timeout TIMEOUT_MS] [--verbose]                                                                                                                                                                                        
                           [--enable-autocommit]                                                                                                                                                                                                             
                           [--reset-policy RESETPOLICY]                                                                                                                                                                                                      
                           [--assignment-strategy ASSIGNMENTSTRATEGY]                                                                                                                                                                                        
                           [--consumer.config CONFIG_FILE]                                                                                                                                                                                                   
verifiable-consumer: error: argument --group-instance-id is required                                                                                                                                                                                         

I assumed that this check was added for a reason, however maybe it's being to strict or buggy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe it's due to 2.4 accidentally requiring --group-instance-id and in this test we end up using this version. See 0f995ba

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I could force static throttling to be used when the version is 2.4 or 2.3 and leave a comment if that works for you.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@abbccdda I changed the code to add a static_membership parameter to the test matrix. We simply avoid this for 2.4 where this is broken due to the command line validation in that release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@abbccdda friendly ping on this

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I see, makes sense.

@abbccdda abbccdda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@gwenshap

Copy link
Copy Markdown
Contributor

ok to test

@gwenshap

Copy link
Copy Markdown
Contributor

No failures, nice :)
Great update @lbradstreet and thanks for contributing.

@gwenshap gwenshap closed this in 4e1d6a3 Apr 29, 2020
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.

4 participants