parse-community / parse-dashboard

A dashboard for managing Parse Server
https://parseplatform.org
Other
3.73k stars 1.38k forks source link

Reload Cloud Config param before updating #2567

Open mtrezza opened 1 month ago

mtrezza commented 1 month ago

New Feature / Enhancement Checklist

Current Limitation

When updating the value of a Cloud Config param, the value may have been updated between the time of loading the Cloud Config page and the time of sending the update to the server. This causes any updates made within that timespan to be overwritten.

Feature / Enhancement Description

Before updating a Cloud Config param reload the current value from the server and compare it with the previous value that will be overwritten. If the current value provided by the sever is different than the previous value stored locally by the dashboard, then show a warning message that changes will be overwritten.

This doesn't prevent edge cases like a race condition, in which a value change occurs between the dashboard fetching the current value from server and sending the updated value to the server. This is really on possible with atomic updates.

Example Use Case

  1. Bowser window 1: Open dashboard, navigate to Cloud Config page.
  2. Bowser window 2: Open dashboard, navigate to Cloud Config page.
  3. Bowser window 2: Edit a param and save it.
  4. Bowser window 1: Edit the same param and save it --> should display warning, as browser window 1 already updated value.
parse-github-assistant[bot] commented 1 month ago

Thanks for opening this issue!