Skip to content

Some Client methods drop explicitly defined simvue args #1017

Open

Description

@wk9874

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.

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.

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.

_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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions