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

Aberta Para iniciantes
#2,704 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
83/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github-actions, macos, rust
Domínio
ci-cd, testing

Direção de pesquisa

Comece pelos três testes com falha em crates/registry-messaging/src/config.rs perto das linhas 1798 e 1817; em seguida, compare como os testes de configuração de outros produtos lidam com diretórios temporários. Reproduza as falhas no macOS ou inspecione o workflow programado “macOS contributor gates”. O trabalho estará concluído quando os testes usarem um caminho de fixture canonicalizado e passarem, preservando o comportamento do loader de recusar symlinks.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
2
Forks
0
Merge médio
9h 48min
PRs com merge (30d)
151

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de registrystack/registry-stack

Todas as issues de registrystack/registry-stack

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.