filecache: TestGetFileToPublishedCopyIsWriteProtected fails when tests run as root
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #2703 de @cloudonly — cerrado sin fusionar
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 65/100
Línea de trabajo
La prueba que falla es TestGetFileToPublishedCopyIsWriteProtected en el paquete filecache. Revisa cómo las pruebas hermanas TestEvictUnusedRemovalFailureIsNotCountedFreed y TestEvictUnusedRetireFailureIsNotCountedFreed se omiten cuando os.Geteuid() es 0, y añade la misma protección. Se considera terminado cuando la prueba se omite como root y sigue pasando cuando se ejecuta como usuario sin privilegios. El issue #2703 se menciona como la corrección, así que confirma que no esté ya en curso antes de empezar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
TestGetFileToPublishedCopyIsWriteProtected asserts that a write through the consumer's hard link to a published cache entry fails. That depends on the published copy's mode bits, which root ignores, so the write succeeds and the test fails even though the tripwire is intact.
The sibling tests that depend on the same property already skip in this case (TestEvictUnusedRemovalFailureIsNotCountedFreed and TestEvictUnusedRetireFailureIsNotCountedFreed in the same package, plus the permission-sensitive tests in cmd/atelet). This one was missed.
GitHub Actions runs the unit tests as the unprivileged runner user, so CI stays green. The failure shows up anywhere go test runs as root: a root developer machine, or the common case of running the tests inside a container image that defaults to root.
The proposed fix is the same three-line os.Geteuid() == 0 skip the sibling tests use. I verified it on a Linux host: the test is skipped as root, and it still passes (the write is rejected) when run as an unprivileged user.
Fix: #2703
- Lenguaje dominante
- Go
- Estrellas
- 5k
- Forks
- 563
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 457
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de agent-substrate/substrate
-
claude-code-multiplex demo: agents cannot reach the Anthropic API (egress denied by default)Abiertoarea/demos area/network kind/bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
agent-substrate/substrate#2487 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: e2e color tests fail when NO_COLOR is setPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea/tests kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
agent-substrate/substrate#2465 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: snapshot download mishandles reader close errorsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea/storage kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
agent-substrate/substrate#2445 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: e2e script flag parsing is brokenPosiblemente ocupada @ericcurtin la tomó hace 11 días. Abiertoarea/dev-infra area/tests kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
agent-substrate/substrate#2217 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
docs/api-guide.md: "an actor occupies its whole worker" contradicts multi-actor workersPosiblemente ocupada @ericcurtin la tomó hace 12 días. Abiertoarea/api kind/docs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
agent-substrate/substrate#2152 ·
Los mantenedores suelen responder en 1 día
Todos los issues de agent-substrate/substrate
Issues similares
-
effort:high model:sonnet phase:3 type:docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OffchainLabs/nitro#4771 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
BurntSushi/toml#530 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 7 días