-
Notifications
You must be signed in to change notification settings - Fork 8
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
CSS-9588 Enforce stricter model name uniqueness #1272
Conversation
379d1b2
to
03107b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but can we surface a nice error for this in the addmodel call? Like check for this db err and return a nicer string to the user?
The error returned is shown in the test added to
Did you want something different from that? |
Yeah something like uhhhhm, I'm bad at this but try word this better: model X already exists on controller N I think telling the user what controller it's on is actually kinda useful? Or maybe it isn't... Idk in my head it felt nice |
It's a nice idea, but I think it's preferable to not expose that information since JIMM wants to act as a single controller. |
Description
This PR resolves an issue where a user could create a model with the same name on multiple controllers and because the model owner was the same across these models, Juju clients would behave poorly. The CLI for example would never let you switch between these two models with the same name and owner.
This behaviour is better as it matches Juju's behaviour.
Fixes CSS-9588
Engineering checklist