kappnav / issues

kAppNav global issues
0 stars 0 forks source link

Resource updates are ignored when resourceversion has a conflict #153

Closed k8vance88 closed 4 years ago

k8vance88 commented 4 years ago

If you open 2 tabs in a browser to edit the same object (any editable object in kappnav), then if you make an edit and save in one tab, then the resource version is updated for the object. Then if you switch to the other tab, you'll have a yaml file with an out of date resource version. So now if you make a change and save, the api returns a 207 conflict. {"message":"Conflict"}

We do not handle the 207 as an error, so it just looks like it worked. But in reality it didn't make the change. We need to handle the 207 conflict on every PUT operation, possibly on a POST as well. To handle, we need to create an error message to explain to the user they they must first refresh the object yaml (or panel perhaps, depending on the case) and try the edit again.