Skip to content
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

Added check for storage type FileStorage where blob is not supported in storage tables. #418

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

bigdatasourav
Copy link
Contributor

@bigdatasourav bigdatasourav commented Dec 6, 2021

Example query results

Results # Before check
> select * from azure_storage_container
Error: storage.BlobContainersClient#List: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Blob is not supported for the account."
> select * from azure_storage_account
Error: storage.BlobServicesClient#GetServiceProperties: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Blob is not supported for the account."

> select * from azure_storage_blob_service
Error: storage.BlobServicesClient#List: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Blob is not supported for the account."
> select * from azure_storage_queue
Error: storage.QueueClient#List: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Queue is not supported for the account."

> select * from azure_storage_table
Error: storage.TableClient#List: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Table is not supported for the account."

> select * from azure_storage_table_service
Error: storage.TableServicesClient#List: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="FeatureNotSupportedForAccount" Message="Table is not supported for the account."

#After check

> select * from azure_storage_account
+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+--
| name      | id                                                                                                                                                     | type                              | a
+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+--
| testarnab | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/AzureBackupRG_southeastasia_1/providers/Microsoft.Storage/storageAccounts/testarnab | Microsoft.Storage/storageAccounts |  
+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+--
> select * from azure_storage_blob_service
+------+----+----------------------+------+----------+----------+-----------------------------------+---------------------+-------------------------+-----------------------+-------------------------------
| name | id | storage_account_name | type | sku_name | sku_tier | automatic_snapshot_policy_enabled | change_feed_enabled | default_service_version | is_versioning_enabled | container_delete_retention_pol
+------+----+----------------------+------+----------+----------+-----------------------------------+---------------------+-------------------------+-----------------------+-------------------------------
+------+----+----------------------+------+----------+----------+-----------------------------------+---------------------+-------------------------+-----------------------+-------------------------------
> select * from azure_storage_container
+------+----+--------------+---------+---------------+------+--------------------------+--------------+--------------------------------+-------------------------+----------------+--------------------+----
| name | id | account_name | deleted | public_access | type | default_encryption_scope | deleted_time | deny_encryption_scope_override | has_immutability_policy | has_legal_hold | last_modified_time | lea
+------+----+--------------+---------+---------------+------+--------------------------+--------------+--------------------------------+-------------------------+----------------+--------------------+----
+------+----+--------------+---------+---------------+------+--------------------------+--------------+--------------------------------+-------------------------+----------------+--------------------+----
> select * from azure_storage_queue
+------+----+----------------------+------+----------+-------+------+--------+----------------+-----------------+
| name | id | storage_account_name | type | metadata | title | akas | region | resource_group | subscription_id |
+------+----+----------------------+------+----------+-------+------+--------+----------------+-----------------+
+------+----+----------------------+------+----------+-------+------+--------+----------------+-----------------+
> select * from azure_storage_sync
+------+----+--------------------+------+-------------------------+---------------------+------------------+-----------------------------+--------------------------+------------------------------+-------+
| name | id | provisioning_state | type | incoming_traffic_policy | last_operation_name | last_workflow_id | storage_sync_service_status | storage_sync_service_uid | private_endpoint_connections | title |
+------+----+--------------------+------+-------------------------+---------------------+------------------+-----------------------------+--------------------------+------------------------------+-------+
+------+----+--------------------+------+-------------------------+---------------------+------------------+-----------------------------+--------------------------+------------------------------+-------+
> select * from azure_storage_table
+------+----+----------------------+------+-------+------+--------+----------------+-----------------+
| name | id | storage_account_name | type | title | akas | region | resource_group | subscription_id |
+------+----+----------------------+------+-------+------+--------+----------------+-----------------+
+------+----+----------------------+------+-------+------+--------+----------------+-----------------+
> select * from azure_storage_table_service
+------+----+----------------------+------+------------+-------+------+--------+----------------+-----------------+
| name | id | storage_account_name | type | cors_rules | title | akas | region | resource_group | subscription_id |
+------+----+----------------------+------+------------+-------+------+--------+----------------+-----------------+
+------+----+----------------------+------+------------+-------+------+--------+----------------+-----------------+

Copy link
Contributor

@ParthaI ParthaI left a comment

Choose a reason for hiding this comment

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

LGTM

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.

FeatureNotSupportedForAccount error is not ignored for applicable Storage related tables
3 participants