Skip to content

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

Merged
merged 7 commits into from
Feb 18, 2025

Conversation

nalinigans
Copy link
Member

Add additional checks for genomicsdb_query when output's parent directory does not exist and exit out gracefully.

@nalinigans nalinigans requested a review from mlathara February 13, 2025 21:13
@nalinigans nalinigans changed the title Additional checks for genomicsdb_query when output's parent directory does not exist Checks genomicsdb_query output directory and retry once with a new genomicsdb instance when azure access tokens expire Feb 15, 2025
writer = None
logging.info(f"Processed {msg}")
return 0
except Exception as e:
Copy link
Member

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?

Copy link
Member Author

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}...")
Copy link
Member

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?

Copy link
Member Author

@nalinigans nalinigans Feb 16, 2025

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?

@nalinigans nalinigans requested a review from mlathara February 16, 2025 22:20
Copy link
Member

@mlathara mlathara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nalinigans nalinigans merged commit 7cdb67c into develop Feb 18, 2025
8 checks passed
@nalinigans nalinigans deleted the ng_out branch February 18, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants