Skip to content

MINOR: Fix requests version conflict with ducktape in tests/setup.py#21415

Merged
chia7712 merged 1 commit intoapache:trunkfrom
confluentinc:fix-cloud-tagging
Feb 7, 2026
Merged

MINOR: Fix requests version conflict with ducktape in tests/setup.py#21415
chia7712 merged 1 commit intoapache:trunkfrom
confluentinc:fix-cloud-tagging

Conversation

@tirthooo7
Copy link
Contributor

@tirthooo7 tirthooo7 commented Feb 5, 2026

Summary

Fix Python dependency conflict between requests and ducktape that
prevents kafkatest from being installed.

Problem

The tests/setup.py pins requests==2.32.4, but ducktape==0.12.0
internally requires requests==2.31.0. This causes pip to fail with :

ERROR: Cannot install kafkatest and kafkatest==4.3.0.dev0 because these
package versions have conflicting dependencies.
The conflict is caused by:
    kafkatest 4.3.0.dev0 depends on requests==2.32.4
    ducktape 0.12.0 depends on requests==2.31.0

This was introduced by dependabot PR #19940 which bumped requests from
2.31.0 to 2.32.4 without checking ducktape's transitive dependencies.

Solution

Change requests==2.32.4 to requests>=2.31.0. This allows pip to
install requests==2.31.0 (what ducktape needs) while still satisfying
the version constraint.

Changes

  • tests/setup.py: Change strict pin requests==2.32.4 to flexible
    requests>=2.31.0

Testing

System-test-Kafka-Branch-Builder - [Workflow] [21/21 tests
passed]
https://confluent-open-source-kafka-branch-builder-system-test-results.s3-us-west-2.amazonaws.com/fix-cloud-tagging/2026-02-06--001.7f5b8f9a-4837-486a-864c-b5ad3b17391f--1770366328--confluentinc--fix-cloud-tagging--4b6335ab0f/report.html

  • Test:
    tests/kafkatest/tests/client/client_compatibility_produce_consume_test.py

Notes

This is a minimal fix. An alternative would be upgrading to
ducktape==0.13.0 which requires requests==2.32.2, but that
introduces more changes and potential risk.

Reviewers: Manikumar Reddy manikumar.reddy@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

@github-actions github-actions bot added triage PRs from the community tests Test fixes (including flaky tests) small Small PRs labels Feb 5, 2026
@tirthooo7 tirthooo7 marked this pull request as ready for review February 6, 2026 08:54
@@ -49,7 +49,7 @@ def run(self):
license="apache2.0",
packages=find_packages(),
include_package_data=True,
install_requires=["ducktape==0.12.0", "requests==2.32.4", "psutil==5.7.2", "pytest==8.3.3", "mock==5.1.0"],
install_requires=["ducktape==0.12.0", "requests>=2.31.0", "psutil==5.7.2", "pytest==8.3.3", "mock==5.1.0"],
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth updating ducktape to 0.13.0 in this PR?

Copy link
Member

Choose a reason for hiding this comment

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

With the update, we can bump the lower bound to 2.32.2

Copy link
Contributor Author

@tirthooo7 tirthooo7 Feb 7, 2026

Choose a reason for hiding this comment

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

Hi @chia7712, thanks for the suggestion.

Based on this note:

# Note: when changing the version of ducktape, also revise tests/docker/Dockerfile

We also need to update Docker, which would be a larger change and would require running the full test suite. We can pick this up later.

For now, this conflict is blocking Ducktape system test execution. If we fix this it will be easy to test ducktape 0.13.0 in future.

Copy link
Member

Choose a reason for hiding this comment

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

@tirthooo7 you are right. I've opened https://issues.apache.org/jira/browse/KAFKA-20153 to be a follow-up

@github-actions github-actions bot removed the triage PRs from the community label Feb 7, 2026
@tirthooo7 tirthooo7 requested a review from chia7712 February 7, 2026 05:57
@chia7712 chia7712 merged commit 2df7c75 into apache:trunk Feb 7, 2026
36 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small Small PRs tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants