Applications at the repository root are not triggered by new commits

オープン 初心者向け
#7,639 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@Daksha1611 がすでに取り組んでいます。

2026年11月14日 から。

  • #7640 @Daksha1611 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
ci-cd

調査の方向性

バグは pkg/app/pipedv1/trigger/determiner.go と pkg/app/piped/trigger/determiner.go の isTouchedByChangedFiles にあります。この関数はアプリケーションパスの末尾にスラッシュを追加するため、. が ./ になり、deployment.yaml のような変更されたパスに決してマッチしません。まずこの関数を読み、既存のトリガーテストを実行してから、ルートパスのケースを追加してください。isTouchedByChangedFiles(".", nil, nil, []string{"deployment.yaml"}) が両方のパッケージで true を返し、onCommit.ignores が一致するファイルを引き続き除外すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
1.4k
フォーク
391
平均マージ
4日 1時間
マージ済み PR(30日)
58

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pipe-cd/pipecd のほかの issue

pipe-cd/pipecd の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。