Azure / azure-iot-cli-extension

Azure IoT extension for Azure CLI
Other
82 stars 65 forks source link

Embedded CLI Subscription fix #573

Closed vilit1 closed 1 year ago

vilit1 commented 1 year ago

Customer has pointed out that dt create with --subscription does not work. Upon inspection, it was determined that the group show command used to get location of the resource group was not passing in the user defined subscription.

This adds an optional user_subscription to the EmbeddedCLI class. If it is defined, then it will be used during invoke commands. However, a subscription passed into the invoke takes priority over the user_subscription (specifically for the endpoint commands).

This pr ensures all EmbeddedCLI's in non-test code use the user_subscription if defined.

Added a unit test to ensure embeddedcli functions as expected.

pipeline run for dt + adu: https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=6566&view=results


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Thank you for contributing to the IoT extension!

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

Intent for Production

Basic expectations

Azure IoT CLI maintainers reserve the right to enforce any of the outlined expectations.

A PR is considered ready for review when all basic expectations have been met (or do not apply).

vilit1 commented 1 year ago

https://dev.azure.com/azureiotdevxp/aziotcli/_build/results?buildId=6573&view=results

c-ryan-k commented 1 year ago

Let's get a history update and a version bump in here and we should be good 👍