Applications at the repository root are not triggered by new commits

Abierto Apto para principiantes
#7,639 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@Daksha1611 ya está trabajando en esto.

Desde el 14/11/2026.

  • #7640 de @Daksha1611 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go
Área
ci-cd

Línea de trabajo

El error está en isTouchedByChangedFiles en pkg/app/pipedv1/trigger/determiner.go y pkg/app/piped/trigger/determiner.go, que añade una barra diagonal a la ruta de la aplicación, por lo que . se convierte en ./ y nunca coincide con rutas modificadas como deployment.yaml. Empieza leyendo esa función y ejecutando las pruebas de trigger existentes, luego añade un caso para la ruta raíz. Está terminado cuando isTouchedByChangedFiles(".", nil, nil, []string{"deployment.yaml"}) devuelve true en ambos paquetes y onCommit.ignores sigue excluyendo los archivos que coinciden.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What happened:

When an application config is placed at the root of the repository, the application path is .. New commits that change files in the repository do not trigger a deployment for it, unless onCommit.paths matches the changed file. The first deployment still runs because there is no previous commit to compare with.

isTouchedByChangedFiles adds a slash to the application path, so . becomes ./, and then checks whether each changed file starts with it. Git returns paths like deployment.yaml, so the check never matches. The same code is in pkg/app/pipedv1/trigger/determiner.go and pkg/app/piped/trigger/determiner.go.

What you expected to happen:

A change anywhere in the repository should trigger an application at the root, the same way a change under app/demo triggers an application in app/demo. onCommit.ignores should still apply.

How to reproduce it:

  1. Put app.pipecd.yaml at the root of the repository and register the application.
  2. After the first deployment, push a commit that changes deployment.yaml at the root.
  3. No new deployment is triggered.

I found this while reading the trigger code and checked it with a unit test. isTouchedByChangedFiles(".", nil, nil, []string{"deployment.yaml"}) returns false. I have not tried it on a running piped.

Environment:

  • piped version: master (5dc13c2b1)
  • control-plane version: not applicable
  • Others: affects both piped and pipedv1

I have a fix ready and will open a pull request for it.

Lenguaje dominante
Go
Estrellas
1.4k
Forks
391
Merge medio
4 d 1 h
PR fusionados (30 d)
58

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pipe-cd/pipecd

Todos los issues de pipe-cd/pipecd

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.