Files
aptly/api
André Roth 2827620cfe fix(publish): pre-register published repo key before task submission
apiPublishRepoOrSnapshot appended published.Key() to resources inside
the task closure, after maybeRunTaskInBackground had already been called.
The task's locked-resource set is fixed at submission time, so that append
had no effect — the published repo key was never registered as a resource.

Two concurrent POST /api/publish/{prefix} requests for the same
prefix/distribution therefore did not conflict in the task queue: both
ran in parallel, each loaded an empty PublishedRepoCollection from the DB,
both passed CheckDuplicate, and the second Add silently overwrote the first.

Fix: compute the published repo key ("U{storagePrefix}>>{distribution}")
from the already-known storage/prefix/distribution values and append it to
resources before calling maybeRunTaskInBackground, so concurrent creates
for the same destination are serialised by the task queue.  The now-dead
append inside the closure is removed.
2026-05-23 13:54:50 +02:00
..
2025-08-20 19:41:26 +02:00
2025-04-26 13:29:50 +02:00
2024-10-01 01:07:09 +02:00
2026-01-11 14:26:56 +01:00
2026-01-11 14:26:56 +01:00
2026-04-26 17:44:25 +02:00
2026-05-04 11:35:55 +02:00
2024-12-11 10:40:44 +01:00
2023-02-20 13:42:50 +01:00
2026-04-26 18:37:36 +02:00
2026-05-04 11:35:55 +02:00
2024-12-11 11:19:46 +01:00
2026-05-04 11:35:55 +02:00
2026-04-26 23:56:05 +02:00
2024-12-11 10:40:44 +01:00
2024-12-11 10:40:44 +01:00
2024-12-11 11:19:46 +01:00