-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
update schedule and add input checking for replay-verify on archive #15501
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ jobs: | |
GCP_SERVICE_ACCOUNT_EMAIL: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }} | ||
EXPORT_GCP_PROJECT_VARIABLES: "false" | ||
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} | ||
GCP_AUTH_DURATION: "10800" | ||
|
||
# Authenticate to Google Cloud the project is aptos-ci with credentails files generated | ||
- name: Authenticate to Google Cloud | ||
|
@@ -100,20 +101,42 @@ jobs: | |
CMD="$CMD --end ${{ inputs.END_VERSION }}" | ||
fi | ||
|
||
if [ -n "${{ inputs.IMAGE_TAG }}" ]; then | ||
CMD="$CMD --end ${{ inputs.IMAGE_TAG }}" | ||
if [ -n "${{ inputs.IMAGE_TAG }}" ]; then | ||
CMD="$CMD --image_tag ${{ inputs.IMAGE_TAG }}" | ||
fi | ||
|
||
eval $CMD | ||
timeout-minutes: 120 | ||
# This is in case user manually cancel the step above, we still want to cleanup the resources | ||
- name: Post-run cleanup | ||
env: | ||
GOOGLE_CLOUD_PROJECT: aptos-devinfra-0 | ||
if: ${{ always() }} | ||
run: | | ||
cd testsuite/replay-verify | ||
poetry run python main.py --network ${{ inputs.NETWORK }} --cleanup | ||
CMD="poetry run python main.py --network ${{ inputs.NETWORK }} --cleanup" | ||
if [ -n "${{ inputs.IMAGE_TAG }}" ]; then | ||
CMD="$CMD --image_tag ${{ inputs.IMAGE_TAG }}" | ||
fi | ||
eval $CMD | ||
echo "Cleanup completed" | ||
# List all disks in the project that are not in use and finished creating. There is a rare chance that the disk is being created and won't be used in future due to csi retry errors | ||
# But this disk will be deleted in the next workflow run since its status is READY then | ||
- name: Delete all unsed disks in the project | ||
env: | ||
GOOGLE_CLOUD_PROJECT: aptos-devinfra-0 | ||
if: ${{ always() }} | ||
run: | | ||
|
||
DISK_URIS=$(gcloud compute disks list --filter="-users:* AND status=READY" --format "value(uri())") | ||
echo "Disks to be deleted:" | ||
echo "$DISK_URIS" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The echo "$DISK_URIS" | xargs -r gcloud compute disks delete The Spotted by Graphite Reviewer |
||
if [ -n "$DISK_URIS" ]; then | ||
gcloud compute disks delete $DISK_URIS | ||
else | ||
echo "No unused disks found." | ||
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.
is this UTC? (You said you switch to night)