When creating a new repository (thus: empty repository version), we ought to trigger the `on_new_version()` hook
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
If a user sets up a new RPM (or file) repository, they will receive HTTP 404s when they attempt to use this repository until the first publication is created - even if they use autopublish=True.
This can be confusing as some plugins have this behavior (due to using publications) but not others.
It would be convenient if new, empty repository version created alongside the repository would hit the same triggers as ones created by subsequent modifications. Or better: if all empty repositories (regardless of the use of the autopublish feature would create a publication with basic, empty repository metadata.
Problem: Repository creation is handled synchronously inside the web request. on_new_version() (and publish code generally) is intended to only ever be executed in a task. This will require some consideration. Perhaps a task could be spawned in the background to do this rather than doing so immediately.
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 tracing synchronous repository creation and the on_new_version() hook, then review how publishing tasks are spawned. Done should ensure a newly created empty repository receives the appropriate publication or metadata behavior without executing publish code synchronously in the web request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100