builder icon indicating copy to clipboard operation
builder copied to clipboard

cleaner repo deletion inconsistencies

Open smothiki opened this issue 8 years ago • 9 comments

Right now cleaner calls k8s namespace to check for app existence and starts cleaning repos.

  • Edge cases an app created and namespace not yet created there is a chance that cleaner cleans this APP directory .

smothiki avatar Feb 29 '16 22:02 smothiki

solution is to call workflow to get all apps created rather than relying on k8s namespace.

smothiki avatar Feb 29 '16 22:02 smothiki

:+1: to ^^

arschles avatar Feb 29 '16 22:02 arschles

@helgi thoughts on this? earlier we had decided to use the k8s API and not to use the controller API to get the list of valid apps

arschles avatar Feb 29 '16 22:02 arschles

I'm still not clear why we can't use the k8s API. The events api and many other things are used by the controller to handle state like that.

If that's the route we have to go to get a more stable idea of what apps are around then so be it but it goes against trying to make components more self sufficient. That can be solved later if k8s gets its act together tho

helgi avatar Feb 29 '16 22:02 helgi

maybe @smothiki can expand, but my understanding is that an app may exist in the DB but the namespace may not yet exist. currently if the cleaner runs in that window, it'll clean the app's directory

arschles avatar Feb 29 '16 22:02 arschles

@helgi I totally forgot about k8s events API rather than polling k8s API for every APP. Lets listen to even stream for deleted event for an APP and delete that particular directory

smothiki avatar Feb 29 '16 22:02 smothiki

@arschles any comments on above proposal

smothiki avatar Feb 29 '16 22:02 smothiki

nope, that sounds like a good plan. I can get started on at least a prototype shortly

arschles avatar Feb 29 '16 22:02 arschles

moving this to next sprint

smothiki avatar May 23 '16 22:05 smothiki