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

Ensure personal namespace is not a conflict with existing remote (or local) namespace #189

Open
richardreeve opened this issue Jan 7, 2022 · 1 comment

Comments

@richardreeve
Copy link
Member

We need to ensure that a user's personal namespace - set up by fair init - does not conflict with any remote copy of that namespace. This already happens with new namespaces registered in a fair pull. This issue arose from this conversation on Zulip:

And what happens if you do fair init and create your "user/scratch" namespace there - does it pull all of the remote namespaces first, so that it can prefill your personal namespace if possible and avoid conflicts at that point?

No it does not, I have not had time to address every scenario and I recommend we stick to a few leaving any others for a later release because the more we try to cover the less likely anything will be completed.

We need to make sure that fair init checks with the remote before creating a new namespace. A sequence of events that would ensure this (far from the only way - we could do other things!) could be:

  1. Retrieve the local and remote registry URLs during fair init questioning;
  2. Sync all of the namespaces from the remote to the local as already done in fair pull;
  3. When requesting persistent identifier URL of the user, search in local registry for a namespace that references it in its website: entry;
    a. If such a namespace exists, propose its name as the user's namespace at that point in the fair init question sequence;
  4. Whether a namespace exists or not using that website, when the namespace is chosen check the local namespace table to see if it exists;
    a. if so, prepopulate the website: or full_name: entries to ensure no conflict.

Happy for this to work in a different way of course...

@kzscisoft
Copy link
Collaborator

kzscisoft commented Jan 19, 2022

The version now on develop does the following:

  • Firstly pulls all namespaces from the remote and adds the names to a list.
  • If the user then tries to register the same namespace again it will be ignored.

This cannot happen only during fair init as the remote registry is dynamic and will very likely have changed AFTER fair init has been called so instead the local namespaces must (and are) updated from the remote during every major fair job.

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