You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue intent is to track changes, which will allow deterministic evaluation of the resource changes.
Currently the detection of the plan updates in UI is implemented based on assumptions, which does not guarantee recognition of such changes. Proposed algorithm is intended to fix this issue.
The steps for that are the following. Openshift API usually returns the updated/created object as a response to an HTTP operation like GET, PUT, POST and PATCH. This object is the one, registered by the kubernetes cluster, and contains the initial values assigned by it.
Therefore the returned response should be the source of truth for any further operations, not the one returned however long after by a following GET request.
So, for any PUT, POST or PATCH operation we expect to:
Store the return value for the operation in the redux state.
Any response to GET later on should be processed and used only when it differs from initial one, in the metadata.generation field.
If the represented resource state does not contain expected value, return and execute the step 1 with the current value of the resource.
Here is how I would imagine that:
letupdatedPlan=yieldclient.patch(...);updatedPlan=yieldwaitForGenerationUpdate(updatedPlan.data);// Result equals expected state or:updatedPlan=yieldwaitForGenerationUpdate(updatedPlan.data);
function*planReconcileWatch(plan){constretries=10;constplanGeneration=plan.planValues.metadata.generation;try{for(letrequestNumber=0;requestNumber<retries;requestNumber++){constupdatedPlan=yieldcall(getPlan,plan.planValues.metadata.name);if(updatedPlan.metadata.generation!==planGeneration){break;}yielddelay(ReconcilePollPeriod);}}catch(err){yieldput(AlertActions.alertError('Error during plan reconcile'+err));}finally{yieldput(PlanActions.stopPlanReconcilePolling());}}
This would allow resource editation on the fly, and with the single action (which will be generic for every resource) prevent any updates or unnecessary operations on a resource with is in a Reconcile in progress state, from the UI perspective.
The text was updated successfully, but these errors were encountered:
This issue intent is to track changes, which will allow deterministic evaluation of the resource changes.
Currently the detection of the plan updates in UI is implemented based on assumptions, which does not guarantee recognition of such changes. Proposed algorithm is intended to fix this issue.
The steps for that are the following. Openshift API usually returns the updated/created object as a response to an HTTP operation like GET, PUT, POST and PATCH. This object is the one, registered by the kubernetes cluster, and contains the initial values assigned by it.
Therefore the returned response should be the source of truth for any further operations, not the one returned however long after by a following GET request.
So, for any PUT, POST or PATCH operation we expect to:
metadata.generation
field.Here is how I would imagine that:
This would allow resource editation on the fly, and with the single action (which will be generic for every resource) prevent any updates or unnecessary operations on a resource with is in a
Reconcile in progress
state, from the UI perspective.The text was updated successfully, but these errors were encountered: