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

[Az.Synapse 0.14.0] Get-AzSynapseWorkspace resource provider 2021-04-01-preview unsupported in some clouds #15616

Open
cutecycle opened this issue Aug 4, 2021 · 9 comments
Labels
Service Attention This issue is responsible by Azure service team. Synapse

Comments

@cutecycle
Copy link
Contributor

cutecycle commented Aug 4, 2021

Description

Debug Output

021-08-04T22:06:31.7665348Z 
2021-08-04T22:06:31.7666132Z https://management.usgovcloudapi.net/subscriptions/****/providers/Microsoft.Synapse/wor
2021-08-04T22:06:31.7666949Z kspaces?api-version=2021-04-01-preview
2021-08-04T22:06:31.7667181Z 
2021-08-04T22:06:31.7667536Z 
2021-08-04T22:06:31.7667691Z 
2021-08-04T22:06:31.7668086Z Headers:
2021-08-04T22:06:31.7668259Z 
2021-08-04T22:06:31.7668777Z x-ms-client-request-id        : f0909aed-68b9-434c-a13c-134b501b1ffb
2021-08-04T22:06:31.7669081Z 
2021-08-04T22:06:31.7669529Z accept-language               : en-US
2021-08-04T22:06:31.7669777Z 
2021-08-04T22:06:31.7669923Z 
2021-08-04T22:06:31.7670084Z 
2021-08-04T22:06:31.7670580Z Body:
2021-08-04T22:06:31.7670740Z 
2021-08-04T22:06:31.7670890Z 
2021-08-04T22:06:31.7671041Z 
2021-08-04T22:06:31.7671261Z 
2021-08-04T22:06:31.7691055Z DEBUG: ============================ HTTP RESPONSE ============================
2021-08-04T22:06:31.7691410Z 
2021-08-04T22:06:31.7691885Z 
2021-08-04T22:06:31.7692209Z 
2021-08-04T22:06:31.7692763Z Status Code:
2021-08-04T22:06:31.7693083Z 
2021-08-04T22:06:31.7693576Z NotFound
2021-08-04T22:06:31.7693878Z 
2021-08-04T22:06:31.7694152Z 
2021-08-04T22:06:31.7694425Z 
2021-08-04T22:06:31.7695033Z Headers:
2021-08-04T22:06:31.7695461Z 
2021-08-04T22:06:31.7696043Z Pragma                        : no-cache
2021-08-04T22:06:31.7696400Z 
2021-08-04T22:06:31.7696999Z x-ms-failure-cause            : gateway
2021-08-04T22:06:31.7697370Z 
2021-08-04T22:06:31.7698098Z x-ms-request-id               : 09f3c706-fced-435b-a57c-5b4826c752c4
2021-08-04T22:06:31.7698641Z 
2021-08-04T22:06:31.7699254Z x-ms-correlation-request-id   : 09f3c706-fced-435b-a57c-5b4826c752c4
2021-08-04T22:06:31.7699658Z 
2021-08-04T22:06:31.7700343Z x-ms-routing-request-id       : USGOVTEXAS:20210804T220631Z:09f3c706-fced-435b-a57c-5b4826c752c4
2021-08-04T22:06:31.7700926Z 
2021-08-04T22:06:31.7701561Z Strict-Transport-Security     : max-age=31536000; includeSubDomains
2021-08-04T22:06:31.7701980Z 
2021-08-04T22:06:31.7702570Z X-Content-Type-Options        : nosniff
2021-08-04T22:06:31.7702935Z 
2021-08-04T22:06:31.7703532Z Cache-Control                 : no-cache
2021-08-04T22:06:31.7703883Z 
2021-08-04T22:06:31.7704527Z Date                          : Wed, 04 Aug 2021 22:06:30 GMT
2021-08-04T22:06:31.7704952Z 
2021-08-04T22:06:31.7705230Z 
2021-08-04T22:06:31.7705916Z 
2021-08-04T22:06:31.7706630Z Body:
2021-08-04T22:06:31.7706996Z 
2021-08-04T22:06:31.7707496Z {
2021-08-04T22:06:31.7707984Z 
2021-08-04T22:06:31.7708780Z   "error": {
2021-08-04T22:06:31.7709131Z 
2021-08-04T22:06:31.7709707Z     "code": "InvalidResourceType",
2021-08-04T22:06:31.7710041Z 
2021-08-04T22:06:31.7710775Z     "message": "The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version 
2021-08-04T22:06:31.7711708Z '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'."
2021-08-04T22:06:31.7712188Z 
2021-08-04T22:06:31.7712707Z   }
2021-08-04T22:06:31.7712998Z 
2021-08-04T22:06:31.7713495Z }
2021-08-04T22:06:31.7713772Z 

Error Output

##[debug]+ Get-AzSynapseWorkspace -name "***********"
##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##[debug]    + CategoryInfo          : CloseError: (:) [Get-AzSynapseWorkspace], AzPSResourceNotFoundCloudException
##[debug]    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Synapse.GetAzureSynapseWorkspace
##[debug] 
##[debug]Script stack trace:
##[debug]at <ScriptBlock>, C:\agent\_work\_temp\97a5d7ff-b8c7-488b-b51e-59e84d3642d1.ps1: line 46
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]Exception:
##[debug]Microsoft.Azure.Commands.Common.Exceptions.AzPSResourceNotFoundCloudException: Operation returned an invalid status code 'NotFound' The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'. ---> Microsoft.Azure.Management.Synapse.Models.ErrorResponseException: Operation returned an invalid status code 'NotFound'
##[debug]   at Microsoft.Azure.Management.Synapse.WorkspacesOperations.<ListWithHttpMessagesAsync>d__10.MoveNext()
##[debug]--- End of stack trace from previous location where exception was thrown ---
##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
##[debug]   at Microsoft.Azure.Management.Synapse.WorkspacesOperationsExtensions.<ListAsync>d__11.MoveNext()
##[debug]--- End of stack trace from previous location where exception was thrown ---
##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
##[debug]   at Microsoft.Azure.Management.Synapse.WorkspacesOperationsExtensions.List(IWorkspacesOperations operations)
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.ListWorkspaces(String resourceGroupName)
##[debug]   --- End of inner exception stack trace ---
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.ListWorkspaces(String resourceGroupName)
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.GetResourceGroupByWorkspaceName(String workspaceName)
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.GetWorkspace(String resourceGroupName, String workspaceName)
##[debug]   at Microsoft.Azure.Commands.Synapse.GetAzureSynapseWorkspace.ExecuteCmdlet()
##[debug]   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
##[error]Operation returned an invalid status code 'NotFound' The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'.
##[debug]Processed: ##vso[task.logissue type=error]Operation returned an invalid status code 'NotFound' The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'.
##[debug]Exit code: 1

Steps to reproduce

(Get-AzSynapseWorkspace -WorkspaceName "workspaceName").ConnectivityEndpoints.SqlOnDemand

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.19041.1023
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1023
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@cutecycle cutecycle added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Aug 4, 2021
@cutecycle cutecycle changed the title [Az.Synapse 0.13.0] Get-AzSynapseWorkspace resource provider 2021-04-01-preview unsupported in some clouds [Az.Synapse 0.14.0] Get-AzSynapseWorkspace resource provider 2021-04-01-preview unsupported in some clouds Aug 4, 2021
@dingmeng-xue dingmeng-xue added Service Attention This issue is responsible by Azure service team. Synapse labels Aug 5, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Aug 5, 2021
@ghost
Copy link

ghost commented Aug 5, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aim-for-better, @idear1203.

Issue Details

Description

Debug Output

021-08-04T22:06:31.7665348Z 
2021-08-04T22:06:31.7666132Z https://management.usgovcloudapi.net/subscriptions/****/providers/Microsoft.Synapse/wor
2021-08-04T22:06:31.7666949Z kspaces?api-version=2021-04-01-preview
2021-08-04T22:06:31.7667181Z 
2021-08-04T22:06:31.7667536Z 
2021-08-04T22:06:31.7667691Z 
2021-08-04T22:06:31.7668086Z Headers:
2021-08-04T22:06:31.7668259Z 
2021-08-04T22:06:31.7668777Z x-ms-client-request-id        : f0909aed-68b9-434c-a13c-134b501b1ffb
2021-08-04T22:06:31.7669081Z 
2021-08-04T22:06:31.7669529Z accept-language               : en-US
2021-08-04T22:06:31.7669777Z 
2021-08-04T22:06:31.7669923Z 
2021-08-04T22:06:31.7670084Z 
2021-08-04T22:06:31.7670580Z Body:
2021-08-04T22:06:31.7670740Z 
2021-08-04T22:06:31.7670890Z 
2021-08-04T22:06:31.7671041Z 
2021-08-04T22:06:31.7671261Z 
2021-08-04T22:06:31.7691055Z DEBUG: ============================ HTTP RESPONSE ============================
2021-08-04T22:06:31.7691410Z 
2021-08-04T22:06:31.7691885Z 
2021-08-04T22:06:31.7692209Z 
2021-08-04T22:06:31.7692763Z Status Code:
2021-08-04T22:06:31.7693083Z 
2021-08-04T22:06:31.7693576Z NotFound
2021-08-04T22:06:31.7693878Z 
2021-08-04T22:06:31.7694152Z 
2021-08-04T22:06:31.7694425Z 
2021-08-04T22:06:31.7695033Z Headers:
2021-08-04T22:06:31.7695461Z 
2021-08-04T22:06:31.7696043Z Pragma                        : no-cache
2021-08-04T22:06:31.7696400Z 
2021-08-04T22:06:31.7696999Z x-ms-failure-cause            : gateway
2021-08-04T22:06:31.7697370Z 
2021-08-04T22:06:31.7698098Z x-ms-request-id               : 09f3c706-fced-435b-a57c-5b4826c752c4
2021-08-04T22:06:31.7698641Z 
2021-08-04T22:06:31.7699254Z x-ms-correlation-request-id   : 09f3c706-fced-435b-a57c-5b4826c752c4
2021-08-04T22:06:31.7699658Z 
2021-08-04T22:06:31.7700343Z x-ms-routing-request-id       : USGOVTEXAS:20210804T220631Z:09f3c706-fced-435b-a57c-5b4826c752c4
2021-08-04T22:06:31.7700926Z 
2021-08-04T22:06:31.7701561Z Strict-Transport-Security     : max-age=31536000; includeSubDomains
2021-08-04T22:06:31.7701980Z 
2021-08-04T22:06:31.7702570Z X-Content-Type-Options        : nosniff
2021-08-04T22:06:31.7702935Z 
2021-08-04T22:06:31.7703532Z Cache-Control                 : no-cache
2021-08-04T22:06:31.7703883Z 
2021-08-04T22:06:31.7704527Z Date                          : Wed, 04 Aug 2021 22:06:30 GMT
2021-08-04T22:06:31.7704952Z 
2021-08-04T22:06:31.7705230Z 
2021-08-04T22:06:31.7705916Z 
2021-08-04T22:06:31.7706630Z Body:
2021-08-04T22:06:31.7706996Z 
2021-08-04T22:06:31.7707496Z {
2021-08-04T22:06:31.7707984Z 
2021-08-04T22:06:31.7708780Z   "error": {
2021-08-04T22:06:31.7709131Z 
2021-08-04T22:06:31.7709707Z     "code": "InvalidResourceType",
2021-08-04T22:06:31.7710041Z 
2021-08-04T22:06:31.7710775Z     "message": "The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version 
2021-08-04T22:06:31.7711708Z '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'."
2021-08-04T22:06:31.7712188Z 
2021-08-04T22:06:31.7712707Z   }
2021-08-04T22:06:31.7712998Z 
2021-08-04T22:06:31.7713495Z }
2021-08-04T22:06:31.7713772Z 

Error Output

##[debug]+ Get-AzSynapseWorkspace -name "***********"
##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##[debug]    + CategoryInfo          : CloseError: (:) [Get-AzSynapseWorkspace], AzPSResourceNotFoundCloudException
##[debug]    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Synapse.GetAzureSynapseWorkspace
##[debug] 
##[debug]Script stack trace:
##[debug]at <ScriptBlock>, C:\agent\_work\_temp\97a5d7ff-b8c7-488b-b51e-59e84d3642d1.ps1: line 46
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]Exception:
##[debug]Microsoft.Azure.Commands.Common.Exceptions.AzPSResourceNotFoundCloudException: Operation returned an invalid status code 'NotFound' The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'. ---> Microsoft.Azure.Management.Synapse.Models.ErrorResponseException: Operation returned an invalid status code 'NotFound'
##[debug]   at Microsoft.Azure.Management.Synapse.WorkspacesOperations.<ListWithHttpMessagesAsync>d__10.MoveNext()
##[debug]--- End of stack trace from previous location where exception was thrown ---
##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
##[debug]   at Microsoft.Azure.Management.Synapse.WorkspacesOperationsExtensions.<ListAsync>d__11.MoveNext()
##[debug]--- End of stack trace from previous location where exception was thrown ---
##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
##[debug]   at Microsoft.Azure.Management.Synapse.WorkspacesOperationsExtensions.List(IWorkspacesOperations operations)
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.ListWorkspaces(String resourceGroupName)
##[debug]   --- End of inner exception stack trace ---
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.ListWorkspaces(String resourceGroupName)
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.GetResourceGroupByWorkspaceName(String workspaceName)
##[debug]   at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsManagementClient.GetWorkspace(String resourceGroupName, String workspaceName)
##[debug]   at Microsoft.Azure.Commands.Synapse.GetAzureSynapseWorkspace.ExecuteCmdlet()
##[debug]   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
##[error]Operation returned an invalid status code 'NotFound' The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'.
##[debug]Processed: ##vso[task.logissue type=error]Operation returned an invalid status code 'NotFound' The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01'.
##[debug]Exit code: 1

Steps to reproduce

(Get-AzSynapseWorkspace -WorkspaceName "workspaceName").ConnectivityEndpoints.SqlOnDemand

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.19041.1023
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1023
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Author: cutecycle
Assignees: -
Labels:

Service Attention, Synapse, needs-triage

Milestone: -

@idear1203
Copy link
Contributor

Thanks for reaching out! I will do some investigation first.

@cutecycle
Copy link
Contributor Author

Additionally: this cmdlet does not seem to throw the correct exit code when failing with this error.

Update-AzSynapseWorkspace : Operation returned an invalid status code 'NotFound' The resource type 'workspaces' could 
not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are 
'2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01,2021-06-01'.
At C:\agent\_work\_temp\c12e2fb1-3a83-47e2-bfff-34a598ffadc8.ps1:38 char:1
+ Update-AzSynapseWorkspace -WorkspaceName $workspaceName -SqlAdministr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Update-AzSynapseWorkspace], AzPSResourceNotFoundCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Synapse.UpdateAzureSynapseWorkspace
 
##[debug]Exit code: 0
##[debug]Leaving Invoke-VstsTool.

@idear1203
Copy link
Contributor

@dingmeng-xue could you please take a look at the exit code issue? Code link is here: Update-AzSynapseWorkspace . We don't have control about the exit code?

@dingmeng-xue
Copy link
Member

The error message reflects message from service. You can see The resource type 'workspaces' could not be found in the namespace 'Microsoft.Synapse' for api version '2021-04-01-preview'. The supported api-versions are '2019-06-01-preview,2020-12-01,2021-03-01,2021-05-01,2021-06-01'.

It seems 2021-04-01-preview is not available in that Azure environment.

@idear1203
Copy link
Contributor

@dingmeng-xue this is true and we are actively working on fix for the API version issue. However, I want to understand that when the exception is thrown, why the exit code of the PowerShell cmdlet is zero?

@dingmeng-xue
Copy link
Member

Status Code is 404 which is NotFound literally.

@idear1203
Copy link
Contributor

@cutecycle may I know how you get the following message:

##[debug]Exit code: 0
##[debug]Leaving Invoke-VstsTool.

These are not the output of the PowerShell cmdlet. If you want to check status code of the PowerShell cmdlet, please use $?. If the value is False, it indicates the last command isn't successful.

@cutecycle
Copy link
Contributor Author

cutecycle commented Sep 1, 2021

@idear1203 I think you might be right; this cmdlet is being wrapped in an Azure DevOps AzurePowerShell task which may not be retrieving the exit code properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service Attention This issue is responsible by Azure service team. Synapse
Projects
None yet
Development

No branches or pull requests

3 participants