fix: update workflow reference and improve return value checks in CI scripts#34478
fix: update workflow reference and improve return value checks in CI scripts#34478guanshengliang merged 11 commits intomainfrom
Conversation
Summary of ChangesHello @tomchon, 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 enhancing the robustness and efficiency of the continuous integration (CI) pipeline. It includes a refinement to the return value checking mechanism in CI scripts, ensuring more accurate analysis. Additionally, the Dockerfile used for the CI environment has been updated to use newer Python and Rust versions, streamline dependency installations, and improve overall build process reliability by optimizing package management and .NET SDK installation. 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. Ignored Files
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.
Code Review
This pull request updates CI scripts and a Dockerfile. The changes to the Dockerfile include several good practices like version pinning and refactoring package installations. However, it contains a critical security vulnerability by hardcoding credentials for a pip index. The change in run.sh introduces a critical bug where an exit code check is applied to the wrong command, potentially leading to silent failures in the CI process. My review includes fixes for both of these critical issues.
There was a problem hiding this comment.
Pull request overview
This pull request updates CI infrastructure by modifying the workflow reference to use a feature branch for testing a git ref lock fix, and makes various updates to the Dockerfile and build scripts. However, the PR contains several critical issues that need to be addressed.
Changes:
- Updated GitHub workflow to reference
fix/clean-git-ref-lockbranch instead ofmain - Modified Dockerfile with Python and Rust version updates, apt source configuration changes, and improved dotnet installation
- Refactored shell script logic for handling build directory creation and return value checks
- Enhanced clang-tidy filter to include
isExpansionInMainFile()matcher
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/new-framework-test.yml | Changed workflow reference from @main to @fix/clean-git-ref-lock branch |
| tests/ci/dockerfile_ci | Updated Python to 3.9.25, Rust to 1.90.0, modified apt sources, changed dotnet installation method, added groff package, and moved TDinternal copy to end |
| test/ci/run.sh | Moved mkdir command inside conditional block, changing the return value check logic |
| test/ci/filter_for_return_values | Added isExpansionInMainFile() filter to improve clang-tidy matching |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/ci/run.sh
Outdated
|
|
||
| if [ $? -eq 0 ]; then | ||
| if is_local_host "${hosts[index]}"; then | ||
| mkdir "$build_dir" >/dev/null |
There was a problem hiding this comment.
The return value check on line 461 is now checking the wrong command. Before this change, mkdir "$build_dir" was executed first, then $? checked its return value. After this change, line 460 is blank and line 461's $? checks the return value of the previous command at line 456 (corefile=$(ls "$log_dir/${case_file}.coredump/" 2>/dev/null)), not the mkdir command which is now at line 463 inside the if block. This means the mkdir will always execute regardless of whether the directory creation would succeed, breaking the intended conditional logic. The mkdir command should be moved back before the if statement, or the if condition should be changed to directly check the mkdir result.
| if [ $? -eq 0 ]; then | |
| if is_local_host "${hosts[index]}"; then | |
| mkdir "$build_dir" >/dev/null | |
| mkdir "$build_dir" >/dev/null 2>&1 | |
| if [ $? -eq 0 ]; then | |
| if is_local_host "${hosts[index]}"; then |
…mize Dockerfile commands
…ion and adding comments for clarity
…arifying directory usage
https://project.feishu.cn/taosdata_td/defect/detail/6619834585
https://project.feishu.cn/taosdata_td/defect/detail/6589434935