Making WordPress.org

Opened 6 weeks ago

#8188 new defect (bug)

Prevent two import jobs running for the same plugin

Reported by: dd32's profile dd32 Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.