-
Notifications
You must be signed in to change notification settings - Fork 0
Checks genomicsdb_query output directory and retry once with a new genomicsdb instance when azure access tokens expire #81
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
writer = None | ||
logging.info(f"Processed {msg}") | ||
return 0 | ||
except Exception as e: |
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.
Can we check for a specific exception here, or even check the exception message to only target the signature for what we think is expired tokens?
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.
Most of the time we see a GenomicsDBIteratorException. But, we cannot be really sure.
allow_retry = False | ||
try: | ||
if not gdb.workspace_exists(export_config.workspace): | ||
logging.info(f"Retrying query with a new instance of gdb for {msg}...") |
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.
Could you explain what we're trying to do with this check?
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 trying to check if the gdb is functional. If it is, it is probably not an expired token, I will document that better in the code. And maybe improve the logging message. Comments?
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.
lgtm
Add additional checks for genomicsdb_query when output's parent directory does not exist and exit out gracefully.