-
Notifications
You must be signed in to change notification settings - Fork 96
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
Impossible to edit mirror when name is subset of other mirror #19
Comments
Edit on the last issue, this seems to be created with a previous version of mirrorbits, there was a MIRROR_z.os6.org key left in the redis database with no other keys / keydata with it. I've manually removed the offending key and was able to reuse the name. |
The naming issue also affects removing mirrors:
|
Nice catch! Thanks a lot :) |
just 'lucky' we had two similar names I guess. Thanks for the quick fix 👍 |
Any chance you could make it possible to change the descriptive name of the mirror ? |
Renaming a mirror is quite difficult currently since the mirror identifier is part of thousands of keys in the database. It would require to disable the mirror, replace all matching keys and take it back online. Another option would be to use an intermediate table but that would require a breaking database format change. Your best option here is to remove and add the mirror back but with a different name. |
@etix I see, well than we just must be careful not to make mistakes 👍 |
It's definitely on my TODO-breaking list, I just want to do all breaking changes at the same time, most certainly just before 1.0-stable. |
patch for editing names confirmed working, just tested adding a mirror with subsetname, was able to edit and remove it no problem. |
When there are two mirrors with very similar names the show command will fuzzy logic list both mirrors, in my opinion this is a good thing.
The issue however is threefold:
Example:
First I add a few mirrors called test.example.com and secondtest.example.com
It is clear this worked from the output of the show command
But I can't edit test.example.com
I proceed to remove secondtest.example.com so i can edit test.example.com
I then find out I can't edit the displayname of this mirror.
I end up removing it completely and recreating it with the new displayname
When I tried this previously I also was not able to recreate the same mirrorname, it complains the mirror already exists:
The text was updated successfully, but these errors were encountered: