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

[BUG] Not able to fetch Hybrid Connections for App Service Plan #34745

Closed
JagodaMika opened this issue Mar 7, 2023 · 4 comments · Fixed by #34838
Closed

[BUG] Not able to fetch Hybrid Connections for App Service Plan #34745

JagodaMika opened this issue Mar 7, 2023 · 4 comments · Fixed by #34838
Assignees
Labels
App Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@JagodaMika
Copy link

JagodaMika commented Mar 7, 2023

Library name and version

Azure.ResourceManager.AppService v1.0.1

Describe the bug

Not able to retrieve all Hybrid Connections in use in given App Service plan.

Expected behavior

Being able to get a list of Hybrid Connections from App Service plan

Actual behavior

When trying to iterate over a result from method GetHybridConnectionRelaysAsync() I receive an error:
Invalid URI: The format of the URI could not be determined.

at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString)
at Azure.ResourceManager.AppService.HybridConnectionData.DeserializeHybridConnectionData(JsonElement element)
at Azure.Core.PageableHelpers.PageableImplementation`1.d__17.MoveNext()

Reproduction Steps

  1. Get appServicePlan from ResourceGroup - ResourceGroup.GetAppServicePlanAsync();
  2. Invoke GetHybridConnectionRelaysAsync() on returned appServicePlan
  3. Try to iterate over result (according to Microsoft documentation - https://learn.microsoft.com/pl-pl/dotnet/api/azure.asyncpageable-1?view=azure-dotnet

Environment

No response

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 7, 2023
@jsquire jsquire added App Services Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Mar 7, 2023
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 7, 2023
@jsquire
Copy link
Member

jsquire commented Mar 7, 2023

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@ArcturusZhang
Copy link
Member

Hi @JagodaMika
This is probably caused by the inconsistent format on one of the properties on this HybridConnectionData, highly probable to be this property which says it is an "ArmUri" but actually means an arm resource id instead of Uri.

To confirm, could you please provide some log around that request? You could have the raw request and response by adding this listener before you run the problematic code:

using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger(System.Diagnostics.Tracing.EventLevel.Verbose);

And add this ClientOptions when you are constructing the ArmClient instance

new ArmClientOptions()
{
    Diagnostics = {
        IsLoggingContentEnabled = true
    }
}

By doing these two, you should be able to see the request log and could you please paste the response of request GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays here so that we could confirm the root cause of this issue?

@ArcturusZhang ArcturusZhang added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Mar 10, 2023
@ghost ghost removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 10, 2023
@ArcturusZhang ArcturusZhang removed the needs-author-feedback Workflow: More information is needed from author to address the issue. label Mar 10, 2023
@ArcturusZhang
Copy link
Member

OK never mind, I am able to reproduce the response and it looks like this:

{
  "value": [
    {
      "id": "/subscriptions/{subId}/resourceGroups/arcturus-test/providers/Microsoft.Web/serverfarms/arcturus-plan2/hybridConnectionNamespaces/arcturus-servicebus/relays/arcturusConnection",
      "name": "arcturusConnection",
      "type": "Microsoft.Web/serverfarms/hybridConnectionNamespaces/relays",
      "location": "East US",
      "properties": {
        "serviceBusNamespace": "arcturus-servicebus",
        "relayName": "arcturusConnection",
        "relayArmUri": "/subscriptions/{subId}/resourceGroups/arcturus-test/providers/Microsoft.Relay/namespaces/arcturus-servicebus/HybridConnections/arcturusConnection",
        "hostname": "arcturusHost",
        "port": 999,
        "sendKeyName": "defaultSender",
        "sendKeyValue": "",
        "serviceBusSuffix": ".servicebus.windows.net"
      }
    }
  ],
  "nextLink": null,
  "id": null
}

We will come up to a fix very soon.

@JagodaMika
Copy link
Author

Great, thanks!

ArcturusZhang added a commit to ArcturusZhang/azure-sdk-for-net that referenced this issue Mar 10, 2023
ArcturusZhang added a commit that referenced this issue Mar 14, 2023
* fix issue #34745

* update changelog

* add message for the new property
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
App Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants