simvue-io / simvue-io/python-api
Filter format inconsistent with UI
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 4
- Fork
- 1
- Merge trung bình
- 5 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ điểm vào Client.get_runs() được nêu trong phần tái hiện và theo dõi cách đối số bộ lọc của nó được định dạng cho yêu cầu runs. Tái hiện ví dụ gồm hai bộ lọc trong issue, sau đó xác minh rằng cả chuỗi && của UI lẫn định dạng danh sách hiện có đều truy xuất được runs mà không gặp lỗi 422.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- api
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100