Repository navigation
Description
Description of Bug
simvue/api/objects/artifact/fetch.py:168 (Artifact.get) and :331 (Artifact.from_run) yield:
| Artifact(_local=True, _read_only=True, identifier=_id, **_entry), |
But SimvueObject.__init__ unconditionally calls SimvueConfiguration.fetch() at construction — so every yielded artifact re-derives config from the process env and raises.
python-api/simvue/api/objects/base.py
Line 249 in 027bcba
| self._user_config: SimvueConfiguration = SimvueConfiguration.fetch( |
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.
python-api/simvue/api/objects/base.py
Lines 536 to 544 in 027bcba
| cls( | |
| is_read_only=True, | |
| identifier=_id, | |
| server_url=server_url, | |
| server_token=server_token, | |
| _local=True, | |
| **entry, | |
| ), | |
| ) |
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.
python-api/simvue/api/objects/folder.py
Line 371 in 027bcba
| _folders = Folder.get(filters=json.dumps([f"path == {path}"]), count=1) |
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
Activity