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

Improve performance of package load and command execution #2819

Merged
merged 63 commits into from Apr 11, 2017

Conversation

johanste
Copy link
Member


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

General Guidelines

  • The PR has modified HISTORY.rst with an appropriate description of the change (see Modifying change log).

Command Guidelines

  • [N/A] Each command and parameter has a meaningful description.
  • [N/A] Each new command has a test.

(see Authoring Command Modules)

Delay load azure modules as much as possible to improve startup time.

  • Exception and return value handling in general execution path now avoids loading msrest*, azure-mgmt-* as well azure- modules. Loading any of said modules bring in expensive dependencies such as requests.
  • Minimize the number of commands that are fed into argparse.ArgumentParser. This caused execution of az (without parameters) to be very slow, particularly on systems with less powerful CPUs.

johanste and others added 30 commits April 4, 2017 15:34
…figuration.

- Removed unused configuration object/argv on application create.
…ure#2763)

* Update test docs for running individual test and all tests in mod

* Made feedback changes
Make lock command parameter aliases match up with resource commands.
…M in lab (Azure#2767)

* WIP create linux + Windows vm in lab

* Adding recording
Add more validation to resolve "lock level" for lock commands.
* Core:apply configured defaults on optional argument

* add a test

* add tests

* update history doc

* address review feedback
* Fix doc references to azure.cli.commands

This module has moved to azure.cli.core.commands

* Fix PyLint
* Add clearer guidelines on modifying changelog

* A few smaller changes

* another small format change

* Code review changes
…idation fail… (Azure#2764)

* nulling out the windows profile so that there isn't a valdiation failure for missing password

ACS doesn't return a password on GET. az acs scale command does a GET
then PUT, but since ACS doesn't return the password the verification is
failing before the PUT is sent to ACS.

There is a bug in ACS this exposes. So this shouldn't be merged until
after the ACS rollout finishes. Should be about start of next week.

* updating history

* updating version in history

* removing white space added by editor
…#2773)

* Fix issues with VMSS and VM availability set update.

* Update help. Fix Azure#2762.
@codecov-io
Copy link

Codecov Report

Merging #2819 into master will increase coverage by 0.04%.
The diff coverage is 67.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2819      +/-   ##
==========================================
+ Coverage   62.89%   62.94%   +0.04%     
==========================================
  Files         480      481       +1     
  Lines       26012    26074      +62     
  Branches     3946     3956      +10     
==========================================
+ Hits        16361    16412      +51     
- Misses       8627     8634       +7     
- Partials     1024     1028       +4
Impacted Files Coverage Δ
...re-cli-iot/azure/cli/command_modules/iot/custom.py 82.75% <ø> (-0.1%) ⬇️
...rofile/azure/cli/command_modules/profile/custom.py 32.39% <0%> (-2.82%) ⬇️
...gure/azure/cli/command_modules/configure/custom.py 15.31% <0%> (-0.91%) ⬇️
...i-batch/azure/cli/command_modules/batch/_params.py 100% <100%> (ø) ⬆️
...rage/azure/cli/command_modules/storage/commands.py 98.77% <100%> (ø) ⬆️
...tch/azure/cli/command_modules/batch/_validators.py 75.38% <100%> (+7.51%) ⬆️
...li-role/azure/cli/command_modules/role/commands.py 86.95% <100%> (ø) ⬆️
...orage/azure/cli/command_modules/storage/_params.py 87.43% <100%> (+0.03%) ⬆️
src/azure-cli-core/azure/cli/core/parser.py 81.37% <100%> (ø) ⬆️
...azure/cli/command_modules/storage/_command_type.py 100% <100%> (ø) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de6fe79...dec0001. Read the comment docs.

Copy link
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -852,6 +854,45 @@ def _load_transformed_arguments(self, handler):
help=docstring))


def validate_client_parameters(namespace):
"""Retrieves Batch connection parameters from environment variables"""
from azure.mgmt.batch import BatchManagementClient
Copy link
Member

Choose a reason for hiding this comment

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

Is this just relocated or is it refactored? If so, might want @annatisch to review.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is just relocated. Adding @annatisch as a reviewer either way. Good call!

@johanste johanste requested a review from annatisch April 10, 2017 23:07
@derekbekoe
Copy link
Member

FYI @oakeyc this may impact you also.

Copy link
Member

@derekbekoe derekbekoe left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@annatisch annatisch left a comment

Choose a reason for hiding this comment

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

Seems okay to me :)

@tjprescott tjprescott merged commit 4c6cc97 into Azure:master Apr 11, 2017
@johanste johanste deleted the command_package_load branch October 5, 2018 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet