-
Notifications
You must be signed in to change notification settings - Fork 871
[COR-4] Cleanup generate_config #22079
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: devel
Are you sure you want to change the base?
Conversation
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 refactors the test configuration system by removing the dynamic job generation mechanism (add-yaml) and replacing it with an explicit kafka-driver-tests job definition. The changes simplify the configuration by eliminating magic job creation and moving Kafka-specific setup from the test definition file into the base CircleCI config.
Key changes:
- Removed
add-yamldynamic job generation logic fromgenerate_config.py - Added explicit
kafka-driver-testsjob inbase_config.ymlwith Kafka containers - Updated test definitions to reference the new job directly and use environment variables
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/kafka-test-definitions.yml | Removed add-yaml section and inline Kafka container definitions; updated to reference kafka-driver-tests job and use environment variables for hosts |
| .circleci/generate_config.py | Removed all add-yaml parsing and dynamic job generation logic; simplified function signatures by removing yaml_struct parameter |
| .circleci/base_config.yml | Added explicit kafka-driver-tests job with Kafka containers; extracted run-test command and refactored run-linux-tests to use it |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.circleci/generate_config.py
Outdated
| if 'init_command' in test['testfile_definitions']: | ||
| job['init_driver_repo_command'] = test['testfile_definitions']['init_command'] | ||
| else: | ||
| job['init_driver_repo_command'] = "" |
Copilot
AI
Nov 3, 2025
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.
This logic sets init_driver_repo_command to an empty string when not present, but the new kafka-driver-tests job hardcodes the command at line 727. Consider whether this empty string default is still needed or if it should be removed for consistency.
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.
I also dislike having this set/configured in two places.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| git reset --hard << pipeline.parameters.enterprise-commit >> | ||
| run-test: | ||
| parameters: |
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.
why isn't <<: *test-job-parameters used here as well?
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.
Because the parameter list is slightly different. We could factor out the shared parameters and put them into a separate achor though.
.circleci/generate_config.py
Outdated
| if 'init_command' in test['testfile_definitions']: | ||
| job['init_driver_repo_command'] = test['testfile_definitions']['init_command'] | ||
| else: | ||
| job['init_driver_repo_command'] = "" |
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.
I also dislike having this set/configured in two places.
Scope & Purpose
Previously we had a special
add-yamlattribute in thetests/kafka-test-definitions.ymland the generate_config would create a new job based on it. This PR instead adds an explicitkafka-driver-testswith all the containers and has the test-definition refer to that job. This way we avoid the whole magic of creating new jobs with some local yaml snippets.Note
Replaces add-yaml logic with explicit kafka-driver-tests job and refactors CI config/scripts to use shared test params and new driver/Kafka setup.
.shared-test-job-parameters) and reusable commands (clone-driver-repo,run-test).run-driver-testsandkafka-driver-tests(spins up Kafka brokers and schema registry; waits for readiness; setsKAFKA_HOST_LIST/KAFKA_SCHEMA_HOST).run-linux-teststo use shared params; addskafkaHostListpipeline parameter.add-yamlhandling; tests now specify target job viajobkey.init_command.job.add-yaml; points suite tokafka-driver-tests.kafkaHost/kafkaSchemaHostinstead of hardcoded hosts.Written by Cursor Bugbot for commit f43e88a. This will update automatically on new commits. Configure here.