-
Notifications
You must be signed in to change notification settings - Fork 0
Add AWS to Artifact Distribution Script #421
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
Conversation
…wy-zlai/aws_distribution
…wy-zlai/aws_distribution
…wy-zlai/aws_distribution
…wy-zlai/aws_distribution
WalkthroughThis pull request introduces a new shell script, Changes
Possibly related PRs
Suggested Reviewers
Poem
Warning Review ran into problems🔥 ProblemsGitHub Actions and Pipeline Checks: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository. Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (6)
distribution/build_and_upload_artifacts.sh (6)
39-47
: Clarify error message for AWS customer IDs.
Use the explicit option name (e.g., "--aws_customer_ids requires a value") for clarity.
48-56
: Clarify error message for GCP customer IDs.
Mention "--gcp_customer_ids" in the error message for precision.
111-119
: Thrift generation and wheel build.
Combining the VERSION assignment with the pip command might reduce clarity; consider splitting them.
237-244
: AWS customer IDs array handling.
The check[ -z "$INPUT_AWS_CUSTOMER_IDS" ]
expands only the first element; consider using a length test to avoid SC2128 warnings.-if [ -z "$INPUT_AWS_CUSTOMER_IDS" ]; then - echo "No customer ids provided for AWS. Using default: ${AWS_CUSTOMER_IDS[*]}" +if [ ${#INPUT_AWS_CUSTOMER_IDS[@]} -eq 0 ]; then + echo "No customer ids provided for AWS. Using default: ${AWS_CUSTOMER_IDS[*]}"🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 238-238: Expanding an array without an index only gives the first element.
(SC2128)
245-252
: GCP customer IDs array handling.
Similarly, use a length check to avoid SC2128 warnings.-if [ -z "$INPUT_GCP_CUSTOMER_IDS" ]; then - echo "No customer ids provided for GCP. Using default: ${GCP_CUSTOMER_IDS[*]}" +if [ ${#INPUT_GCP_CUSTOMER_IDS[@]} -eq 0 ]; then + echo "No customer ids provided for GCP. Using default: ${GCP_CUSTOMER_IDS[*]}"🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 246-246: Expanding an array without an index only gives the first element.
(SC2128)
256-256
: Wheel cleanup command.
Consider usingrm -f ./*.whl
to avoid errors if no wheels exist.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (2)
distribution/build_and_upload_artifacts.sh
(1 hunks)distribution/build_and_upload_gcp_artifacts.sh
(0 hunks)
💤 Files with no reviewable changes (1)
- distribution/build_and_upload_gcp_artifacts.sh
🧰 Additional context used
🪛 Shellcheck (0.10.0)
distribution/build_and_upload_artifacts.sh
[warning] 238-238: Expanding an array without an index only gives the first element.
(SC2128)
[warning] 246-246: Expanding an array without an index only gives the first element.
(SC2128)
🔇 Additional comments (10)
distribution/build_and_upload_artifacts.sh (10)
1-2
: Shebang is correct.
No issues.
3-12
: print_usage function is clear.
Well-structured usage instructions.
14-18
: No-argument check is solid.
66-69
: Git diff check is solid.
72-82
: Git sync check works as expected.
121-137
: Jar build section is solid.
No issues.
141-157
: AWS jar build block is acceptable.
158-174
: GCP jar build block is acceptable.
184-208
: upload_to_gcp function is clear.
The interactive prompt is fine; consider a non-interactive flag for CI if needed later.
210-234
: upload_to_aws function is clear.
Well-structured and readable.
MAJOR_PYTHON_VERSION=$(python --version | cut -d " " -f2 | cut -d "." -f 1) | ||
MINOR_PYTHON_VERSION=$(python --version | cut -d " " -f2 | cut -d "." -f 2) | ||
|
||
EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION=3 | ||
EXPECTED_MINIMUM_MINOR_PYTHON_VERSION=9 | ||
|
||
if [[ $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION -gt $MAJOR_PYTHON_VERSION ]] ; then | ||
echo "Failed major version of $MAJOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)" | ||
exit 1 | ||
fi | ||
|
||
if [[ EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt MINOR_PYTHON_VERSION ]] ; then | ||
echo "Failed minor version of $MINOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)" | ||
exit 1 | ||
fi |
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.
🛠️ Refactor suggestion
Python version check bug.
Missing '$' in the minor version test (lines 105-108); use $EXPECTED_MINIMUM_MINOR_PYTHON_VERSION
and $MINOR_PYTHON_VERSION
.
-if [[ EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt MINOR_PYTHON_VERSION ]] ; then
- echo "Failed minor version of $MINOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)"
- exit 1
-fi
+if [[ $EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt $MINOR_PYTHON_VERSION ]] ; then
+ echo "Failed minor version of $MINOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)"
+ exit 1
+fi
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
MAJOR_PYTHON_VERSION=$(python --version | cut -d " " -f2 | cut -d "." -f 1) | |
MINOR_PYTHON_VERSION=$(python --version | cut -d " " -f2 | cut -d "." -f 2) | |
EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION=3 | |
EXPECTED_MINIMUM_MINOR_PYTHON_VERSION=9 | |
if [[ $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION -gt $MAJOR_PYTHON_VERSION ]] ; then | |
echo "Failed major version of $MAJOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)" | |
exit 1 | |
fi | |
if [[ EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt MINOR_PYTHON_VERSION ]] ; then | |
echo "Failed minor version of $MINOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)" | |
exit 1 | |
fi | |
MAJOR_PYTHON_VERSION=$(python --version | cut -d " " -f2 | cut -d "." -f 1) | |
MINOR_PYTHON_VERSION=$(python --version | cut -d " " -f2 | cut -d "." -f 2) | |
EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION=3 | |
EXPECTED_MINIMUM_MINOR_PYTHON_VERSION=9 | |
if [[ $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION -gt $MAJOR_PYTHON_VERSION ]] ; then | |
echo "Failed major version of $MAJOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)" | |
exit 1 | |
fi | |
if [[ $EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt $MINOR_PYTHON_VERSION ]] ; then | |
echo "Failed minor version of $MINOR_PYTHON_VERSION. Expecting python version of at least $EXPECTED_MINIMUM_MAJOR_PYTHON_VERSION.$EXPECTED_MINIMUM_MINOR_PYTHON_VERSION to build wheel. Your version is $(python --version)" | |
exit 1 | |
fi |
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
distribution/build_and_upload_artifacts.sh (1)
92-108
:⚠️ Potential issuePython version check needs a minor fix.
The minor version test on line 105 is missing$
signs.-if [[ EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt MINOR_PYTHON_VERSION ]] ; then +if [[ $EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt $MINOR_PYTHON_VERSION ]] ; then
🧹 Nitpick comments (3)
distribution/build_and_upload_artifacts.sh (3)
20-63
: Argument parsing is correct.
Consider refining error messages in the--aws_customer_ids
and--gcp_customer_ids
cases to mention the specific option.
230-237
: AWS customer IDs check.
Expanding$INPUT_AWS_CUSTOMER_IDS
may only yield the first element. Consider using a length check like:if [ ${#INPUT_AWS_CUSTOMER_IDS[@]} -eq 0 ]; thento ensure proper handling if multiple IDs are expected.
🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 231-231: Expanding an array without an index only gives the first element.
(SC2128)
238-245
: GCP customer IDs check.
Similar to AWS, usingif [ -z "$INPUT_GCP_CUSTOMER_IDS" ]
might not capture all entries. A length check is preferable.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 239-239: Expanding an array without an index only gives the first element.
(SC2128)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
distribution/build_and_upload_artifacts.sh
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
distribution/build_and_upload_artifacts.sh
[warning] 231-231: Expanding an array without an index only gives the first element.
(SC2128)
[warning] 239-239: Expanding an array without an index only gives the first element.
(SC2128)
🔇 Additional comments (14)
distribution/build_and_upload_artifacts.sh (14)
1-2
: Shebang is set correctly.
No issues here.
3-12
: Usage function is clear.
Good concise help message for available options.
14-18
: Handles missing arguments properly.
Prints usage and exits if no args provided.
66-69
: Uncommitted changes check works as intended.
71-83
: Git branch sync verification is solid.
Ensures local branch is up-to-date.
84-91
: Script directory and work directory setup look fine.
111-119
: Thrift generation and wheel build are proper.
Commands are straightforward and validate wheel existence.
121-137
: JAR builds are invoked correctly.
Bazel build commands and file existence checks are in order.
141-150
: AWS JAR build block is valid.
Build and existence check for AWS jar works correctly.
151-167
: GCP JAR build block is solid.
Both library and submitter JARs are built and validated.
173-174
: Default GCP customer IDs set appropriately.
Provides fallback values for GCP uploads.
176-201
:upload_to_gcp
function is well structured.
Implementation is clear; consider consistently quoting variables for safety.
203-227
:upload_to_aws
function implementation looks good.
Clear upload flow with proper metadata assignment.
248-249
: Cleanup command is concise.
Removes generated wheel files as intended.
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.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
distribution/build_and_upload_artifacts.sh
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
distribution/build_and_upload_artifacts.sh
[warning] 231-231: Expanding an array without an index only gives the first element.
(SC2128)
[warning] 239-239: Expanding an array without an index only gives the first element.
(SC2128)
🔇 Additional comments (13)
distribution/build_and_upload_artifacts.sh (13)
1-2
: Shebang is correct.
3-12
: Usage function is clear.
14-18
: No-argument check works as expected.
20-63
: CLI option parsing is straightforward.
66-69
: Git diff check is effective.
71-83
: Branch sync validation is solid.
84-91
: Directory setup and environment change are fine.
92-108
: Python version check now includes proper variable expansion.
111-119
: Artifact build steps and wheel existence check are concise.
121-137
: Bazel jar builds and file checks are clearly implemented.
151-168
: GCP build block is complete and robust.
177-201
: GCP upload function is implemented clearly.
248-249
: Cleanup command is appropriate.
function upload_to_aws() { | ||
customer_ids_to_upload=("$@") | ||
echo "Are you sure you want to upload to these customer ids: ${customer_ids_to_upload[*]}" | ||
select yn in "Yes" "No"; do | ||
case $yn in | ||
Yes ) | ||
set -euxo pipefail | ||
for element in "${customer_ids_to_upload[@]}" | ||
do | ||
ELEMENT_JAR_PATH=s3://zipline-artifacts-$element/jars | ||
aws s3 cp "$CLOUD_AWS_JAR" "$ELEMENT_JAR_PATH" --metadata="zipline_user=$USER,updated_date=$(date),commit=$(git rev-parse HEAD),branch=$(git rev-parse --abbrev-ref HEAD)" | ||
aws s3 cp "$CLOUD_AWS_SUBMITTER_JAR" "$ELEMENT_JAR_PATH" --metadata="zipline_user=$USER,updated_date=$(date),commit=$(git rev-parse HEAD),branch=$(git rev-parse --abbrev-ref HEAD)" | ||
aws s3 cp "$SERVICE_JAR" "$ELEMENT_JAR_PATH" --metadata="zipline_user=$USER,updated_date=$(date),commit=$(git rev-parse HEAD),branch=$(git rev-parse --abbrev-ref HEAD)" | ||
aws s3 cp "$EXPECTED_ZIPLINE_WHEEL" "$ELEMENT_JAR_PATH" --metadata="zipline_user=$USER,updated_date=$(date),commit=$(git rev-parse HEAD),branch=$(git rev-parse --abbrev-ref HEAD)" | ||
aws s3 cp "$FLINK_JAR" "$ELEMENT_JAR_PATH" --metadata="zipline_user=$USER,updated_date=$(date),commit=$(git rev-parse HEAD),branch=$(git rev-parse --abbrev-ref HEAD)" | ||
done | ||
echo "Succeeded" | ||
break;; |
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.
AWS upload function uses an undefined CLOUD_AWS_SUBMITTER_JAR.
Ensure the AWS submitter jar is built and its path is set (see AWS build block above).
if [ "$BUILD_GCP" = true ]; then | ||
if [ -z "$INPUT_GCP_CUSTOMER_IDS" ]; then | ||
echo "No customer ids provided for GCP. Using default: ${GCP_CUSTOMER_IDS[*]}" | ||
else | ||
GCP_CUSTOMER_IDS=("${INPUT_GCP_CUSTOMER_IDS[@]}") | ||
fi | ||
upload_to_gcp "${GCP_CUSTOMER_IDS[@]}" | ||
fi |
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.
🛠️ Refactor suggestion
GCP customer IDs check: use array length.
Replace [ -z "$INPUT_GCP_CUSTOMER_IDS" ]
with:
- if [ -z "$INPUT_GCP_CUSTOMER_IDS" ]; then
+ if [ ${#INPUT_GCP_CUSTOMER_IDS[@]} -eq 0 ]; then
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if [ "$BUILD_GCP" = true ]; then | |
if [ -z "$INPUT_GCP_CUSTOMER_IDS" ]; then | |
echo "No customer ids provided for GCP. Using default: ${GCP_CUSTOMER_IDS[*]}" | |
else | |
GCP_CUSTOMER_IDS=("${INPUT_GCP_CUSTOMER_IDS[@]}") | |
fi | |
upload_to_gcp "${GCP_CUSTOMER_IDS[@]}" | |
fi | |
if [ "$BUILD_GCP" = true ]; then | |
if [ ${#INPUT_GCP_CUSTOMER_IDS[@]} -eq 0 ]; then | |
echo "No customer ids provided for GCP. Using default: ${GCP_CUSTOMER_IDS[*]}" | |
else | |
GCP_CUSTOMER_IDS=("${INPUT_GCP_CUSTOMER_IDS[@]}") | |
fi | |
upload_to_gcp "${GCP_CUSTOMER_IDS[@]}" | |
fi |
🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 239-239: Expanding an array without an index only gives the first element.
(SC2128)
if [ "$BUILD_AWS" = true ]; then | ||
if [ -z "$INPUT_AWS_CUSTOMER_IDS" ]; then | ||
echo "No customer ids provided for AWS. Using default: ${AWS_CUSTOMER_IDS[*]}" | ||
else | ||
AWS_CUSTOMER_IDS=("${INPUT_AWS_CUSTOMER_IDS[@]}") | ||
fi | ||
upload_to_aws "${AWS_CUSTOMER_IDS[@]}" | ||
fi |
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.
🛠️ Refactor suggestion
AWS customer IDs check: use array length.
Instead of [ -z "$INPUT_AWS_CUSTOMER_IDS" ]
, consider using:
- if [ -z "$INPUT_AWS_CUSTOMER_IDS" ]; then
+ if [ ${#INPUT_AWS_CUSTOMER_IDS[@]} -eq 0 ]; then
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if [ "$BUILD_AWS" = true ]; then | |
if [ -z "$INPUT_AWS_CUSTOMER_IDS" ]; then | |
echo "No customer ids provided for AWS. Using default: ${AWS_CUSTOMER_IDS[*]}" | |
else | |
AWS_CUSTOMER_IDS=("${INPUT_AWS_CUSTOMER_IDS[@]}") | |
fi | |
upload_to_aws "${AWS_CUSTOMER_IDS[@]}" | |
fi | |
if [ "$BUILD_AWS" = true ]; then | |
if [ ${#INPUT_AWS_CUSTOMER_IDS[@]} -eq 0 ]; then | |
echo "No customer ids provided for AWS. Using default: ${AWS_CUSTOMER_IDS[*]}" | |
else | |
AWS_CUSTOMER_IDS=("${INPUT_AWS_CUSTOMER_IDS[@]}") | |
fi | |
upload_to_aws "${AWS_CUSTOMER_IDS[@]}" | |
fi |
🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 231-231: Expanding an array without an index only gives the first element.
(SC2128)
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.
Actionable comments posted: 0
🧹 Nitpick comments (5)
distribution/build_and_upload_artifacts.sh (5)
20-63
: Arg parsing is clear; consider distinct error texts for customer IDs.
177-201
: upload_to_gcp function is clear; consider a non-interactive flag for automation.
229-236
: For AWS IDs, use array length check to avoid SC2128.- if [ -z "$INPUT_AWS_CUSTOMER_IDS" ]; then + if [ ${#INPUT_AWS_CUSTOMER_IDS[@]} -eq 0 ]; then🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 230-230: Expanding an array without an index only gives the first element.
(SC2128)
237-244
: For GCP IDs, use array length check to avoid SC2128.- if [ -z "$INPUT_GCP_CUSTOMER_IDS" ]; then + if [ ${#INPUT_GCP_CUSTOMER_IDS[@]} -eq 0 ]; then🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 238-238: Expanding an array without an index only gives the first element.
(SC2128)
247-248
: Cleanup command works; ensure it targets the right directory.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
distribution/build_and_upload_artifacts.sh
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
distribution/build_and_upload_artifacts.sh
[warning] 230-230: Expanding an array without an index only gives the first element.
(SC2128)
[warning] 238-238: Expanding an array without an index only gives the first element.
(SC2128)
🔇 Additional comments (12)
distribution/build_and_upload_artifacts.sh (12)
1-12
: Usage function is clear.
14-18
: Empty-args check works.
66-69
: Git diff check is proper.
71-82
: Git sync check is solid.
86-91
: Working directory setup is correct.
92-108
: Python version check is implemented correctly.
111-119
: Thrift generation & wheel build logic looks good.
121-137
: Bazel jar builds and file checks are solid.
141-150
: AWS jar build uses CLOUD_AWS_JAR; confirm no AWS submitter jar is needed.
151-168
: GCP jar build and checks are good.
174-174
: Default GCP customer IDs set as expected.
203-226
: upload_to_aws function mirrors GCP well.
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
distribution/build_and_upload_artifacts.sh (2)
23-66
: Argument Parsing:
Parsing works correctly. A minor nitpick: the error message for customer ID options could mention “--aws_customer_ids” or “--gcp_customer_ids” specifically.
250-251
: Cleanup:
Userm -f ./*.whl
to prevent errors if no wheel files are present.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
distribution/build_and_upload_artifacts.sh
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
distribution/build_and_upload_artifacts.sh
[warning] 233-233: Expanding an array without an index only gives the first element.
(SC2128)
[warning] 241-241: Expanding an array without an index only gives the first element.
(SC2128)
🔇 Additional comments (11)
distribution/build_and_upload_artifacts.sh (11)
1-12
: Usage & Shebang:
Shebang and usage function look good. Consider clarifying in the usage message if multiple customer IDs can be supplied.
69-86
: Git Checks:
The uncommitted change and remote-sync tests are smart and concise.
95-111
: Python Version Check:
The major and minor version validations are clear and sufficient.
114-122
: Wheel Build:
Wheel generation and file-existence checks are straightforward and clear.
124-140
: JAR Build:
Bazel build commands and existence validations are well implemented.
144-153
: AWS Build Block:
Building the AWS library is correct. Confirm if an AWS submitter jar is needed per design.
154-171
: GCP Build Block:
Both the GCP libraries and submitter jar are built and verified properly.
180-204
: GCP Upload Function:
The upload_to_gcp function is concise and uses a select prompt for confirmation effectively.
209-229
: AWS Upload Function:
The function mirrors the GCP upload logic and is clearly implemented.
232-239
: AWS Customer ID Check:
Using-z "$INPUT_AWS_CUSTOMER_IDS"
only evaluates the first element.- if [ -z "$INPUT_AWS_CUSTOMER_IDS" ]; then + if [ ${#INPUT_AWS_CUSTOMER_IDS[@]} -eq 0 ]; then🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 233-233: Expanding an array without an index only gives the first element.
(SC2128)
240-247
: GCP Customer ID Check:
Consider replacing the-z
check with an array length check:- if [ -z "$INPUT_GCP_CUSTOMER_IDS" ]; then + if [ ${#INPUT_GCP_CUSTOMER_IDS[@]} -eq 0 ]; then🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 241-241: Expanding an array without an index only gives the first element.
(SC2128)
## Summary Adds the ability to push artifacts to aws in addition to gcp. Also adds ability to specify specific customer ids to push to. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new automation script that streamlines the process of building artifacts and deploying them to both AWS and GCP with improved error handling and user confirmation. - **Chores** - Removed a legacy artifact upload script that previously handled only GCP deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Adds the ability to push artifacts to aws in addition to gcp. Also adds ability to specify specific customer ids to push to. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new automation script that streamlines the process of building artifacts and deploying them to both AWS and GCP with improved error handling and user confirmation. - **Chores** - Removed a legacy artifact upload script that previously handled only GCP deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Adds the ability to push artifacts to aws in addition to gcp. Also adds ability to specify specific customer ids to push to. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new automation script that streamlines the process of building artifacts and deploying them to both AWS and GCP with improved error handling and user confirmation. - **Chores** - Removed a legacy artifact upload script that previously handled only GCP deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Adds the ability to push artifacts to aws in addition to gcp. Also adds ability to specify specific customer ids to push to. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new automation script that streamlines the process of building artifacts and deploying them to both AWS and GCP with improved error handling and user confirmation. - **Chores** - Removed a legacy artifact upload script that previously handled only GCP deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Adds the ability to push artifacts to aws in addition to gcp. Also adds ability to specify specific customer ids to push to. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new automation script that streamlines the process of building artifacts and deploying them to both AWS and GCP with improved error handling and user confirmation. - **Chores** - Removed a legacy artifact upload script that previously handled only GCP deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Adds the ability to push artifacts to aws in addition to gcp. Also adds ability to specify specific customer ids to push to. ## Cheour clientslist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new automation script that streamlines the process of building artifacts and deploying them to both AWS and GCP with improved error handling and user confirmation. - **Chores** - Removed a legacy artifact upload script that previously handled only GCP deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Adds the ability to push artifacts to aws in addition to gcp. Also adds ability to specify specific customer ids to push to.
Checklist
Summary by CodeRabbit
New Features
Chores