Skip to content
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

[tools] Add confirmation to 'rake pypi:release' task #791

Merged
merged 5 commits into from Jan 25, 2019

Conversation

brettlangdon
Copy link
Member

This PR adds in two quick checks/confirmations to the rake pypi:release task.

The first check looks to see if the current commit is associated with the tag for v#{__version__}, if not it asks the user to confirm that they want to proceed.

The second check will always show, warning the user that this action cannot be undone and asks them to confirm by typing in the current (should be released) version of ddtrace.

Example:

$ rake pypi:release
WARNING: Expected current commit to be tagged as 'tags/v0.19.0, instead we are on 'brettlangdon/pypi.confirm', proceed anyways [y|N]? y
WARNING: This task will build and release a new wheel to https://pypi.org/project/ddtrace/, this action cannot be undone
         To proceed please type the version '0.19.0': 0.19.0

@brettlangdon
Copy link
Member Author

These checks might be ok for an initial trial, but there is a chance they are a little too aggressive and add too much friction, happy to readjust in the future as well.

@brettlangdon brettlangdon added this to the 0.21.0 milestone Jan 9, 2019
@brettlangdon brettlangdon modified the milestones: 0.21.0, 0.20.2 Jan 25, 2019
Kyle-Verhoog
Kyle-Verhoog previously approved these changes Jan 25, 2019
Copy link
Member

@Kyle-Verhoog Kyle-Verhoog left a comment

Choose a reason for hiding this comment

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

great to have.. makes deploying a ton less stressful!

print " To proceed please type the version '#{ddtrace_version}': "
$stdout.flush

abort if $stdin.gets.to_s.strip.downcase != ddtrace_version
Copy link
Member

Choose a reason for hiding this comment

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

nice! 👍 👍

@brettlangdon brettlangdon changed the base branch from master to 0.20.2-dev January 25, 2019 19:53
@brettlangdon brettlangdon merged commit c4c4491 into 0.20.2-dev Jan 25, 2019
@Kyle-Verhoog Kyle-Verhoog deleted the brettlangdon/pypi.confirm branch January 25, 2019 20:26
@brettlangdon brettlangdon mentioned this pull request Jan 28, 2019
brettlangdon added a commit that referenced this pull request Jan 29, 2019
* [tests] limit grpcio version to >=1.8.0,<1.18.0

* [tools] Add confirmation to 'rake pypi:release' task (#791)

* [tools] Add confirmation to 'rake pypi:release' task

* check if we are on tagged version instead

* [core] Call HTTPResponse.read() before HTTPConnection.close() (#800)

* [core] Call HTTPResponse.read() before HTTPConnection.close()

* engrish

* add reason and msg as well

* use API.Response in integration tests

* limit version of grpc

* ensure we have regression test

* move API.Response to just Response

* result_traces/services => traces/services_response

* fix logging error message tests

* fix test for python 2.7

* Update ddtrace/writer.py

Co-Authored-By: brettlangdon <me@brett.is>

* Update ddtrace/api.py

Co-Authored-By: brettlangdon <me@brett.is>

* fix integration tests

* Bump version to 0.20.2 (#803)
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.

None yet

2 participants