Problem/Motivation

Follow-up to #3227122: Create a lock system to ensure only 1 update can be attempted at a time
Here is example of the problem that could happen.

  1. It's Tuesday and there is release coming on Wednesday.
  2. The site is on 9.3.0 but on Tuesday the latest version 9.3.1
  3. The site admin on Tuesday morning doesn't know what time the release is coming
  4. admin logs into site at 9am, sees the update 9.3.1(which could be security release also) and starts the updates
  5. The site admin makes it to the confirmation page so the update is not applied yet
  6. The admin has other tasks so goes away for a bit.
  7. The admin hears at 11am that new release which is actually 9.3.2 has just dropped.
  8. The admin opens a new tab to start the update to 9.3.2
  9. The admin sees an existing update(the 1 the admin started) and breaks the stage lock
  10. The admin gets to the confirmation page for 9.3.2 but does not apply
  11. The admin researches 9.3.2 release and realizes there is conflict when one their contrib modules and decide they actually should just update to 9.3.1 for now
  12. Now the admin has 2 tabs, one for 9.3.1. and another for 9.3.2
  13. The admin goes back to the 9.3.1 tab(which eventually will a message displaying the 9.3.1 version, needs follow-up) to continue the update(lets assume they fully understand what breaking the lock did)
  14. The admin confirms the update to apply the site.
  15. The admin thinks they updated 9.3.1😃
  16. The admin actually updated to 9.3.2 😿 because that was the current stage and they were the owner of that stage

right now this could happen now. It would be worse if this module or another actually gave the user a choice of all updates that were secure and didn't choose 1 for them. This would mean with the 2 tab scenario we would update a different one then what they choose.

further instead of 2 auto-updates the same problem where the 2nd stage operation in the confirmation state could be a Project Browser install. Going back to the first tab which would be a auto-updates tab would actually install the Project Browser selected projects.

Steps to reproduce

Proposed resolution

Return a unique stage-id from create() and add a new reclaimStage($unique) method that must be called before any other operations if create() was not called in the current request.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tedbow created an issue. See original summary.

tedbow’s picture

Issue summary: View changes
tedbow’s picture

Issue summary: View changes
tedbow’s picture

Status: Active » Needs review

tedbow’s picture

Status: Needs review » Needs work

I still need to update the UpdateReady form to save the stage id was passed in the URL and send it on to the batch operations.

phenaproxima made their first commit to this issue’s fork.

phenaproxima’s picture

Title: Create stage unique id to ensure stage is the exact stage on multiple sessions » Ensure that the stage is uniquely idenitfiable across multiple sessions
phenaproxima’s picture

Status: Needs work » Needs review
tedbow’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

phenaproxima’s picture

phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

  • phenaproxima committed 6b66b85 on 8.x-2.x authored by tedbow
    Issue #3250386 by tedbow, phenaproxima: Ensure that the stage is...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.