Skip to content

Commit

Permalink
Merge pull request #13741 from MinaProtocol/fix/payment-tests-berkeley2
Browse files Browse the repository at this point in the history
Fix/payment tests berkeley2
  • Loading branch information
QuiteStochastic authored Jul 27, 2023
2 parents bd080fd + d4fb0c7 commit 37d1972
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions helm/cron_jobs/devnet-replayer-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
ARCHIVE_SQL=$(basename $ARCHIVE_DUMP_URI .tar.gz);
echo "Getting archive dump" $ARCHIVE_DUMP_URI;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $ARCHIVE_DUMP_URI . ;
MOST_RECENT_CHECKPOINT_URI=$(gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json ls gs://devnet-replayer-checkpoints/replayer-checkpoint-*.json | sort -r | head -n 1);
MOST_RECENT_CHECKPOINT_URI=$(gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json ls gs://devnet-replayer-checkpoints/devnet-replayer-checkpoint-*.json | sort -r | head -n 1);
MOST_RECENT_CHECKPOINT=$(basename $MOST_RECENT_CHECKPOINT_URI);
echo "Getting replayer checkpoint file" $MOST_RECENT_CHECKPOINT;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $MOST_RECENT_CHECKPOINT_URI . ;
Expand All @@ -57,15 +57,15 @@ spec:
rm -f $MOST_RECENT_CHECKPOINT;
DISK_CHECKPOINT=$(ls -t replayer-checkpoint*.json | head -n 1);
DATE=$(date +%F);
TODAY_CHECKPOINT=replayer-checkpoint-$DATE.json;
TODAY_CHECKPOINT=devnet-replayer-checkpoint-$DATE.json;
mv $DISK_CHECKPOINT $TODAY_CHECKPOINT;
echo "Uploading checkpoint file" $TODAY_CHECKPOINT;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $TODAY_CHECKPOINT gs://devnet-replayer-checkpoints/$TODAY_CHECKPOINT;
echo "Replayer errors:";
grep Error replayer.log;
HAVE_ERRORS=$?;
if [ $HAVE_ERRORS -eq 0 ];
then REPLAYER_ERRORS=replayer_errors_${DATE};
then REPLAYER_ERRORS=devnet-replayer_errors_${DATE};
echo "The replayer found errors, uploading log" $REPLAYER_ERRORS;
mv replayer.log $REPLAYER_ERRORS;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $REPLAYER_ERRORS gs://devnet-replayer-checkpoints/$REPLAYER_ERRORS;
Expand Down
6 changes: 3 additions & 3 deletions helm/cron_jobs/mainnet-replayer-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
ARCHIVE_SQL=$(basename $ARCHIVE_DUMP_URI .tar.gz);
echo "Getting archive dump" $ARCHIVE_DUMP_URI;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $ARCHIVE_DUMP_URI . ;
MOST_RECENT_CHECKPOINT_URI=$(gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json ls gs://mainnet-replayer-checkpoints/replayer-checkpoint-*.json | sort -r | head -n 1);
MOST_RECENT_CHECKPOINT_URI=$(gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json ls gs://mainnet-replayer-checkpoints/mainnet-replayer-checkpoint-*.json | sort -r | head -n 1);
MOST_RECENT_CHECKPOINT=$(basename $MOST_RECENT_CHECKPOINT_URI);
echo "Getting replayer checkpoint file" $MOST_RECENT_CHECKPOINT;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $MOST_RECENT_CHECKPOINT_URI . ;
Expand All @@ -57,15 +57,15 @@ spec:
rm -f $MOST_RECENT_CHECKPOINT;
DISK_CHECKPOINT=$(ls -t replayer-checkpoint*.json | head -n 1);
DATE=$(date +%F);
TODAY_CHECKPOINT=replayer-checkpoint-$DATE.json;
TODAY_CHECKPOINT=mainnet-replayer-checkpoint-$DATE.json;
mv $DISK_CHECKPOINT $TODAY_CHECKPOINT;
echo "Uploading checkpoint file" $TODAY_CHECKPOINT;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $TODAY_CHECKPOINT gs://mainnet-replayer-checkpoints/$TODAY_CHECKPOINT;
echo "Replayer errors:";
grep Error replayer.log;
HAVE_ERRORS=$?;
if [ $HAVE_ERRORS -eq 0 ];
then REPLAYER_ERRORS=replayer_errors_${DATE};
then REPLAYER_ERRORS=mainnet-replayer_errors_${DATE};
echo "The replayer found errors, uploading log" $REPLAYER_ERRORS;
mv replayer.log $REPLAYER_ERRORS;
gsutil -o Credentials:gs_service_key_file=/gcloud/keyfile.json cp $REPLAYER_ERRORS gs://mainnet-replayer-checkpoints/$REPLAYER_ERRORS;
Expand Down

0 comments on commit 37d1972

Please sign in to comment.