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

beginListActiveSessionsAndWait() does not return Sessions even though the api called by the sdk does return Sessions #25671

Open
5 of 6 tasks
MichaMican opened this issue Apr 26, 2023 · 23 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. 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 Network - Bastion Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@MichaMican
Copy link

MichaMican commented Apr 26, 2023

  • Package Name: @azure/arm-network
  • Package Version: 30.2.0
  • Operating system: Windows
  • nodejs
    • version: 16.15.0
  • browser
    • name/version: Chrome/112.0.5615.138
  • typescript
    • version: 4.9.5
  • Is the bug related to documentation in

Describe the bug
When using "beginListActiveSessionsAndWait" of the networkclient as described in Microsoft Docs or azure-sdk-for-js sample file i do not get back any sessions as a result, even though in the networking tab the sessions do appear.
image
image
-> I have also tried it when more than one session was active at the bastion - still the function of the sdk returned an empty array
Also in the Azure portal the sessions are displayed:
image

To Reproduce
Steps to reproduce the behavior:

  1. implement returnsAListOfCurrentlyActiveSessionsOnTheBastion() function as described in the docs
  2. create a bastion
  3. create vm
  4. connect to vm via bastion
  5. run the implemented returnsAListOfCurrentlyActiveSessionsOnTheBastion()

Expected behavior
The SDK function should return the same result as the API returns

Screenshots
image
image
image

Additional context
Add any other context about the problem here.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Apr 26, 2023
@xirzec xirzec added bug This issue requires a change to an existing behavior in the product in order to be resolved. Mgmt This issue is related to a management-plane library. Network and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Apr 26, 2023
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 26, 2023
@xirzec
Copy link
Member

xirzec commented Apr 26, 2023

Thank you @MichaMican for such a nicely detailed issue description.

@MichaMican
Copy link
Author

Hi all,
by any chance - are there any updates on this?

( @xirzec @qiaozha @kazrael2119 )

@kazrael2119
Copy link
Contributor

I can reproduce the result of your issue and am looking for the cause

@MichaMican
Copy link
Author

Hi @kazrael2119 - were you able to find the root cause? This issue is currently a blocker for us and we need to decide if we try to implement the pagination & session acquiring on our own or if this is beeing fixed in the foreseeable future

@kazrael2119
Copy link
Contributor

kazrael2119 commented May 22, 2023

Hi @kazrael2119 - were you able to find the root cause? This issue is currently a blocker for us and we need to decide if we try to implement the pagination & session acquiring on our own or if this is beeing fixed in the foreseeable future

@MichaMican ,
In swagger https://github.com/Azure/azure-rest-api-specs/blob/efd49b89cbc6b44f81056affc40cb7b96b520474/specification/network/resource-manager/Microsoft.Network/stable/2022-11-01/bastionHost.json#L874 the resonse should contains "value" and "nextlink" ,
and in "value", it contains your expected behavior:https://github.com/Azure/azure-rest-api-specs/blob/efd49b89cbc6b44f81056affc40cb7b96b520474/specification/network/resource-manager/Microsoft.Network/stable/2022-11-01/bastionHost.json#L806

see the example response in swagger:https://github.com/Azure/azure-rest-api-specs/blob/efd49b89cbc6b44f81056affc40cb7b96b520474/specification/network/resource-manager/Microsoft.Network/stable/2022-11-01/examples/BastionSessionsList.json#L10

but actually, the response body doesn't follow this chema which doesn't have nextlink parameter, I think this bug is caused by this

@qiaozha qiaozha added the Service Attention Workflow: This issue is responsible by Azure service team. label May 22, 2023
@github-actions
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.

@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label May 22, 2023
@MichaMican
Copy link
Author

@qiaozha @kazrael2119 Any updates on this?

@qiaozha
Copy link
Member

qiaozha commented Jul 19, 2023

Service backend needs to fix this mismatch. I have been trying to contact service team, there's not much we can do in the SDK side. If you like, you may open a support ticket https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

@MichaMican
Copy link
Author

Hi @qiaozha i am a bit confused why this should be a backed issue? As shown in the screenshots the backend returns the correct values, and the azure portal frontend also can deal with it correctly - So I would be very suprised if this is not fixable within the SDK

@kazrael2119
Copy link
Contributor

@MichaMican, The raw response is unicode encoded. And the response mey be not match with the response defined in swagger.That's why we got unexpected value: [].

@MichaMican
Copy link
Author

Thanks for the clarification - Can you move that forward to the respective team internally?

@kazrael2119
Copy link
Contributor

“service attention” label is added, we only can wait for service feedback

@MichaMican
Copy link
Author

Any update on this?

@qiaozha qiaozha added Service Attention Workflow: This issue is responsible by Azure service team. and removed Service Attention Workflow: This issue is responsible by Azure service team. labels Oct 7, 2023
@github-actions
Copy link

github-actions bot commented Oct 7, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.

@MichaMican
Copy link
Author

Any update on this? (@qiaozha )

@qiaozha
Copy link
Member

qiaozha commented Nov 16, 2023

I will ping service team again, but no promises here. Sorry. You probably should open a support ticket https://azure.microsoft.com/en-us/support/create-ticket which might get your issue resolved sooner.

@abhi7860
Copy link
Member

@MichaMican Since the final state is set via 'location', have you tried implementing a LRO poll on location? Using REST client, that returns the appropriate results and should unblock you temporarily while we investigate and make a permanent fix

@MichaMican
Copy link
Author

@abhi7860 Will take a look into it thanks for the heads up.

However a library native approach is preferred for obvious reasons - so keep me posted on the status of the fix.

@abhi7860
Copy link
Member

@MichaMican Did this ever work for you before and recently stopped working? Perhaps, because of a package upgrade?

@MichaMican
Copy link
Author

Hi @abhi7860 - No unfortunately not to my knowledge - I just installed the package for the first time and it did not work so I opened this issue.

@abhi7860
Copy link
Member

https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/MIGRATION-guide-for-next-generation-management-libraries.md#long-running-operations

I see that because of some recent changes devs need to implement LRO poller. I wonder if the SDK is not responding because of that

@qiaozha
Copy link
Member

qiaozha commented Nov 22, 2023

We should already eliminate the possible cause from the SDK side before reporting to service side @abhi7860 #25671 (comment) this is the root cause based on our investigation, I think it should be clear for you, feel free to let us know if it isn't.

@qiaozha qiaozha assigned abhi7860 and unassigned qiaozha and kazrael2119 Nov 22, 2023
@MichaMican
Copy link
Author

Any updates on this? @kazrael2119 @qiaozha @abhi7860 - The problem is still persistent and in my opinion there is no simple workarround for this - i basically would have to implement the calling of the api completely on my own, hence i'd have to ditch the library alltogether

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. 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 Network - Bastion Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants