fix(ci): daily-check shell从sh改为bash,修复PIPESTATUS Bad substitution #1023

Merged
xiaoxia merged 1 commits from fix/ci-daily-check-shell-bash into main 2026-07-27 11:39:29 +08:00
Owner

问题

daily-check.yml中4个step使用shell: sh但代码中用了${PIPESTATUS[0]}(bash专属特性),导致Bad substitution错误,3个业务测试job全部失败。

修复

将4个使用PIPESTATUS的step的shell从sh改为bash:

  • Production Smoke Test / smoke step
  • Staging API Integration Tests / smoke step
  • Staging API Integration Tests / Playwright step
  • Staging Browser E2E / Playwright step

验证

daily-check的5个job中,Performance Baseline Check和Daily Check Report已成功,说明CI基础设施正常。

Issue: #980

## 问题 daily-check.yml中4个step使用`shell: sh`但代码中用了`${PIPESTATUS[0]}`(bash专属特性),导致Bad substitution错误,3个业务测试job全部失败。 ## 修复 将4个使用PIPESTATUS的step的shell从sh改为bash: - Production Smoke Test / smoke step - Staging API Integration Tests / smoke step - Staging API Integration Tests / Playwright step - Staging Browser E2E / Playwright step ## 验证 daily-check的5个job中,Performance Baseline Check和Daily Check Report已成功,说明CI基础设施正常。 Issue: #980
xiaoxia self-assigned this 2026-07-27 11:29:07 +08:00
xiaoxia added 1 commit 2026-07-27 11:29:07 +08:00
fix(ci): daily-check 4个step shell从sh改为bash,修复PIPESTATUS Bad substitution
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 10s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m12s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m4s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 26s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 22s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 52s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 53s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 12s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 4m19s
AI Code Review / AI Code Review (pull_request) Successful in 2m45s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m50s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m1s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 5m15s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 19s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 27s
c72b95e79d
Collaborator

📊 审查概览

  • 整体评价:通过通过
  • 严重问题数量:0 个
  • 一般建议数量:0 个

需修改的问题(严重)

💡 改进建议(一般)

良好实践

  1. 显式声明 Shell 类型
    • shell: sh 修改为 shell: bash 是一个良好的实践,特别是当脚本逻辑依赖 Bash 特有的语法(如数组、特定的字符串操作或 [[ ]] 测试)时。这能确保在不同 CI 环境下(特别是 sh 可能指向 dash 或其他最小 shell 的环境)脚本行为的一致性和稳定性。

🤖 由 AI 代码审查机器人自动生成 | 2026-07-27 03:34:00 | 模型:

### 📊 审查概览 - 整体评价:通过通过 - 严重问题数量:0 个 - 一般建议数量:0 个 ### ❌ 需修改的问题(严重) 无 ### 💡 改进建议(一般) 无 ### ✅ 良好实践 1. **显式声明 Shell 类型** - 将 `shell: sh` 修改为 `shell: bash` 是一个良好的实践,特别是当脚本逻辑依赖 Bash 特有的语法(如数组、特定的字符串操作或 `[[ ]]` 测试)时。这能确保在不同 CI 环境下(特别是 `sh` 可能指向 `dash` 或其他最小 shell 的环境)脚本行为的一致性和稳定性。 --- <sub>🤖 由 AI 代码审查机器人自动生成 | 2026-07-27 03:34:00 | 模型: </sub> <!-- AI_CODE_REVIEW_AUTO_COMMENT -->
xiaoxia merged commit 561548c84c into main 2026-07-27 11:39:29 +08:00

🗑️ 预览环境已清理

PR #1023 已关闭或合并,对应的预览环境已被清理。

如有需要,可以重新打开 PR 来重新生成预览环境。

🗑️ **预览环境已清理** PR #1023 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Sign in to join this conversation.