Release CLI artifact deletes runtime-overlays/mdi-native, so every mdi-native recipe fails missing-path

Đang mở
#2,611 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
75/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ệ
php, typescript
Lĩnh vực
build-system, cli

Hướng nghiên cứu

Read scripts/package-release-artifact.ts and packages/cli/src/recipe-sources.ts to trace how packaging removes runtime-overlays/ and where the MDI archive is resolved. Check the packaged tree against BUNDLED_MDI_NATIVE_ARCHIVE and the pinned revision in provenance.json; done means the release artifact contains the matching archive and packaging fails if it is missing.

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

Mô tả

Problem

The release CLI artifact (wp-codebox-cli-<platform>-<arch>.tar.gz) has no runtime-overlays/mdi-native/ archive. Any recipe using wp-codebox:mdi-native, including wordpress.phpunit --database-type=mdi-native, fails validation:

RecipeValidationError [missing-path] $.inputs.extra_plugins[2].source: File does not exist: …/wp-codebox-cli/runtime-overlays/mdi-native/markdown-database-integration-4cf0a57.zip

Downstream, every homeboy review test data-machine-events run fails with PHPUNIT_ZERO_TESTS_FAILED (195 test files, 0 executed): on main (https://github.com/Extra-Chill/data-machine/actions/runs/46828923017), on Extra-Chill/data-machine#4216, and locally.

Evidence

tar -tzf wp-codebox-cli-linux-x64.tar.gz | grep runtime-overlays on v0.34.5 returns nothing.

Root cause

In scripts/package-release-artifact.ts, materializePinnedPhpWasmOverlay() copies the php-wasm overlays into node_modules/@php-wasm/node-8-x, then runs rm(join(root, "runtime-overlays")). That deletes the whole directory, including runtime-overlays/mdi-native/. But packages/cli/src/recipe-sources.ts resolves BUNDLED_MDI_NATIVE_ARCHIVE to ../../../runtime-overlays/mdi-native/markdown-database-integration-<rev>.zip, relative to packages/cli/dist.

Target state

  • The release artifact keeps runtime-overlays/mdi-native/ (the zip plus provenance.json). Only the php-wasm overlay sources that were moved into node_modules get removed.
  • A packaging assertion (in the packaging script or a test) fails the release build if the archive that BUNDLED_MDI_NATIVE_ARCHIVE points to is missing from the packaged tree. The same check would also catch drift between the pinned revision and the archive file.
  • Optional: one source of truth for the pinned MDI revision. recipe-sources.ts and runtime-core/src/recipe-builders.ts both hard-code it today, and provenance.json already records it.

Secondary: stale local build

On the shared host, /usr/bin/wp-codebox → /var/lib/datamachine/workspace/wp-codebox/packages/cli/dist/index.js still has the 49ec937 path compiled in, while the source and checked-in zip are 4cf0a57. Rebuilding the checkout fixes that host. This issue is about the release artifact.

Ngôn ngữ chính
TypeScript
Star
19
Fork
4
Merge trung bình
35 phút
Pull request đã merge (30 ngày)
11

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 Automattic/wp-codebox

Tất cả issue của Automattic/wp-codebox

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.