A recent package upload failed to upload metadata to the registry after the tarball was uploaded to storage. The author retried the publishing workflow, but publishing failed because there was already a tarball in storage. See:
purescript/registry#336 (comment)
purescript/registry#336 (comment)
Specifically, in this section of publishRegistry, the Storage.upload and Registry.writeMetadata functions can throw exceptions, and the process is aborted if so:
|
Storage.upload manifest.name manifest.version tarballPath |
|
Log.debug $ "Adding the new version " <> Version.print manifest.version <> " to the package metadata file." |
|
let newMetadata = metadata { published = Map.insert manifest.version { hash, ref: payload.ref, publishedTime, bytes } metadata.published } |
|
Registry.writeMetadata manifest.name (Metadata newMetadata) |
We should probably catch the Registry.writeMetadata exception and roll back the Storage.upload (ie. issue a Storage.delete) before fully exiting the pipeline. Alternately, we could have a sort of bracket functionality built into the publish pipeline where we record what resources have been modified and on publish failure we roll back all of those modifications.
A recent package upload failed to upload metadata to the registry after the tarball was uploaded to storage. The author retried the publishing workflow, but publishing failed because there was already a tarball in storage. See:
purescript/registry#336 (comment)
purescript/registry#336 (comment)
Specifically, in this section of
publishRegistry, theStorage.uploadandRegistry.writeMetadatafunctions can throw exceptions, and the process is aborted if so:registry-dev/app/src/App/API.purs
Lines 644 to 647 in 8177cd3
We should probably catch the
Registry.writeMetadataexception and roll back theStorage.upload(ie. issue aStorage.delete) before fully exiting the pipeline. Alternately, we could have a sort of bracket functionality built into the publish pipeline where we record what resources have been modified and on publish failure we roll back all of those modifications.