[Bug] #1791 删除插件打包步骤和 JDK 缓存后,3 个 CI 工具自测仍断言旧内容,preview 的 macOS CI 门禁持续失败

Đang mở Phù hợp với người mới
#1,797 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, node.js, typescript
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

Bắt đầu với hai trường hợp bị lỗi trong scripts/ci/common/ci-workflow-gates.test.mjs và assertMacJdkCacheConfiguration trong scripts/resources/test-verify-download-cache.mjs; so sánh các khẳng định của chúng với các tệp workflow và action hiện tại trong .github/. Xác nhận các mục bị xóa được mô tả cho #1791, sau đó cập nhật ba khẳng định đã lỗi thời trong khi vẫn giữ các kiểm tra gate còn lại. Hoàn tất khi cả hai lệnh trong các bước tái hiện đều chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

review: high
Platform / 平台

macOS

Area / 模块

Other / 其他

Lithe version / Lithe 版本

preview 5a54c41aa(源码,CI 工具自测)

Priority / 优先级

P1 / 尽快处理:使用体验大幅下降,但通常仍可继续使用

OS and architecture / 操作系统与架构

GitHub Actions macOS runner;本地 macOS 27.3 arm64 可同样复现

Environment / 环境信息

Node.js 内置 node --test;与 JDK、Maven、Rust 版本无关,测试只读取 .github/ 下的工作流和 action 文本。

Steps to reproduce / 复现步骤
  1. 检出 preview 5a54c41aa。
  2. 在仓库根目录运行 node --test scripts/ci/common/ci-workflow-gates.test.mjs。
  3. 运行 node scripts/resources/test-verify-download-cache.mjs。
  4. 或者查看 preview 上最近一次 ci-macos.yml 运行(run 42367182202):CI tooling tests 的 “Test release scripts and Markdown preview” 失败,macOS CI gate 的 “Verify required jobs” 跟着失败。
Expected behavior / 预期行为

CI 工具自测与当前工作流一致,全部通过。preview 和每个 ready PR 的 macOS CI 门禁不会因为这些测试而失败。

Actual behavior / 实际行为

一共 3 个用例失败,都是 #1791(0b7a2b5f1)引起的。该提交删掉了官方插件打包步骤和 macOS 依赖缓存里的 JDK 部分,但没有同步修改断言这些内容的测试:

  1. scripts/ci/common/ci-workflow-gates.test.mjs:386,用例 “plugin-only changes require the shared Swift lane and keep every native plugin check”:要求 ci-macos.yml 的 swift-tests job 有一个名为 Build and verify official plugin packages 的步骤。#1791 删掉了这个步骤(同一提交还删除了 release-official-plugins.yml),git log -S 显示它最后一次出现就在这个提交之前。
  2. 同一个文件 :446,用例 “plugin validation survives ordinary-suite failure but never cancellation or a failed build”:同样在找这个步骤,断言失败的原因相同。
  3. scripts/resources/test-verify-download-cache.mjs:108,assertMacJdkCacheConfiguration:要求 .github/actions/prepare-macos-dependency-cache/action.yml 有 jdk: 输入。#1791 把这个 action 删减了 81 行,JDK 缓存输入不在了。

影响:preview 上 ci-macos.yml 的 CI tooling tests 一直是红的,每个标记 ready 的 PR 在 macOS 门禁上都会失败,评审很难分清是不是本 PR 引入的问题。

建议修复方向:维护者确认 #1791 是有意删除插件打包步骤和 JDK 缓存的(Java/Maven/Gradle 已迁到独立插件仓库)。确认后删除或改写这 3 个用例里依赖已删内容的断言,保留其余门禁断言(例如 Run plugin-focused Swift tests 的 if 条件)。不要通过跳过整个测试文件来让它通过。

Logs or diagnostic output / 日志或诊断输出
✖ plugin-only changes require the shared Swift lane and keep every native plugin check
  AssertionError [ERR_ASSERTION]: expected one - name: Build and verify official plugin packages
  0 !== 1
      at block (scripts/ci/common/ci-workflow-gates.test.mjs:91:10)
      at TestContext.<anonymous> (scripts/ci/common/ci-workflow-gates.test.mjs:387:18)
✖ plugin validation survives ordinary-suite failure but never cancellation or a failed build
  AssertionError [ERR_ASSERTION]: expected one - name: Build and verify official plugin packages
      at TestContext.<anonymous> (scripts/ci/common/ci-workflow-gates.test.mjs:449:30)
AssertionError [ERR_ASSERTION]: macOS cache action must expose the JDK cache
✖ scripts/resources/test-verify-download-cache.mjs
Screenshots or recordings / 截图或录屏

N/A:纯命令行测试失败,日志已贴在上一节。

Checklist / 提交前检查
  • I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
  • I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
Ngôn ngữ chính
TypeScript
Star
1.8k
Fork
151
Merge trung bình
10 giờ 29 phút
Pull request đã merge (30 ngày)
407

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của 1lck/Lithe-IDEA

Tất cả issue của 1lck/Lithe-IDEA

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.