Skip to content

Make adding hackage security data atomic with package upload - #644

Merged
hvr merged 4 commits into
masterfrom
make-json-gen-atomic
Dec 25, 2017
Merged

hvr merged 4 commits into
masterfrom
make-json-gen-atomic

Conversation

@gbaz

@gbaz gbaz commented Dec 19, 2017

Copy link
Copy Markdown
Contributor

Should fix #488 for future uploads.

The note on line 337 or so is key. Rather than refactor every transaction to accept additional tarball entries, this change, attempting to be minimal, only refactors the AddPackage call, and its sole point of usage in updateAddPackage.

The only provider of the preIndexUpdateHook at the moment is hackage security, and the hook itself is only not a no-op for adding packages and updating tarballs (the latter only used by hackage mirror). As we extend the hook we may need to make more things atomic. But for the time being this is intended as a minimal refactor to fix the bug, with enough attendant comments to point the way for future work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

01-index entries missing package.json

2 participants