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

Location data #2

Merged
merged 79 commits into from
May 18, 2020
Merged

Location data #2

merged 79 commits into from
May 18, 2020

Conversation

akashkeshari
Copy link
Owner


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

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
api_response = api_instance.list_node()
return len(api_response.items)
except ApiException as e:
print("Exception when calling CoreV1Api->list_node: %s\n" % e)

Choose a reason for hiding this comment

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

why are we not raising CLIError here?. Same for get_server_version and get_agent_version

src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
check_helm_version(kube_config, kube_context)

# Validate location
resourceClient = _resource_client_factory(cmd.cli_ctx, subscription_id=subscription_id)
if location is None:
try:
location = resourceClient.resource_groups.get(resource_group_name).location

Choose a reason for hiding this comment

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

The error string in except clause needs to be changed from

raise CLIError("The provided resource group does not exist. Please provide location to create the Resource Group")

to

raise CLIError("The resource group '{}' does not exist and has to be created. Connected cluster resource creation is supported only in the locations:  ".format(resource_group_name)  + ', '.join(map(str, rp_locations)) + ". Use the --location flag to specify one of these locations.")

src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
connect_agent_state = None
if connect_agent_state is None:
raise CLIError("There was a problem with connect-agent deployment. Please run 'kubectl -n azure-arc logs -l app.kubernetes.io/component=connect-agent -c connect-agent' to debug the error.")
logger.warning("Exception when calling get pods: %s\n" % e)

Choose a reason for hiding this comment

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

If this log line is printed on CLI output, change to

logger.warning("Error occurred when retrieving pod information: %s\n" % e)

src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
src/connectedk8s/azext_connectedk8s/custom.py Outdated Show resolved Hide resolved
try:
client.delete(resource_group_name, cluster_name)
except CloudError as ex:
raise CLIError(ex)

Choose a reason for hiding this comment

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

Question: What's printed in such cases? Entire verbose content of error? Also would this be printed even without user specifying --debug?

akashkeshari and others added 21 commits April 21, 2020 09:13
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Co-Authored-By: Shashank Barsin <shashankbarsin@users.noreply.github.com>
Akash Keshari and others added 27 commits April 30, 2020 20:45
* feat: add aks-custom-headers for nodepool and update

add version change

add parameters

* fix test failure

add help
* WIP {KubernetesConfiguration} Add CLI

* Fix Pylint errors

* Added Scenario test and addressed review comments

* Address review comments

* Added to CodeOwners and other fixes

* Fix more errors reported by static tools

* Fix one more error reported by static tool

* Updated the SDK with the official version

* Update src/k8sconfiguration/azext_k8sconfiguration/commands.py

Co-Authored-By: Feiyue Yu <iamyfy@163.com>

* Address PR comments

* Updated the sdk files to fix api-version parameter issue

* Update src/k8sconfiguration/azext_k8sconfiguration/custom.py

Co-Authored-By: Xiaojian Xu <arrownj@126.com>

* addressed more comments

* remove Optional from help message

* Remove azure-cli-core dependency

* Pulled new version of sdk, and help text update

* Updated test and other style fixes

* Removed unused import

* Update min Cli core version

* Added revision to the updated minCliCoreVersion

Co-authored-by: nanthi <nanthi@NANTHI01>
Co-authored-by: Feiyue Yu <iamyfy@163.com>
Co-authored-by: Xiaojian Xu <arrownj@126.com>
Co-authored-by: Xiaojian Xu <xiaojxu@microsoft.com>
…#1700)

Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=392553

Last commit: Azure@df6806d
@akashkeshari akashkeshari merged commit 65e69b8 into master May 18, 2020
akashkeshari pushed a commit that referenced this pull request Aug 13, 2020
…e#1887)

* Added --enable-azure-rbac flag in ManagedClusterAadProfile (#2)

* Changed flag to enable-azure-rbac instead of aad-enable-azure-rbac

* resolving comment for akspreview

* Regenerated recordings for aks-preview ingress appgw

Co-authored-by: root <root@anshenoVM.da12rmhqn3xunlrjlf1ytzev1d.bx.internal.cloudapp.net>
akashkeshari pushed a commit that referenced this pull request Feb 8, 2021
* Azure quantum extension v0 (#2)

Initial version.

* Fixing style issues

* Incorporating feedback (#6)

* readme
* feedback

* Help

* Make storage account optional (Azure#7)

* Storage is now optional (Azure#8)

* Making storage an argument, not an env variable (Azure#9)

* Adding implementation of 'az quantum workspace delete' command.

* Setting new temporary version.

* Fixing missing file in test change

* Adding details to README.md (#5)

* Updating generated files for Azure Quantum resource manager from new swagger file version

* Remove manual edit of generated file.

* Updating generated files for Azure Quantum data plane from new swagger file version

* Updating generated files for Azure Quantum resource manager from new swagger file version. (2020-11-06) (Azure#13)

* Adding implementation of 'az quantum workspace create' command. (Azure#14)

Adding initial implementation of 'az quantum workspace create' command.

-----------------------------------
Command
az quantum workspace create : Creates a new Azure Quantum workspace.
Command group 'quantum' is in preview. It may be changed/removed in a future
release.
Arguments
--location -l : Location. Values from: az account list-locations. You can configure
the default location using az configure --defaults location=<location>.
--resource-group -g : Name of resource group. You can configure the default group using az configure --defaults group=<name>.
--storage_account -sa : Name of the storage account to be used by a quantum workspace.
--workspace-name -w : Name of the Quantum Workspace. You can configure the default workspace
using az quantum workspace set.

* Update Azure CLI quantum extension to multi-region (Azure#17)

This change will set the URL for the data plan API accordingly with a location parameter specified as part of the command.

* Updating swagger files per commit 44563991425d862ba4e8090a2b5b6caf8333600c in azure-rest-api-specs-pr. (Azure#16)

Updating swagger files per commit 44563991425d862ba4e8090a2b5b6caf8333600c in azure-rest-api-specs-pr.

* Fixing tests for multi-region URL change on Az CLI quantum extension (Azure#19)

Fixing tests for multi-region URL change on Az CLI quantum extension

* Incorporating ARM feedback  (Azure#18)

* Picking up latest changes from swagger after ARM feedback

* updated create_or_update

* run command

* Setting default location in workspace calls if not specified (Azure#20)

* updating python azure quantum rest client (Azure#21)

* Update generated files from swagger file (Version 2021-01-11) (Azure#22)

* Hot fixes on December 2020 release of Azure CLI extension (Azure#23)

* Fixing issue with over specification of location
* Updating version information of extension

* Update CLI with generated clients from more recent swagger files (Azure#24)

- Data plane updated to official swagger file (2021-01-11 19:01:32 UTC) on azure-rest-api-specs @ 98ae52b.

- Resource manager updated to candidate swagger file (2021-01-15 19:35:41 UTC) on anpaz:quantum/resource-manager @ a9a9e271c13500aa54fdbb1bcb656eb61d82d38b.

* Update src/quantum/README.rst

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* Update src/quantum/README.rst

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* Update src/quantum/README.rst

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* Update src/quantum/README.rst

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* Require location as a mandatory parameter in workspace specification (Azure#25)

* Make location mandatory in commands
* Update test recordings

* Resetting the version history for the released version.

* Fix description of workspace clear command

* Updatig Readme file to RST format.

* Update Readme file per pull request comments.

* Fixing az quantum run and execute commands to include location parameter

* Performing role assignment on storage account on workspace creation. (Azure#29)

* Add warning message about providers during workspace creation (Azure#30)

* Enable command az quantum workspace quotas (Azure#31)

* Removing extra space in Readme.rst

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* Fix punctuation in Readme.rst

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* Update src/quantum/README.rst

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* Update src/quantum/azext_quantum/_params.py

Co-authored-by: Feiyue Yu <iamyfy@163.com>

* First round of code review feedback on Readme.rst

* Improve code readability on job commands

* Avoid IndexError in case of malformed URL

* Extended info on targetId parameter

* Add help to each individual command

* Reorganize sections in Readme.rst and merge in a single set of instructions.

* Static analysis fixes

* Fix CLI Linter errors

* Fix CLI Linter errors. Part 2

* Fix typo in show command.

* Fix show command for Linter

* Use standard name for show command method

* Modify workspace create test to skip role assignment

* Update tests with workspace names used currently.

* Update test recordings.

* Set subscription for the recordings.

* Update test recordings.

* Update QDK version number

* Remove asserts and checks for subscription

* Experiment: Remove check for preview subscription

* Refresh recordings with current test values.

* Update recordings after typo fix.

* Remove commented out API that references subscription

* Enable QuantumJobsScenarioTest.test_submit_args only on live mode

Co-authored-by: Ricardo Espinoza <ricardoe@microsoft.com>
Co-authored-by: Feiyue Yu <iamyfy@163.com>
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.

8 participants