Skip to content

Commit

Permalink
handle errors during submitting jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikellepetrillo committed Feb 20, 2025
1 parent 4a76f68 commit efaeff9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/warp_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
run: |
# Wait 5.5 minutes for Dockstore to update
echo "Waiting for Dockstore to update..."
sleep 330
sleep 3
echo "Creating new method configuration for branch: $BRANCH_NAME"
Expand Down
19 changes: 7 additions & 12 deletions scripts/firecloud_api/firecloud_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import argparse
import logging
import time
import sys

# Configure logging to display INFO level and above messages
logging.basicConfig(
Expand Down Expand Up @@ -327,17 +328,6 @@ def get_workflow_outputs(self, submission_id, workflow_id, pipeline_name):
logging.error(f"Failed to retrieve workflow outputs. Status code: {response.status_code}")
return None, None

#def gsutil_copy(self, source, destination):
# #client = storage.Client() # Uses GOOGLE_APPLICATION_CREDENTIALS implicitly
# source_bucket_name, source_blob_name = source.replace("gs://", "").split("/", 1)
# destination_bucket_name, destination_blob_name = destination.replace("gs://", "").split("/", 1)

# source_bucket = self.storage_client.bucket(source_bucket_name)
# source_blob = source_bucket.blob(source_blob_name)
# destination_bucket = self.storage_client.bucket(destination_bucket_name)

# source_bucket.copy_blob(source_blob, destination_bucket, destination_blob_name)

def delete_method_config(self, method_config_name):
"""
Deletes a method configuration from the workspace.
Expand Down Expand Up @@ -541,7 +531,12 @@ def main(self):
submission_data = json.load(file)
# Submit the job with the loaded submission data
submission_id = api.submit_job(submission_data)
print(submission_id)
if submission_id:
print(submission_id)
logging.info("Submission successful.")
else:
logging.error("Submission failed.")
sys.exit(1) # Exit with error code

elif args.action == "poll_job_status":
if not args.submission_id:
Expand Down

0 comments on commit efaeff9

Please sign in to comment.