Problem query runs with beforeTime and afterTime, with exact time in minutes
まだ誰も着手していません。
評価
調査の方向性
TaskApi#getRuns がスタックトレースに現れる TasksApiImpl.java:501 から開始し、関連する InfluxDbClientTest.java:459 の呼び出しを調査します。afterTime と beforeTime がまったく同じ分になるケースを再現し、その後、リクエストが BadRequestException なしで runs を返すことを示す回帰テストを追加または更新します。
索引モデルが issue の本文から書いたものです。
説明
When execute TaskApi#getRuns with beforeTime and afterTime on exact time in minutes, it throws BadRequestException and can not get result.
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
- Set afterTime and beforeTime, with exact time
OffsetDateTime afterTime = OffsetDateTime.parse("2023-05-20T10:15:00+09:00");
OffsetDateTime beforeTime = OffsetDateTime.parse("2023-05-20T11:15:00+09:00");
Integer limit = 100;
InfluxDBClient client = getClient();
client.getTasksApi().getRuns(task.getId(), afterTime, beforeTime, limit);
Expected behavior:
Returns the runs without error, executed between afterTime and beforeTime.
Actual behavior:
Got BadGrammerExeception.
The reason is, TaskApi#getRuns ( and InfluxDB itself) expects afterTime and beforeTime as strictly rfc3339 format, but parameter value type is OffsetDateTime which is ISO-8601 format. Therefore, it formats timestamp as ISO-8601 format omitting some part when the timestamp is exact minute time.
HTTP status code: 400; Message: failed to decode request: parsing time "2023-05-20T10:15+09:00" as "2006-01-02T15:04:05Z07:00": cannot parse "+09:00" as ":"
com.influxdb.exceptions.BadRequestException: HTTP status code: 400; Message: failed to decode request: parsing time "2023-05-20T10:15+09:00" as "2006-01-02T15:04:05Z07:00": cannot parse "+09:00" as ":"
at com.influxdb.internal.AbstractRestClient.responseToError(AbstractRestClient.java:113)
at com.influxdb.internal.AbstractRestClient.execute(AbstractRestClient.java:84)
at com.influxdb.client.internal.TasksApiImpl.getRuns(TasksApiImpl.java:501)
at jp.co.iim.collie.ui.common.repository.influxdb.InfluxDbClientTest.taskTest(InfluxDbClientTest.java:459)
Specifications:
- Client Version: 6.7.0
- InfluxDB Version: InfluxDB 2.1.1
- JDK Version: OpenJDK 1.8.0_281
- Platform: CentOS 7
- 主要言語
- Java
- スター
- 477
- フォーク
- 129
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
influxdata/influxdb-client-java のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
influxdata/influxdb-client-java#849 · コメント 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
influxdata/influxdb-client-java#830 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
influxdata/influxdb-client-java の issue をすべて見る
似ている issue
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful オープンarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100