Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make bork release as close to atomic as possible #165

Closed
duckinator opened this issue Jul 11, 2020 · 2 comments
Closed

Make bork release as close to atomic as possible #165

duckinator opened this issue Jul 11, 2020 · 2 comments
Milestone

Comments

@duckinator
Copy link
Owner

duckinator commented Jul 11, 2020

The main guarantee an atomic release provides is that if releasing to any service fails, releases to all services are cancelled.

A release to multiple services can never, as far as I know, be truly atomic. However, you can get far closer than bork currently does.

The basic way that I plan to accomplish this is:

  1. make a draft release on every service.
  2. if any draft-release failed, cancel the release and clean up.
  3. if everything worked, publish all the releases.

This can not be done on PyPi until pypi/warehouse#726 is resolved, so I have an intermediate "improved implementation" before we reach the ideal one.

Current Implementation

At the moment, bork release will just:

  1. Release to PyPi.
  2. Release to GitHub Releases.

Any failures will probably keep it from continuing, but that's not guaranteed and the cleanup is completely manual.

Notably, a fail to GitHub Releases will result in it being released to PyPi.

Improved Implementation

A better workflow, which only works for the combination of PyPi and GitHub:

  1. Make a draft GitHub Release.
  2. Release to PyPi.
  3. If step 2 fails, delete the draft GitHub Release as well.

(Long Term) The Ideal Workflow

Here is the ideal release workflow I would love to have long-term, because it can be scaled to support more services without breaking assumptions:

  1. Upload a draft release to every service being used (PyPi, GitHub Releases).
  2. If any fail, abort the release immediately.
  3. If everything succeeded, mark them all as published.
@duckinator
Copy link
Owner Author

duckinator commented Jul 11, 2020

The goal, for the time being, is to reach the improved implementation. I believe this basically boils down to:

  1. Make GitHub Release work in terms of "create draft, then publish draft".
  2. Add the ability to clean up drafts from failed attempts.
  3. Have the release process be "GitHub Releases draft, PyPi release, publish GR drafts; clean up GR draft if anything failed".

@duckinator duckinator added this to the v5.0.0 milestone Aug 1, 2020
@duckinator
Copy link
Owner Author

This has been done, and will be included in v5.0.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant