Skip to content

[BUG] spk/spf info error with unknown object trying to find the object that provided a given filepath in the current runtime env #1321

@dcookspi

Description

@dcookspi

We've found the spk info /spfs/file/path and spfs info /file/path command can both error with unknown object when an object referenced in the current runtime environment stack is not in the local repo.

This can be replicated by entering an spk or spfs environment, picking one of the layers in the current runtime, removing it from your local repo, and then trying to run spk or spfs info with a /spfs/file/path that exists in the current envornment /spfs/ filesystem.

What seems to be happening is: both these invocations are trying to find the object that provided a given filepath in the current runtime env, but internally they use a combination of the current runtime and the local repo. They don't consider that repositories that the current runtime was created with. In the simplest case, without a per job repo, they don't check the local repo and fallback to the origin. And if you specify the origin with -r origin they can also error on a different unknown object - depending on what is in the local repo vs the origin one.

These commands should use the repos that made the current runtime, possibly set up a fallback proxy repo for using in their searchs - one that matches the one used to render the current environment. The problematic functions are: spfs:find_path_providers_in_spfs_runtime() and spk_storage::find_path_providers(). They both only used the local repo from the config.

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