-
Notifications
You must be signed in to change notification settings - Fork 16
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
add rapids-get-pr-wheel-artifact for quickly downloading cpp wheels #101
Merged
+59
−3
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
41f8346
add rapids-get-pr-wheel-artifact for quickly downloading cpp wheels
msarahan 799d692
append generic pyver(_py3) for wheel_cpp types
msarahan 2b50d2a
add wheel_cpp uploads
msarahan 076d082
add pkg_type to rapids-download_wheels_from_s3
msarahan 7d65933
shellcheck
msarahan 6ecb362
do not require first arg to upload to be pkg_type
msarahan ccd1fb2
remove unnecessary _py3 from cpp wheels
msarahan 56c5294
Remove cuda version from wheel_cpp package name
msarahan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
# Echo path to an artifact for a specific PR. Finds and uses the latest commit on the PR. | ||
# | ||
# Positional Arguments: | ||
# 1) repo name | ||
# 2) PR number | ||
# 3) "cpp" or "python", to get the artifact for the C++ or Python build, respectively | ||
# 4) [optional] commit hash, to get the artifact for a specific commit | ||
# | ||
# Example Usage: | ||
# rapids-get-pr-conda-artifact rmm 1095 cpp | ||
set -euo pipefail | ||
|
||
repo="$1" | ||
pr="$2" | ||
|
||
pkg_type="$3" | ||
case "${pkg_type}" in | ||
cpp) | ||
artifact_name=$(RAPIDS_REPOSITORY=$repo rapids-package-name wheel_cpp) | ||
;; | ||
python) | ||
artifact_name=$(RAPIDS_REPOSITORY=$repo rapids-package-name wheel_python) | ||
;; | ||
*) | ||
echo "Error: 3rd argument must be 'cpp' or 'python'" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
commit="${4:-}" | ||
if [[ -z "${commit}" ]]; then | ||
commit=$(git ls-remote https://github.com/rapidsai/"${repo}".git refs/heads/pull-request/"${pr}" | cut -c1-7) | ||
msarahan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fi | ||
|
||
rapids-get-artifact "ci/${repo}/pull-request/${pr}/${commit}/${artifact_name}" |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option that would probably be more consistent with other scripts in this repo would be to use an environment variable. I'm not the biggest fan of how much we've proliferated those, and maybe what we really need to start doing is introducing some proper argument parsing (e.g. via getopts), but that's out of scope for this PR (but curious what others like @bdice and @ajschmidt8 think about that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the code here. We can have a follow-up to clean up all uses of the script so they declare the
pkg_type
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I'm hoping we can remove a lot of these scripts entirely pending the outcome of https://github.com/rapidsai/ops/issues/2982.
If that issue ends up being rolled out, I think that would be a good time to rethink some of the interfaces for any of the helper scripts that we do keep around.