Filter format inconsistent with UI
まだ誰も着手していません。
評価
調査の方向性
再現手順で示されているエントリーポイント Client.get_runs() から始め、そのフィルター引数が runs リクエスト向けにどのようにフォーマットされるかを追跡します。Issue にある 2 つのフィルターの例を再現し、そのうえで、UI の && 文字列と既存のリスト形式の両方で 422 エラーなしに runs を取得できることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Description of Bug
When you copy a filter with multiple different items from the UI, you get:
"folder.path == /GS2/test_data && metrics.mtm.last == 1"
But if you submit that via the Client class, you get an error:
RuntimeError: Retrieval of runs failed for url 'https://uk.simvue.io/api/runs?filters=%5B%22folder.path+%3D%3D+%2FGS2%2Ftest_data+%26%26+metrics.mtm.last+%3D%3D+1%22%5D&return_basic=True&return_metrics=True&return_alerts=False&return_system=False&return_metadata=True&count=100&start=0' with status 422: Invalid filter
We believe this is because the python API instead expects a list of filters, not '&&'. Could we fix it so that the python API accepts either format and converts it appropriately?
Steps To Reproduce
Steps to reproduce the behavior:
- Go to web UI
- Add two filters
- Copy filter string with the button on the UI, and paste into client.get_runs()
- See error
Expected behavior
Runs retrieved correctly
Actual Behaviour
422 error
Setup
- OS: Ubuntu
- Python version: 3.10
Additional context
Add any other context about the problem here.
- 主要言語
- Python
- スター
- 4
- フォーク
- 1
- 平均マージ
- 5日 8時間
- マージ済み PR(30日)
- 4
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
simvue-io/python-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
simvue-io/python-api#994 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
simvue-io/python-api#986 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
simvue-io/python-api#538 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
simvue-io/python-api#1004 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
simvue-io/python-api#1000 · コメント 2 件 ·
simvue-io/python-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
StevenBlack/hosts#3255 ·