-
Notifications
You must be signed in to change notification settings - Fork 5k
feat: unique getBuildPath invoke and ignore .git branch name contain … #33233
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
Conversation
Summary of ChangesHello @SallyHuo-TAOS, 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 focuses on refactoring the test framework's utility functions to enhance modularity and efficiency. It centralizes the logic for locating build paths into a shared utility module and introduces a mechanism to skip version control directories during path searches. These changes aim to make the test suite more robust and easier to manage. Highlights
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
|
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.
Code Review
This pull request is a great refactoring effort to centralize the getBuildPath logic into tdCom.getBuildPath(), removing a lot of duplicated code across the test suite. This significantly improves maintainability. The change to ignore .git directories during path searches is also a good improvement.
I've found one critical issue where an incomplete refactoring introduces a syntax error, and one minor issue with a duplicated import. Please see the detailed comments.
test/cases/41-StreamProcessing/23-Compatibility/test_compatibility_cross_version.py
Outdated
Show resolved
Hide resolved
Refactor test_subscribeDb0.py to improve readability and maintainability.
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 optimizes path-finding functions and removes duplicate code across the test framework. The changes consolidate duplicated getBuildPath implementations by replacing them with calls to a shared tdCom.getBuildPath() utility function, and add .git directory filtering to prevent unnecessary directory traversal during build path searches.
- Removes duplicate
getBuildPathmethod implementations across 50+ test files - Adds
.gitdirectory filtering to improve search efficiency in path-finding utilities - Consolidates path-finding logic by using shared
tdCom.getBuildPath()function
Reviewed Changes
Copilot reviewed 75 out of 75 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/new_test_framework/utils/pathFinding.py | Added .git directory exclusion to getTaosdemoPath and getTDenginePath methods |
| test/new_test_framework/utils/common.py | Added .git directory exclusion to getBuildPath method |
| test/new_test_framework/utils/before_test.py | Added .git directory exclusion to getPath method |
| test/cases/uncatalog/system-test/99-TDcase/*.py | Removed duplicate getBuildPath methods and updated imports to use tdCom |
| test/cases/uncatalog/system-test/7-tmq/*.py | Removed duplicate getBuildPath methods and replaced calls with tdCom.getBuildPath() |
| test/cases/uncatalog/system-test/6-cluster/*.py | Removed duplicate getBuildPath methods from cluster test files |
| test/cases/uncatalog/system-test/2-query/*.py | Updated query test files to use tdCom.getBuildPath() |
| test/cases/uncatalog/system-test/0-others/*.py | Consolidated path-finding logic in miscellaneous test files |
| test/cases/70-Node/05-Cluster/*.py | Removed duplicate implementations from cluster node tests |
| test/cases/41-StreamProcessing/*.py | Updated stream processing tests to use shared utility |
| test/cases/10-DataIngestion/*.py | Consolidated path-finding in data ingestion tests |
| test/cases/04-SuperTables/*.py | Updated super table tests to use shared utility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
|
|
Copilot
AI
Oct 14, 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.
Unnecessary blank line added at the end of the file. Consider removing this trailing whitespace.
| tdLog.success(f"{__file__} successfully executed") | ||
|
|
||
| event = threading.Event() | ||
|
|
Copilot
AI
Oct 14, 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.
Unnecessary blank line added at the end of the file. Consider removing this trailing whitespace.
feici02
left a comment
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.
LGTM
…binary name
Description
Please briefly describe the code changes in this pull request.
Checklist
Please check the items in the checklist if applicable.