[katello-devel] Why do we hide orgs being deleted

Justin Sherrill jsherril at redhat.com
Wed Dec 19 15:43:28 UTC 2012


On 12/19/2012 10:35 AM, Lukas Zapletal wrote:
> Hey,
>
> why do we do this? Can't we just make a notification that organization
> is being deleted and leave it there?
>
> At least the way how we do this today using default model scope is ugly
> and I see hacks in the code when we need to deal with organization
> references (unscoping it). Wouldn't be better just to hide organization
> in the list of organizations in the controllers (UI/API) not breaking
> the rest of the application?
>
> Or is the default scope necessary for different reason (orchestration)?
>
> Opinions?
>

So originally org deletion was made asynronous because it was taking too 
long (up to 10  minutes or so iirc).  We wanted to make sure that anyone 
within the org being deleted was logged out as soon as possible, and 
that the org didn't show up within other parts of the application while 
it was being deleted.  For example:

For an org in the process of being deleted you wouldn't want to:
* create permissions based on that org
* create environments in that org
* set a users default org to this org

Probably a few more.

Instead of hacking all of those locations (and probably missing a few), 
it seemed easier to make a default scope as there were fewer places that 
we would want to 'know about' an org being deleted than where we would 
want to ignore them.  This did not seem fairly troublesome at the time, 
however if it is causing issues, I'm not opposed to changing it.

There is no orchestration reason for it.

-Justin




More information about the katello-devel mailing list