Error fetching monitor with mtd cummulative window starting on custom day
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb の issue で参照されている month_starts のバリデーションから始め、client.get_monitor(306920871) またはカスタムの開始日を使用する同等の month-to-date モニターで失敗を再現します。完了条件は、そのようなモニターの取得と一覧表示で、報告された ArgumentError が発生しなくなることです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
If I create a monitor with a custom starting day (eg: 17) for a month long cumulative window, trying to get the monitor, or list the monitor results in an exception being thrown.
ArgumentError: invalid value for "month_starts", must be smaller than or equal to 1.
To Reproduce
Create a metric monitor with a cummulative window, month to date, starting on any date but 1.
Example:
{
"id": 306920871,
"name": "wesley datadog api bug with custom start date for month to date",
"type": "query alert",
"query": "avg(current_1mo):avg:system.load.1{*} > 100",
"message": "",
"tags": [],
"options": {
"thresholds": {
"critical": 100
},
"notify_audit": false,
"on_missing_data": "default",
"include_tags": false,
"scheduling_options": {
"evaluation_window": {
"month_starts": 17,
"day_starts": "00:00",
"timezone": "UTC"
}
},
"new_host_delay": 300
},
"priority": null,
"draft_status": "draft",
"assets": []
}
Attempt to fetch the monitor by id
client.get_monitor(306920871)
Expected behavior
No exception raised.
The generated code for month_starts= seems overly strict in this case
Environment and Versions:
Ruby: 3.3.11
Version: 2.32.0
Additional context
Add any other context about the problem here.
- 主要言語
- Ruby
- スター
- 45
- フォーク
- 20
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 81
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataDog/datadog-api-client-ruby のほかの issue
-
kind/bug stale
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
DataDog/datadog-api-client-ruby#2063 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
kind/feature-request stale
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
DataDog/datadog-api-client-ruby#1438 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
DataDog/datadog-api-client-ruby の issue をすべて見る
似ている issue
-
Add Zammad対応中かも @Arslan-TR が今日担当しました。 オープンrequest
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
endoflife-date/endoflife.date#11298 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
performance v/6
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
WITCodingClub/calendar-backend#689 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
rubys/roundhouse#571 ·
メンテナーはふだん 1 日以内に返信
-
area/web interface
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mastodon/mastodon#40924 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信