tests: fix next gen integration TiDB startup flakiness#4278
tests: fix next gen integration TiDB startup flakiness#4278wlwilliamx wants to merge 1 commit intopingcap:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary of ChangesHello @wlwilliamx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses flakiness in next-gen TiDB integration tests by rectifying issues in how TiDB configuration files are generated and by improving test environment cleanup. The changes ensure that TiDB starts reliably by adhering to its configuration parsing rules and prevent background processes from accumulating, leading to more stable and predictable test runs. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe changes fix configuration key placement issues in TiDB/TiKV config generation for next-gen integration tests and add process cleanup. They reorganize options between root and section levels, rework socket configuration handling, expand TLS settings, and introduce consumer process termination in cluster shutdown to prevent resource leaks. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request addresses flakiness in next-generation integration tests by correcting TiDB configuration generation and improving the test cleanup process. The changes relocate TiDB configuration options to their proper sections within the TOML files, and fix the socket configuration generation to ensure it's a root-level setting. Furthermore, the stop_tidb_cluster script is updated to kill leftover cdc_pulsar_consumer processes, preventing resource leaks between test executions. I have one minor suggestion to enhance the robustness of temporary file creation in a shell script.
| } >"$config_file.tmp" | ||
| mv "$config_file.tmp" "$config_file" |
There was a problem hiding this comment.
Using a fixed temporary filename like .tmp can be problematic if multiple instances of this script run concurrently. To make the temporary filename unique and avoid potential race conditions, consider appending the process ID ($$). A more robust solution would be to use mktemp.
} >"$config_file.tmp.$$"
mv "$config_file.tmp.$$" "$config_file"
|
/test pull-cdc-pulsar-light-integration-test-next-gen |
|
@wlwilliamx: The specified target(s) for The following commands are available to trigger optional jobs: Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/test pull-cdc-pulsar-integration-light-next-gen |
|
/test pull-cdc-pulsar-integration-heavy-next-gen |
|
/test next-gen |
3 similar comments
|
/test next-gen |
|
/test next-gen |
|
/test next-gen |
|
@wlwilliamx: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #4277
What is changed and how it works?
socketandmax-server-connectionsat root level.run-auto-analyze/server-memory-quotaunder[performance]so TiDB won't treat them as invalid options.stop_tidb_clusterkills leakedcdc_pulsar_consumerto avoid accumulating background processes across cases/groups.Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
Summary by CodeRabbit
Tests
Chores