-
Notifications
You must be signed in to change notification settings - Fork 866
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
Automate Release: From scratch builds #1739
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
reviewed
Jul 15, 2022
agunapal
approved these changes
Jul 20, 2022
Codecov Report
@@ Coverage Diff @@
## master #1739 +/- ##
=======================================
Coverage 45.23% 45.23%
=======================================
Files 64 64
Lines 2602 2602
Branches 60 60
=======================================
Hits 1177 1177
Misses 1425 1425 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
maaquib
requested changes
Aug 26, 2022
Co-authored-by: Aaqib <maaquib@gmail.com>
maaquib
approved these changes
Aug 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR supports a manually triggerable Github Action that will make an official release. The way this works is assuming a code freeze, we will run a bunch of scripts on the
master
branch which will create binaries and upload them to official channels. Automates a total of 27 binaries.py38
andpy39
per packagetorchserve
,torch-model-archiver
and per OSwindows
,mac
,ubuntu
latest
tagsEach of these needs credentials that are stored as Github secrets, so anyone on the team can now trigger an official release and it's not restricted to Meta employees. To protect the team from fat finger errors, the workflow also requires 2 approvers to fully launch.
There are 2 schools of thought when it comes to promoting binaries
torchserve-nightly
totorchserve
which was not easy to do and also because if you manually compress a fileconda
won't verify it. I made the ask to theconda
team and haven't heard back Extendanaconda copy
to allow name & version changes conda/conda#11613This change also makes it so we cannot do hot fixes for a single binary, we need to bump
version.txt
and upload everything.Fixes #1666
Type of change
Please delete options that are not relevant.
Feature/Issue validation/testing
For testing we cannot actually upload official images so I have below 2 forms of testing. A
dry_run
test showing which commands will be ran and a test to upload to a staging environment calledmarksaroufim
End to end test: does everything except upload https://github.com/msaroufim/serve/actions/runs/2680194992 - I CANNOT actually upload real binaries to Pypi because those would publish real ones and I don't have access to test.pypi.org that's owned by AWS but you can see from the logs that this should work as expected
Conda & Pypi tests
dry_run
build.py
https://gist.github.com/msaroufim/c2dbac8739c4fcb5017af77b2db2fd0d
upload.py
Staging environment
build.py
upload.py
Conda binaries can be seen here when uploaded to the
marksaroufim
organization https://anaconda.org/marksaroufim/repoPyPi binaries to test.pypi.org need permissions which I don't have quite yet but upload seems to be working OK: https://gist.github.com/msaroufim/6f6c053e9dbe0d5b097abf8d1054d512
Docker tests
Staging environment
Dry_run
For convenience I've also added new support for
dry_run
in ourbuild.py
andupload.py
scriptspytorch/torchserve docker test
pytorch/torchserve-kfs docker test
Related changes
There were also some other changes that are due like
retag_binary.sh
since we are no longer encouraging that workflowpip/build_wheels.sh
because that's been replaced by a function calledbuild_dist_whl()
get_ts_version()
which inspects the value of__version__
so I can append the correct version to docker image namestry_and_handle()
helper function withdry_run
support into autils
folder and changed most of theos.system()
calls inbuild.py
andupload.py
Manual approval
Manual approvals work by making the Github Action run in a specific environment, in this case it's called
official-release
and can only be run if triggered by either @lxning and @msaroufim - we can easily add more people as needed in Github settings. So if Mark triggers this workflow then Li should approve it and vice versa.Checklist: