Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Some Client methods drop explicitly defined simvue args

Đang mở
#1,017 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

Start by comparing the credential forwarding in SimvueObject.get at simvue/api/objects/base.py:536-544 with Artifact.get and Artifact.from_run in simvue/api/objects/artifact/fetch.py, then inspect SimvueObject.__init__ at base.py:249. Trace Client.get_folder through get_folder_from_path in simvue/api/objects/folder.py as another example. Done means checking the object methods and ensuring explicitly supplied server URL and token reach each yielded object.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Description of Bug

simvue/api/objects/artifact/fetch.py:168 (Artifact.get) and :331 (Artifact.from_run) yield:

https://github.com/simvue-io/python-api/blob/027bcba8a79d0850d96397df51e3aa806836346a/simvue/api/objects/artifact/fetch.py#L168

But SimvueObject.__init__ unconditionally calls SimvueConfiguration.fetch() at construction — so every yielded artifact re-derives config from the process env and raises.
https://github.com/simvue-io/python-api/blob/027bcba8a79d0850d96397df51e3aa806836346a/simvue/api/objects/base.py#L249

Note the contrast: the inherited SimvueObject.get does forward server_url/server_token into the objects it yields — that's why runs/folders/metrics all work and only artifacts fail.
https://github.com/simvue-io/python-api/blob/027bcba8a79d0850d96397df51e3aa806836346a/simvue/api/objects/base.py#L536-L544

The hand-written Artifact.get/from_run just missed it. Client.list_artifacts (client.py:512) forwards credentials for the HTTP list call, but they're lost on the yielded objects.

Client.get_folder → get_folder_from_path (api/objects/folder.py) → Folder.get(filters=[...], count=1) also drops server_url/server_token.
https://github.com/simvue-io/python-api/blob/027bcba8a79d0850d96397df51e3aa806836346a/simvue/api/objects/folder.py#L371

I haven't checked all files, these are just the ones I happened to stumble across. Need to go through and check that each object passes through url and token correctly

Ngôn ngữ chính
Python
Star
4
Fork
1
Merge trung bình
22 giờ 21 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của simvue-io/python-api

Tất cả issue của simvue-io/python-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.