Skip to content

Use nox to further automate our release mechanisms #7286

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 3, 2019

Conversation

pradyunsg
Copy link
Member

@pradyunsg pradyunsg commented Nov 2, 2019

Not sure why I kept working on this past 2am. But hey, now we have our release process reduced significantly.

  • Get rid of generate_* nox commands, since, well, there's no point in invoking them directly if everything is automated.
  • Create a new tools/automation/release/__init__.py file, that contains helpers for release process automation.
  • Add a new build-release command, to go from tagged release -> distributions in dist/.
  • Nicer version bumping scheme that's in-compliance with our current release cadence.

Other than that, the fact that 7150861 needed commits to be made to the branch, meant that I was completely confused while working on it and lost my work once. Anyway, I think this works, since I managed to get to a distribution using this two commands on my machine. :P

@pradyunsg pradyunsg added skip news Does not need a NEWS file entry (eg: trivial changes) C: automation Automated checks, CI etc labels Nov 2, 2019
@pradyunsg pradyunsg added this to the Automated Release Process milestone Nov 2, 2019
#. Build the release artifacts using ``nox -s build-release -- YY.N``.
This will checkout the tag, generate the distribution files to be
uploaded and checkout the master branch again.
#. Upload the distribution files to PyPI using ``twine upload dist/*``.
#. Push all of the changes including the tag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be the occasion to clear up the workflow due to the fact that we cannot push directly on master.
What I did for 19.3 was:

  • creating a pull request after "Prepare for release using nox -s prepare-release -- YY.N" (without pushing the tag)
  • wait for the CI and merge the PR with a merge commit no squash or rebase to keep the tagged commit
  • only after the PR was merged did I push the matching tag and uploaded the new version to PyPI.

Copy link
Member Author

@pradyunsg pradyunsg Nov 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be the occasion to clear up the workflow due to the fact that we cannot push directly on master.

Let's address that in a follow up -- I do nearly the same thing.

The only difference is that I disable the branch protections (so that I can merge the PR, before CI passes, by checking a checkbox to say "YES I KNOW WHAT I'M DOING") and then re-enable protections in the same minute.

The bugfix process also needs clarification, so there's that.

@pradyunsg
Copy link
Member Author

I'll merge this since I don't think the changes since @xavfernandez's approval are significant changes (mostly just a CI update I'd missed and addressing his comment).

@pradyunsg pradyunsg merged commit 6993b60 into pypa:master Nov 3, 2019
@pradyunsg pradyunsg deleted the nicer-nox-setup branch November 3, 2019 20:34
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Dec 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: automation Automated checks, CI etc skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants