macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directory

Đang mở Phù hợp với người mới
#2,704 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
83/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, macos, rust
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

Bắt đầu với ba bài kiểm thử đang thất bại trong crates/registry-messaging/src/config.rs quanh các dòng 1798 và 1817, sau đó so sánh cách các bài kiểm thử cấu hình của sản phẩm khác xử lý thư mục tạm. Tái hiện lỗi trên macOS hoặc kiểm tra workflow đã lên lịch “macOS contributor gates”. Hoàn tất khi các bài kiểm thử sử dụng đường dẫn fixture đã được canonical hóa và chạy thành công, đồng thời giữ nguyên hành vi từ chối symlink của loader.

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

Mô tả

The scheduled "macOS contributor gates" workflow has failed on every run since at least 15 November (the runs for 7f47a330f6, a8e5e49efe, fd2a888614 and 4be684f206). The 19 November run, which tested 4be684f206, failed in "Direct Cargo binaries and database-free gates": three registry-messaging config tests fail on macOS.

  • config::tests::runtime_loader_accepts_an_owner_writable_file_in_a_private_directory (crates/registry-messaging/src/config.rs:1817): the loader refuses the file with platform.runtime-config.unsafe-file, "the runtime configuration path must not pass through" a symlink. The temporary directory is under /var/folders/..., and /var is a symlink to /private/var on macOS.
  • config::tests::runtime_loader_refuses_a_group_writable_ancestor and config::tests::runtime_loader_refuses_a_group_writable_file (config.rs:1798): the refusal arrives, but for the symlinked path, so the assertion that the message mentions "owned by root or the runtime user" fails.

Likely cause

The tests build their fixtures under the default temporary directory without canonicalising it. Linux has no symlink there, so CI on Linux passes. The loader's refusal of symlinked paths is intended. The tests probably need to canonicalise the temporary directory, as other products' config tests do.

Not checked

I did not check whether the earlier failing runs failed for the same reason. They failed in the same job.

Ngôn ngữ chính
Rust
Star
2
Fork
0
Merge trung bình
9 giờ 48 phút
Pull request đã merge (30 ngày)
151

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

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 registrystack/registry-stack

Tất cả issue của registrystack/registry-stack

Issue tương tự

Thêm issue về Rust

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.