Queued repo publish tasks latch on to the repo version of when the task was enqueued, which makes it useless for sync-and-publish operations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
There appears to be a race condition somewhere when syncing / publishing a repo. I have observed a situation where:
- While sync task was running I filed a publish task, which correctly entered a "waiting" state.
- The sync task succeeded, creating version 1 of the repo.
- The publish task started running about a tenth of a second later.
- The publish task succeeded about a tenth of a second after that, creating a publication for version 0.
- My repo didn't show up where I expected it to, since there was no content in version 0. Doing another publish correctly published version 1 and made my content available.
Given the above, I assume there must be a race condition somewhere that allows the Task state to be committed before the actual results of the sync are committed. This should not be, the sync should be hard finished before the task releases its lock on the resource.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported sequence: run a sync, queue a publish while it is running, and check which repository version the publish uses. Trace the sync and publish task completion and resource-lock release ordering; done means a queued publish waits for the sync results to be committed and publishes the new version rather than version 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100