Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Filter format inconsistent with UI

未关闭
#831 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api

调研方向

从复现中提到的入口点 Client.get_runs() 开始,跟踪其过滤器参数如何为 runs 请求进行格式化。复现 issue 中的双过滤器示例,然后验证 UI 的 && 字符串和现有列表格式都能在不出现 422 错误的情况下获取 runs。

由索引模型根据 Issue 内容生成。

描述

backlog bug

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:

  1. Go to web UI
  2. Add two filters
  3. Copy filter string with the button on the UI, and paste into client.get_runs()
  4. 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
平均合并
7 天 6 小时
30 天内合并 PR
6

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

simvue-io/python-api 的其他 Issue

查看 simvue-io/python-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。