Skip to content

Conversation

@nalinigans
Copy link
Member

@nalinigans nalinigans commented Dec 19, 2024

This PR allows the python layer to surface error messages from native GenomicsDB if they exist. For example :

examples/genomicsdb_query -w az://fdfd@foo.blob/f --list-partitions
10:16:03.260 error NativeGenomicsDB - pid=34941 tid=9289702 [TileDB::StorageManagerConfig] Error: Azure Storage Blob initialization failed for home=az://fdfd@foo.blob/f[TileDB::FileSystem] Error: (AzureBlob) Azure: Could not authenticate via AZURE_STORAGE_KEY or AZURE_STORAGE_SAS_TOKEN env vars. Trying to get access token directly via CLI path=az://fdfd@foo.blob/f errno=2(No such file or directory)
[TileDB::FileSystem] Error: Could not get credentials for azure storage account=foo. Try setting environment variables AZURE_STORAGE_KEY or AZURE_STORAGE_SAS_TOKEN before restarting operation: Input/output error
Traceback (most recent call last):
  File "/Users/nalini/GenomicsDB-Python/examples/genomicsdb_query", line 396, in <module>
    main()
  File "/Users/nalini/GenomicsDB-Python/examples/genomicsdb_query", line 296, in main
    gdb, workspace, partitions, contigs_map, intervals, row_tuples, args = setup_gdb()
                                                                           ^^^^^^^^^^^
  File "/Users/nalini/GenomicsDB-Python/examples/genomicsdb_query", line 208, in setup_gdb
    raise RuntimeError(f"workspace({workspace}) not found")
RuntimeError: workspace(az://fdfd@foo.blob/f) not found
examples/genomicsdb_query -w az://genomicsdb/f --list-partitions
10:19:05.311 error NativeGenomicsDB - pid=35368 tid=9294781 [TileDB::StorageManagerConfig] Error: Azure Storage Blob initialization failed for home=az://genomicsdb/f
[TileDB::FileSystem] Error: Azure Blob URI does not seem to have an account specified nor does it have AZURE_ACCOUNT_NAME env set: Invalid argument
Traceback (most recent call last):
  File "/Users/nalini/GenomicsDB-Python/examples/genomicsdb_query", line 396, in <module>
    main()
  File "/Users/nalini/GenomicsDB-Python/examples/genomicsdb_query", line 296, in main
    gdb, workspace, partitions, contigs_map, intervals, row_tuples, args = setup_gdb()
                                                                           ^^^^^^^^^^^
  File "/Users/nalini/GenomicsDB-Python/examples/genomicsdb_query", line 208, in setup_gdb
    raise RuntimeError(f"workspace({workspace}) not found")
RuntimeError: workspace(az://genomicsdb/f) not found

@nalinigans nalinigans requested a review from mlathara December 19, 2024 18:19
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
Copy link
Member Author

Allow the python layer to surface error messages from native GenomicsDB if they exist.

@nalinigans nalinigans merged commit 9faa9f1 into develop Dec 19, 2024
17 checks passed
@nalinigans nalinigans deleted the ng_errmsg branch December 19, 2024 21:15
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