Skip to content

New fetch goes crazy if you have duplicate projects locally #1235

@josephjclark

Description

@josephjclark

When using new pull/fetch (probably checkout too), if you have multiple copies of the same project saved locally, you'll get a "MultipleMatchingProjectError"

This makes sense on the face of it and is by design: which local project file do you want to use when specifiying an id? We generally assume you'll only have each project once.

But in practice you might have a backup, or a merge duplicate, or a local export. Maybe you ran fetch staging -o staging.yaml, and now staging is duplicated.

We need to work out a solution for these cases. If it's a duplicate it doesn't really matter right? The project details are the same. That error throws for ambiguity: it work on the principle that there are two projects with the same alias, or you've passed a partial UUID and it's matched two projects. But if there are multiple matches with the same UUID, that's probably fine.

We may also have to consider if you checkout staging, and there is a backup project, which one is used? Likely we should prefer the one in the main projects folder - that's the "official" one, and the others probably shouldn't even be discovered.

So ok, this might be resolved in the Workspace by only scanning the projects dir for project yamls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    DevX Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions