insight: valid two-year ranges fail when they span a leap day

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

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

まだ誰も着手していません。

評価

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

調査の方向性

既存のdetermineTimeRangeテストと、insightstoreにあるListCompletedDeploymentsの実装から始めてください。issueには再現可能なUnix秒の境界値のペアが示されており、空のフェイクファイルストアで十分だと書かれています。730日の上限が両端を含む暦日範囲にどう適用されるか確認してください。指定されたうるう日をまたぐ範囲を両方のInsightsチャートが受け入れ、2暦年を超えるリクエストは引き続き拒否されれば完了です。

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

説明

kind/bug

What happened

The Last 2 years filter in Insights can fail to load the deployment frequency and change failure rate charts. ListCompletedDeployments returns too large duration because the backend caps requests at 730 days, while the UI calculates the range using calendar years.

What you expected to happen

Both charts should load for valid two-year calendar ranges, including ranges that span a leap day. Requests beyond the two-year calendar limit should still be rejected.

How to reproduce it

  1. Use the clock from the existing determineTimeRange test (2024-06-15T12:00:00Z) with Daily and Last 2 years. The UI generates June 16, 2022 through June 15, 2024, inclusive.
  2. In an insightstore unit test, call ListCompletedDeployments with Unix-second bounds 1655337600 and 1718495999. An empty fake file store is sufficient.
  3. The call returns too large duration.

Environment

  • piped version N/A, reproduced in a unit test
  • control-plane version source checkout 2080402c2
  • Others Go 1.26.8
主要言語
Go
スター
1.4k
フォーク
403
平均マージ
2日 9時間
マージ済み PR(30日)
40

環境構築

はじめの一歩

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

pipe-cd/pipecd のほかの issue

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

似ている issue

Go の issue をもっと見る

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

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