-
Notifications
You must be signed in to change notification settings - Fork 926
Add semaphore block for ducktape tests #2037
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this 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 a new Ducktape performance test block to the Semaphore CI configuration to enable testing of the confluent-kafka Python client using the ducktape framework.
- Adds a new CI job for running ducktape performance tests on Linux x64
- Configures environment setup including Python 3.9, ducktape framework, and Kafka cluster
- Implements test execution with CI-specific benchmark bounds configuration
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
.semaphore/semaphore.yml
Outdated
- cd tests/docker && ./bin/cluster_up.sh | ||
|
||
# Wait for Kafka to be ready | ||
- timeout 60 bash -c 'until docker-compose -f tests/docker/docker-compose.yaml exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; do echo "Waiting for Kafka..."; sleep 5; done' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded path 'tests/docker/docker-compose.yaml' in the timeout command doesn't match the working directory change in line 316. Since the script changes to 'tests/docker', the path should be relative: 'docker-compose.yaml' or use an absolute path.
- timeout 60 bash -c 'until docker-compose -f tests/docker/docker-compose.yaml exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; do echo "Waiting for Kafka..."; sleep 5; done' | |
- timeout 60 bash -c 'until docker-compose -f docker-compose.yaml exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; do echo "Waiting for Kafka..."; sleep 5; done' |
Copilot uses AI. Check for mistakes.
.semaphore/semaphore.yml
Outdated
- timeout 60 bash -c 'until docker-compose -f tests/docker/docker-compose.yaml exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; do echo "Waiting for Kafka..."; sleep 5; done' | ||
|
||
# Run standard ducktape tests with CI bounds | ||
- export BENCHMARK_BOUNDS_CONFIG=tests/ducktape/ci_bounds.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BENCHMARK_BOUNDS_CONFIG environment variable is being set twice - once in the env_vars section (line 290) and again as an export command. The duplicate export is redundant since the environment variable is already configured at the block level.
- export BENCHMARK_BOUNDS_CONFIG=tests/ducktape/ci_bounds.json |
Copilot uses AI. Check for mistakes.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
task: | ||
agent: | ||
machine: | ||
type: s1-prod-ubuntu24-04-amd64-3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, how is the machine type chosen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"s1-prod-" this is a production grade system, which is used by other semaphore jobs. IMO, its already timetested for this repository, so we should keep using it.
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | ||
CLUSTER_ID: 4L6g3nShT-eMCtK--X86sw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my knowledge, is this the cluster dedicated for kafka testing? https://github.com/search?q=org%3Aconfluentinc%204L6g3nShT-eMCtK--X86sw&type=code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes Each CI job spins up its own isolated Kafka container with this ID
Why
This PR enables automated performance testing of the Kafka Python client using the ducktape distributed testing framework.
What's Added
New Semaphore CI Block
Environment-Based Benchmark Configuration
Technical Implementation
Files Added/Modified
.semaphore/semaphore.yml
- New ducktape CI block with KRaft Kafka setuptests/ducktape/benchmark_bounds.json
- Environment-based performance boundstests/ducktape/benchmark_metrics.py
- Environment detection logictests/ducktape/run_ducktape_test.py
- Enhanced test runner with error handlingtests/docker/docker-compose.ducktape.yml
- Dedicated KRaft Kafka for CITesting PR
Benefits
Usage Examples