[wp-meta] [Making WordPress.org] #8188: Prevent two import jobs running for the same plugin

Making WordPress.org noreply at wordpress.org
Wed Mar 4 06:13:08 UTC 2026


#8188: Prevent two import jobs running for the same plugin
------------------------------+--------------------
 Reporter:  dd32              |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:
Component:  Plugin Directory  |   Keywords:
------------------------------+--------------------
 At present there appears to be a race condition that can be triggered when
 a (larger plugin makes multiple commits in a short time span.

 Eg; (seconds past the minute)
  - :55 Commits change to trunk, including `Stable Tag: 1.0`
  - :00 SVN watcher runs, triggers plugin import job.
  - :01 Plugin import job starts (It's a big plugin, it'll take ~45s)
  - :25 Author commits /tags/1.0/
  - :30 SVN watcher runs, triggers plugin import job.
  - :31 Plugin import job starts, although the one that started at :01
 hasn't finished.
  - :46 Job 1 finishes, commit ZIPs to shared storage
  - :16 Job 2 finishes, something has happened that means things didn't
 actually happen as they're supposed to. Maybe the ZIPs didn't get
 committed due to a SVN conflict, Maybe the job bailed early because it
 wasn't expected, :shrug:


 I'm not 100% certain what's happening here, but it's clear it's happening
 ''sometimes'' when looking at the logs after complaints.

 Looking at the logs generated by the jobs, it's not clear what things ran
 into errors either; Currently most of the jobs simply handle error
 conditions, they don't verbosely log it.

 It would be ideal if we:
  - Updated the import jobs to be verbose about what they're seeing as they
 run
  - Updated the import jobs to verify that there isn't another job going to
 run (I think this mostly matters during job backlogs, where we can have
 dozens waiting for a slot to run) and combined them somehow / claimed a
 lock on them.
  - Generally ensured that we never can end up in a situation where we
 specify an update to download a ZIP file that turns out to be a 404.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/8188>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list