Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle duplicate remote files in resources #33

Open
pcstout opened this issue Jun 5, 2019 · 1 comment
Open

Handle duplicate remote files in resources #33

pcstout opened this issue Jun 5, 2019 · 1 comment

Comments

@pcstout
Copy link
Member

pcstout commented Jun 5, 2019

We can end up with a remote file or directory having duplicate resource entries.
data_push/pull/remove/change will error if providing an identifier that matches more than one resource.

We need to decide how to handle these.

Example config showing duplicates (syn:syn18676190):

{
  "name": "syn:syn18676187",
  "version": null,
  "remote_uri": "syn:syn18676187",
  "id": "ba469348-59da-4d36-b4c2-a7112971be20",
  "rel_path": "data/core/data1/core/F1",
  "root_id": null,
  "data_type": "core"
},
{
  "name": "test_file_B.txt",
  "version": null,
  "remote_uri": "syn:syn18676190",
  "id": "a790ea4d-5866-4fc5-9a55-0e9c2040ef37",
  "rel_path": "data/core/data1/core/F1/F2/F3/test_file_B.txt",
  "root_id": "ba469348-59da-4d36-b4c2-a7112971be20",
  "data_type": "core"
},
{
  "name": "syn:syn18676190",
  "version": null,
  "remote_uri": "syn:syn18676190",
  "id": "9dabb5e2-8514-47a6-854f-ebaf57ab8c81",
  "rel_path": "results/data1/core/F1/F2/F3/test_file_B.txt",
  "root_id": null,
  "data_type": "results"
}
@hafen
Copy link
Member

hafen commented Jun 10, 2019

I may be missing something but I think it's fine to error if more than one entry of the same remote resource is attempted to be added to the project. The only case where I could see this being an issue is if someone wants to have two different versions of the same file in their project, but I would just say that we go ahead and say we don't support that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants