-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Alias 0.3.0 #105
Alias 0.3.0 #105
Conversation
If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:
|
src/alias/azext_alias/__init__.py
Outdated
@@ -3,37 +3,65 @@ | |||
# Licensed under the MIT License. See License.txt in the project root for license information. | |||
# -------------------------------------------------------------------------------------------- | |||
|
|||
# pylint: disable=line-too-long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this. You can break the line to fix in 120 char.
src/alias/azext_alias/__init__.py
Outdated
@@ -44,6 +72,12 @@ def alias_event_handler(_, **kwargs): | |||
# [:] will keep the reference of the original args | |||
args[:] = alias_manager.transform(args) | |||
|
|||
# Cache the reserved commands for validation later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have access to load_cmd_tbl_func
in custom.py
(need the entire command table for alias and command validation when the user invokes alias create
). This is a mechanism to save/cache the entire command table globally so custom.py
can have access to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be good to add this comment as an actual comment in the code. No-one is going to come back and look at this comment in this PR to try and understand it.
src/alias/azext_alias/__init__.py
Outdated
# Cache the reserved commands for validation later | ||
if args[:2] == ['alias', 'create']: | ||
load_cmd_tbl_func = kwargs.get('load_cmd_tbl_func', lambda _: {}) | ||
global cached_reserved_commands # pylint: disable=global-statement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to avoid global
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a class called AliasCache
to store the reserved commands.
src/alias/azext_alias/alias.py
Outdated
continue | ||
else: | ||
ignore_next_iter = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate the logic here in the comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic here is to not transform named arguments. For example, if you have an alias ls
pointing to list
, running az vm create -g xxx -n ls
should not yield az vm create -g xxx -n list
,
I think I can make it less ugly and more readable.
@chewong feel free to merge when @derekbekoe ack this. |
src/alias/azext_alias/__init__.py
Outdated
def load_arguments(self, _): | ||
with self.argument_context('alias') as c: | ||
c.argument('alias_name', options_list=['--name', '-n'], help='The name of the alias.', | ||
completer=get_alias_completer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to remove the completer for --name
on the 'az alias create' command other I'll get completions for aliases that already exist which is exactly what I wouldn't want.
src/alias/azext_alias/__init__.py
Outdated
@staticmethod | ||
def cache_reserved_commands(load_cmd_tbl_func): | ||
if not AliasCache.reserved_commands: | ||
AliasCache.reserved_commands = list(load_cmd_tbl_func([]).keys()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point in a class that has only one method, no constructor and even that method is static?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AliasCache.reserved_commands
could just be a variable like alias_cache_reserved_commands
and cache_reserved_commands
could be a regular method?
src/alias/azext_alias/__init__.py
Outdated
@@ -44,6 +72,12 @@ def alias_event_handler(_, **kwargs): | |||
# [:] will keep the reference of the original args | |||
args[:] = alias_manager.transform(args) | |||
|
|||
# Cache the reserved commands for validation later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be good to add this comment as an actual comment in the code. No-one is going to come back and look at this comment in this PR to try and understand it.
src/alias/azext_alias/__init__.py
Outdated
|
||
logger = get_logger(__name__) | ||
|
||
|
||
class AliasExtensionLoader(AzCommandsLoader): | ||
class AliasCommandLoader(AzCommandsLoader): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this name change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to AliasExtCommandLoader
.
src/alias/azext_alias/alias.py
Outdated
@@ -223,7 +197,7 @@ def load_full_command_table(self): | |||
Perform a full load of the command table to get all the reserved command words. | |||
""" | |||
load_cmd_tbl_func = self.kwargs.get('load_cmd_tbl_func', lambda _: {}) | |||
self.reserved_commands = list(load_cmd_tbl_func([]).keys()) | |||
azext_alias.AliasCache.reserved_commands = list(load_cmd_tbl_func([]).keys()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is similar to that in alias_event_handler
.
Should have a util method to update azext_alias.AliasCache.reserved_commands
so you don't have to duplicate this.
src/alias/azext_alias/alias.py
Outdated
post_transform_commands.append(os.path.expandvars(arg)) | ||
for i, arg in enumerate(args): | ||
# Do not translate environment variables for command argument | ||
if args[:2] == ['alias', 'create'] and i > 0 and args[i - 1] in ['-c', '--command']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider a util method called is_alias_create_command(args)
since I've seen this used in a few places. I believe that's what args[:2] == ['alias', 'create']
is for?
src/alias/azext_alias/custom.py
Outdated
except Exception: # pylint: disable=broad-except | ||
# Exception is being handled by self.load_alias_table in alias.py | ||
# so simply raise an empty CLIError to terminate all actions | ||
raise CLIError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass in a string to CLIError()
Currently, the user will see this for a bad alias file.
# az alias list
alias: Error parsing the configuration file - File contains no alias headers.file: '/root/.azure/alias', line: 1'rg]'. Please fix the problem manually.
Traceback (most recent call last):
File "/root/.azure/cliextensions/alias/azext_alias/custom.py", line 91, in _get_alias_table
alias_table.read(GLOBAL_ALIAS_PATH)
File "/usr/local/lib/python3.6/configparser.py", line 697, in read
self._read(fp, filename)
File "/usr/local/lib/python3.6/configparser.py", line 1080, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: '/root/.azure/alias', line: 1
'rg]\n'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 347, in execute
six.reraise(*sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 319, in execute
result = cmd(params)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 180, in __call__
return super(AzCliCommand, self).__call__(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/knack/commands.py", line 109, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 420, in default_command_handler
result = op(**command_args)
File "/root/.azure/cliextensions/alias/azext_alias/custom.py", line 58, in list_alias
alias_table = _get_alias_table()
File "/root/.azure/cliextensions/alias/azext_alias/custom.py", line 96, in _get_alias_table
raise CLIError()
knack.util.CLIError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/site-packages/azure/cli/__main__.py", line 39, in <module>
exit_code = cli_main(az_cli, sys.argv[1:])
File "/usr/local/lib/python3.6/site-packages/azure/cli/__main__.py", line 29, in cli_main
return cli.invoke(args)
File "/usr/local/lib/python3.6/site-packages/knack/cli.py", line 207, in invoke
exit_code = self.exception_handler(ex)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 85, in exception_handler
return handle_exception(ex)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/util.py", line 26, in handle_exception
logger.error(ex.args[0])
IndexError: tuple index out of range
As a quick test, I replaced the empty string with 'Unable to get aliases' and now I see this which is much better:
# az alias list
alias: Error parsing the configuration file - File contains no alias headers.file: '/root/.azure/alias', line: 1'rg]'. Please fix the problem manually.
Unable to get aliases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced this with return get_config_parser()
so az alias list
and other actions that depends on get_alias_table()
will just get an empty alias table.
src/alias/azext_alias/custom.py
Outdated
""" | ||
alias_name, alias_command = alias_name.strip(), alias_command.strip() | ||
_validate_alias_name(alias_name) | ||
_validate_alias_command(alias_command) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validation should happen in a _validators.py file.
See others in the CLI for examples.
Please modify the description in setup.py to conform to https://github.com/Azure/azure-cli-extensions/blob/master/docs/extension_summary_guidelines.md. |
) * Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model * Stage Public Version of k8s-extension 0.2.0 for official release (#15) * Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model Co-authored-by: [email protected] <Action - Fork Sync> * Remove custom pipelines file * Update extension description, remove private const * Update pipeline file * Disable refs docs * Update to include better create warning logs and remove update context (#20) * Update to include better create warning logs and remove update context * Remove help text for update * Fix spelling error * Update message * Fix k8s-extension conflict with private version * Fix style errors * Fix filename * add customization for microsoft.azureml.kubernetes (#23) * add customization for microsoft.azureml.kubernetes * Update release history Co-authored-by: Yue Yu <[email protected]> Co-authored-by: jonathan-innis <[email protected]> * Add E2E Testing from Separate branch into internal code (#26) * Add internal e2e testing * Change to testing folder * Inference CLI validation for Scoring FE (#24) * cli validation starter * added the call to the fe validation function * nodeport validation not required * test fix Co-authored-by: Jonathan Innis <[email protected]> * legal warning added (#27) * Remove deprecated method logger.warn * Update k8s-custom-pipelines.yml for Azure Pipelines * Update k8s-custom-pipelines.yml for Azure Pipelines * Add Azure Defender to E2E testing (#28) * Add azure defender testing to e2e * Remove the debug flag * Add configuration testing * Fix pipeline failures * Make test script more intuitive * Remove parameter from testing * Fix wrong location for k8s config whl * Fix pip upgrade issue * Fix pip install upgrade issue * Fix pip install issue * delete resurce in testcase (#29) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Check Provider is Registered with Subscription Before Making Requests (#18) * Add check for KubernetesConfiguration * Disable pylint and rename * Update provider registration link * Update version * Remove extra blank line * Fix bug in import * only validate scoring fe when inference is enabled (#31) * only validate scoring fe when inference is enabled * Fix versioning Co-authored-by: Yue Yu <[email protected]> Co-authored-by: jonathan-innis <[email protected]> * Provider registration case insensitive * do not validate against scoring fe if inference is not enabled. (#33) * do not validate against scoring fe if inference is not enabled. * add inference enabled scenario * refine * increase sleeping time * fix Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Add OSM as Public Preview Extension (#34) * Add OSM as public preview extension * Add osm testing * Add release train to tests * Fix failing osm test * Upgrade pip in integration testing * Remove ununsed import * Fix release train check in update * Parallelize E2E Testing (#36) * Add OSM as public preview extension * Add osm testing * Update test logic to parallelize * Fix test success checking * Parallelize extension testing * Better error checking logic * Fix azureml deletion * Fix private build (#40) * change amlk8s to amlarc (#42) Co-authored-by: Yue Yu <[email protected]> * Servicebus client model changes (#44) * Servicebus client model changes * Fix testing script * Update history file and pipeline * Update min cli core version for track 2 updates * Read SSL cert and key from files (#38) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments Co-authored-by: Jonathan Innis <[email protected]> * Upgrade release version * Liakaz/inference read ssl from file (#47) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments * fixed decode error * renamed the experimental param Co-authored-by: Jonathan Innis <[email protected]> * Fix style issues (#51) * Fixed scoring fe related extension param names (#49) * fixed scoring fe related extension params * bug fix and style fixes * variable rename * fixed the error type * set cluster to prod by default * Add distro validation for osm-arc (#50) * Add distro validation for osm-arc * fixed indentation * Fix linting * Resolve comments * Add unit test * fix lint Co-authored-by: Jonathan Innis <[email protected]> * Add distro validation for osm-arc (#50) * Add distro validation for osm-arc * fixed indentation * Fix linting * Resolve comments * Add unit test * fix lint Co-authored-by: Jonathan Innis <[email protected]> * Add distro validation for osm-arc (#53) removed release-train logic * Add Custom Delete Logic for Partners (#54) * Add custom delete logic * Fix failing unit tests * Add warning message when deleting amlarc extension (#55) * add warning message * fix indentation * Update release version * Remove Pyhelm from OSM customization (#58) * Fix OSM pyhelm bug * Debug bootstrap error * Update release message * Remove pyhelm dependency * Update tests to only check extensionconfig creation (#61) * Update tests to only check extensionconfig creation * Single set of CRUD for AzureML * Debug logs for connectedk8s * Increase open service mesh version number * Update k8s-extension Models to Track2 (#64) * Update k8s-extension models to track2 * Add debug for failed cleanup * Increase version number * Exit 0 on failed cleanup * Fix identity in wrong place in model (#66) * Readd osm-arc distro validation (#62) * Add distro validation for osm-arc removed release-train logic * Readd osm_arc distro validation * Fix style * Rm space * Edit test * Fixed tests and error logic * Remove dependency * Add delete method Co-authored-by: Jonathan Innis <[email protected]> * Don't Send Identity Headers If In DF (#67) * Don't send identity for clusters in dogfood * Add location to model for identity * Add identity validation to testing * Use default extension with identity instead of Cassandra specific (#69) * Remove the identity check for now * Add -t for clusterType parameter (#71) * Adding a flag for AKS to AMLARC migration and set up corresponding FE… (#65) * Adding a flag for AKS to AMLARC migration and set up corresponding FE helm values * Remove one extra line * Adding Scoring FE IS_AKS_MIGRATION check logic for helm values Co-authored-by: Harry Yang <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * remove version requirement and auto upgrade minor version check (#72) * Custom User Confirmation for Partners (#70) * Custom user confirmation * Check for disable confirm prompty for confirmation * Add yes to delete command * Code cleanup and style fixes (#73) * Enabled identity by default (#74) * Increase version * Fix df check and add unit test (#77) * Bump extension version * Pin helm version * Extensions GA changes into Public Branch (#79) * Add openservicemesh back * OpenServiceMesh import * Update osm with new extension model * Add back private file * Add Azure ML to list of private extensions (#16) * Update k8s-custom-pipelines.yml * Add Microsoft.PolicyInsights extension (#17) * Add Policy extension * Update comment * Update args * Fix linting errors Co-authored-by: Jonathan Innis <[email protected]> * Add HISTORY_private file for private preview * Change versioning scheme * Update the code for supporting both extensions at once * Fix style issue * Remove old consts file * change the resource tag from managed_by:amlk8s to created_by:amlk8s-e… (#22) * change the resource tag from managed_by:amlk8s to created_by:amlk8s-extension * remove the lock when creating resources * fix lint * update version and HISTORY_private.rst * change error message Co-authored-by: Yue Yu <[email protected]> * Update the beta version with upstream * Update the private history file * Add upgrade pip to pipeline * Move pip install within virtualenv * Merge in k8s-extension/public (0.3.1) (#32) * delete resurce in testcase (#29) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Check Provider is Registered with Subscription Before Making Requests (#18) * Add check for KubernetesConfiguration * Disable pylint and rename * Update provider registration link * Update version * Remove extra blank line * Fix bug in import * only validate scoring fe when inference is enabled (#31) * only validate scoring fe when inference is enabled * Fix versioning Co-authored-by: Yue Yu <[email protected]> Co-authored-by: jonathan-innis <[email protected]> * Update private release Co-authored-by: yuyue9284 <[email protected]> Co-authored-by: Yue Yu <[email protected]> * Release Version 0.4.0-b1 (#37) * Merge k8s-extension/public into k8s-extension/private * Update the version * Fix testing concurrency * K8s extension/private 0.4.0b2 (#41) * Fix private build (#40) * Update version * Upgrade to v0.5.2 * Fix policy bug * Increase private version * Update consts_private.py * Increase private version * Increase version with public * Add flux to private version * Update models for 2021-05-01-preview * Add async models to version * Add no wait to delete and create * support managed cluster * Bump version * Pin helm version * Add cmd to delete call * Add force deletion * add dapr extension (#78) Signed-off-by: Ji An Liu <[email protected]> * Fix failing integration tests * Adding the GA changes for private branch * Fix confirm prompt * Fix update E2E tests Co-authored-by: jonathan-innis <[email protected]> Co-authored-by: [email protected] <Action - Fork Sync> Co-authored-by: nreisch <[email protected]> Co-authored-by: yuyue9284 <[email protected]> Co-authored-by: Yue Yu <[email protected]> Co-authored-by: anagg929 <[email protected]> Co-authored-by: Ji'an Liu <[email protected]> Co-authored-by: nanthi <nanthi@NANTHI01> * Fix configuration settings in update * Only provide confirmation when specifying settings * Fix style issues * Cassandra tests with update (#81) * Add Microsoft.PolicyInsights extension for public preview (#83) * Add Azure Policy * Remove custom configuration and update tests * Yuyu3/fix upgrade public (#85) * populate configuration protected settings for azureml bump version && add log fetch connection string only if configuration protected settings are set update ssl key * bump the version * reverse changes on version and HISTORY.rst * inferenceLoadBalancerHA Co-authored-by: Yue Yu <[email protected]> * Remove Parallel Powershell Jobs (#82) * Unparallelize tests * Moved location of pipeline file * Remove the parallel invoke expression calls * Add templates to testing * Remove policy update test from extension E2E (#88) * feIsNodePort, feIsInternalLoadBalancer (#87) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Fix history file * Add one more prompt for amlarc extension update (#94) * Add one more prompt for amlarc extension update * fix pylint issue * fix pylint issue * fix pylint issue * fix pylint issue Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Youhua Tu <[email protected]> * Update Identity Creation for Appliance to Latest Version (#95) * Update appliance API to latest version for identity * Create a utils file with get parent_api_version * Fix style errors * Bump version * Remove additional entry from history * Do not create identity with appliances (#97) * Bump version * support sslSecret (#99) * support sslSecret * fix * fix error message Co-authored-by: Jun Min <[email protected]> * Bump version to 1.0.4 * Increase OSM verison to valid version (#104) * remove inference private review warning message (#102) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Update unit testing from osm to dapr (#106) * osm-ext: enable system identities (#105) * remove inference private review warning message (#109) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Build Extension in Template (#110) * Build extension using a template * Update build template in run test * Fix private build issues (#112) * Upgrade vendored_sdks to 2022-03-01 (#113) * Upgrade vendored_sdks to 2022-03-01 * Update recordings file * Bump version and changelog * Remove unneeded files Co-authored-by: [email protected] <Action - Fork Sync> Co-authored-by: yuyue9284 <[email protected]> Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Lia Kazakova <[email protected]> Co-authored-by: Niranjan Shankar <[email protected]> Co-authored-by: jingyizhu99 <[email protected]> Co-authored-by: Harry Yang <[email protected]> Co-authored-by: Harry Yang <[email protected]> Co-authored-by: Thomas Stringer <[email protected]> Co-authored-by: NarayanThiru <[email protected]> Co-authored-by: nreisch <[email protected]> Co-authored-by: anagg929 <[email protected]> Co-authored-by: Ji'an Liu <[email protected]> Co-authored-by: nanthi <nanthi@NANTHI01> Co-authored-by: youhuatuyh <[email protected]> Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Jun <[email protected]> Co-authored-by: Jun Min <[email protected]> Co-authored-by: Sanya Kochhar <[email protected]>
Add zone-redundancy support for managed environments
* Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model * Stage Public Version of k8s-extension 0.2.0 for official release (#15) * Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model Co-authored-by: [email protected] <Action - Fork Sync> * Remove custom pipelines file * Update extension description, remove private const * Update pipeline file * Disable refs docs * Update to include better create warning logs and remove update context (#20) * Update to include better create warning logs and remove update context * Remove help text for update * Fix spelling error * Update message * Fix k8s-extension conflict with private version * Fix style errors * Fix filename * add customization for microsoft.azureml.kubernetes (#23) * add customization for microsoft.azureml.kubernetes * Update release history Co-authored-by: Yue Yu <[email protected]> Co-authored-by: jonathan-innis <[email protected]> * Add E2E Testing from Separate branch into internal code (#26) * Add internal e2e testing * Change to testing folder * Inference CLI validation for Scoring FE (#24) * cli validation starter * added the call to the fe validation function * nodeport validation not required * test fix Co-authored-by: Jonathan Innis <[email protected]> * legal warning added (#27) * Remove deprecated method logger.warn * Update k8s-custom-pipelines.yml for Azure Pipelines * Update k8s-custom-pipelines.yml for Azure Pipelines * Add Azure Defender to E2E testing (#28) * Add azure defender testing to e2e * Remove the debug flag * Add configuration testing * Fix pipeline failures * Make test script more intuitive * Remove parameter from testing * Fix wrong location for k8s config whl * Fix pip upgrade issue * Fix pip install upgrade issue * Fix pip install issue * delete resurce in testcase (#29) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Check Provider is Registered with Subscription Before Making Requests (#18) * Add check for KubernetesConfiguration * Disable pylint and rename * Update provider registration link * Update version * Remove extra blank line * Fix bug in import * only validate scoring fe when inference is enabled (#31) * only validate scoring fe when inference is enabled * Fix versioning Co-authored-by: Yue Yu <[email protected]> Co-authored-by: jonathan-innis <[email protected]> * Provider registration case insensitive * do not validate against scoring fe if inference is not enabled. (#33) * do not validate against scoring fe if inference is not enabled. * add inference enabled scenario * refine * increase sleeping time * fix Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Add OSM as Public Preview Extension (#34) * Add OSM as public preview extension * Add osm testing * Add release train to tests * Fix failing osm test * Upgrade pip in integration testing * Remove ununsed import * Fix release train check in update * Parallelize E2E Testing (#36) * Add OSM as public preview extension * Add osm testing * Update test logic to parallelize * Fix test success checking * Parallelize extension testing * Better error checking logic * Fix azureml deletion * Fix private build (#40) * change amlk8s to amlarc (#42) Co-authored-by: Yue Yu <[email protected]> * Servicebus client model changes (#44) * Servicebus client model changes * Fix testing script * Update history file and pipeline * Update min cli core version for track 2 updates * Read SSL cert and key from files (#38) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments Co-authored-by: Jonathan Innis <[email protected]> * Upgrade release version * Liakaz/inference read ssl from file (#47) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments * fixed decode error * renamed the experimental param Co-authored-by: Jonathan Innis <[email protected]> * Fix style issues (#51) * Fixed scoring fe related extension param names (#49) * fixed scoring fe related extension params * bug fix and style fixes * variable rename * fixed the error type * set cluster to prod by default * Add distro validation for osm-arc (#50) * Add distro validation for osm-arc * fixed indentation * Fix linting * Resolve comments * Add unit test * fix lint Co-authored-by: Jonathan Innis <[email protected]> * Add distro validation for osm-arc (#50) * Add distro validation for osm-arc * fixed indentation * Fix linting * Resolve comments * Add unit test * fix lint Co-authored-by: Jonathan Innis <[email protected]> * Add distro validation for osm-arc (#53) removed release-train logic * Add Custom Delete Logic for Partners (#54) * Add custom delete logic * Fix failing unit tests * Add warning message when deleting amlarc extension (#55) * add warning message * fix indentation * Update release version * Remove Pyhelm from OSM customization (#58) * Fix OSM pyhelm bug * Debug bootstrap error * Update release message * Remove pyhelm dependency * Update tests to only check extensionconfig creation (#61) * Update tests to only check extensionconfig creation * Single set of CRUD for AzureML * Debug logs for connectedk8s * Increase open service mesh version number * Update k8s-extension Models to Track2 (#64) * Update k8s-extension models to track2 * Add debug for failed cleanup * Increase version number * Exit 0 on failed cleanup * Fix identity in wrong place in model (#66) * Readd osm-arc distro validation (#62) * Add distro validation for osm-arc removed release-train logic * Readd osm_arc distro validation * Fix style * Rm space * Edit test * Fixed tests and error logic * Remove dependency * Add delete method Co-authored-by: Jonathan Innis <[email protected]> * Don't Send Identity Headers If In DF (#67) * Don't send identity for clusters in dogfood * Add location to model for identity * Add identity validation to testing * Use default extension with identity instead of Cassandra specific (#69) * Remove the identity check for now * Add -t for clusterType parameter (#71) * Adding a flag for AKS to AMLARC migration and set up corresponding FE… (#65) * Adding a flag for AKS to AMLARC migration and set up corresponding FE helm values * Remove one extra line * Adding Scoring FE IS_AKS_MIGRATION check logic for helm values Co-authored-by: Harry Yang <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * remove version requirement and auto upgrade minor version check (#72) * Custom User Confirmation for Partners (#70) * Custom user confirmation * Check for disable confirm prompty for confirmation * Add yes to delete command * Code cleanup and style fixes (#73) * Enabled identity by default (#74) * Increase version * Fix df check and add unit test (#77) * Bump extension version * Pin helm version * Extensions GA changes into Public Branch (#79) * Add openservicemesh back * OpenServiceMesh import * Update osm with new extension model * Add back private file * Add Azure ML to list of private extensions (#16) * Update k8s-custom-pipelines.yml * Add Microsoft.PolicyInsights extension (#17) * Add Policy extension * Update comment * Update args * Fix linting errors Co-authored-by: Jonathan Innis <[email protected]> * Add HISTORY_private file for private preview * Change versioning scheme * Update the code for supporting both extensions at once * Fix style issue * Remove old consts file * change the resource tag from managed_by:amlk8s to created_by:amlk8s-e… (#22) * change the resource tag from managed_by:amlk8s to created_by:amlk8s-extension * remove the lock when creating resources * fix lint * update version and HISTORY_private.rst * change error message Co-authored-by: Yue Yu <[email protected]> * Update the beta version with upstream * Update the private history file * Add upgrade pip to pipeline * Move pip install within virtualenv * Merge in k8s-extension/public (0.3.1) (#32) * delete resurce in testcase (#29) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Check Provider is Registered with Subscription Before Making Requests (#18) * Add check for KubernetesConfiguration * Disable pylint and rename * Update provider registration link * Update version * Remove extra blank line * Fix bug in import * only validate scoring fe when inference is enabled (#31) * only validate scoring fe when inference is enabled * Fix versioning Co-authored-by: Yue Yu <[email protected]> Co-authored-by: jonathan-innis <[email protected]> * Update private release Co-authored-by: yuyue9284 <[email protected]> Co-authored-by: Yue Yu <[email protected]> * Release Version 0.4.0-b1 (#37) * Merge k8s-extension/public into k8s-extension/private * Update the version * Fix testing concurrency * K8s extension/private 0.4.0b2 (#41) * Fix private build (#40) * Update version * Upgrade to v0.5.2 * Fix policy bug * Increase private version * Update consts_private.py * Increase private version * Increase version with public * Add flux to private version * Update models for 2021-05-01-preview * Add async models to version * Add no wait to delete and create * support managed cluster * Bump version * Pin helm version * Add cmd to delete call * Add force deletion * add dapr extension (#78) Signed-off-by: Ji An Liu <[email protected]> * Fix failing integration tests * Adding the GA changes for private branch * Fix confirm prompt * Fix update E2E tests Co-authored-by: jonathan-innis <[email protected]> Co-authored-by: [email protected] <Action - Fork Sync> Co-authored-by: nreisch <[email protected]> Co-authored-by: yuyue9284 <[email protected]> Co-authored-by: Yue Yu <[email protected]> Co-authored-by: anagg929 <[email protected]> Co-authored-by: Ji'an Liu <[email protected]> Co-authored-by: nanthi <nanthi@NANTHI01> * Fix configuration settings in update * Only provide confirmation when specifying settings * Fix style issues * Cassandra tests with update (#81) * Add Microsoft.PolicyInsights extension for public preview (#83) * Add Azure Policy * Remove custom configuration and update tests * Yuyu3/fix upgrade public (#85) * populate configuration protected settings for azureml bump version && add log fetch connection string only if configuration protected settings are set update ssl key * bump the version * reverse changes on version and HISTORY.rst * inferenceLoadBalancerHA Co-authored-by: Yue Yu <[email protected]> * Remove Parallel Powershell Jobs (#82) * Unparallelize tests * Moved location of pipeline file * Remove the parallel invoke expression calls * Add templates to testing * Remove policy update test from extension E2E (#88) * feIsNodePort, feIsInternalLoadBalancer (#87) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Fix history file * Add one more prompt for amlarc extension update (#94) * Add one more prompt for amlarc extension update * fix pylint issue * fix pylint issue * fix pylint issue * fix pylint issue Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Youhua Tu <[email protected]> * Update Identity Creation for Appliance to Latest Version (#95) * Update appliance API to latest version for identity * Create a utils file with get parent_api_version * Fix style errors * Bump version * Remove additional entry from history * Do not create identity with appliances (#97) * Bump version * support sslSecret (#99) * support sslSecret * fix * fix error message Co-authored-by: Jun Min <[email protected]> * Bump version to 1.0.4 * Increase OSM verison to valid version (#104) * remove inference private review warning message (#102) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Update unit testing from osm to dapr (#106) * osm-ext: enable system identities (#105) * remove inference private review warning message (#109) Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Build Extension in Template (#110) * Build extension using a template * Update build template in run test * Fix private build issues (#112) * Upgrade vendored_sdks to 2022-03-01 (#113) * Upgrade vendored_sdks to 2022-03-01 * Update recordings file * Bump version and changelog * Update AzureMLKubernetes install parameters on inferenceRouterServiceType and internalLoadBalancerProvider (#114) * Add one more prompt for amlarc extension update * fix pylint issue * fix pylint issue * fix pylint issue * fix pylint issue * merge from AzureArcForKubernetes/azure-cli-extensions * Update AzureMLKubernetes install parameters on inferenceRouterServiceType and internalLoadBalancerProvider * update error message * update error message * fix pipeline failures * fix test failure Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * Change extension validation logic osm-arc (#116) * added default identity support for microsoft.azurebackup.backupagent (#115) * Change extension validation logic osm-arc Signed-off-by: nshankar13 <[email protected]> Co-authored-by: sangitaray2021 <[email protected]> Co-authored-by: Jonathan Innis <[email protected]> * [k8s-extension] Add Managed Identity Auth support for ContainerInsights Extension (#118) * container insights aad auth support * container insights aad auth support * container insights aad auth support * handle useAADAuth setting * handle useAADAuth setting * delete dcr-a if its exists incase of MSI auth * fix formatting * fix formatting * fix formatting * fix formatting Co-authored-by: Jonathan Innis <[email protected]> * fix install issue on aks (#119) * fix install issue on aks * Removing checking distribution Co-authored-by: youhuatu <[email protected]> * [k8s-extension] Bring back containerInsights solution addition in msi mode (#120) * bring back containerinsights solution in dcr mode * bring back containerinsights solution in dcr mode * Bump release version * Remove backup agent from mapping * Fix history file * clusterip (#121) * clusterip * fix pr test Co-authored-by: Jun Min <[email protected]> * No default values for the patch scenario with extension (#122) * Bump version to 1.2.1 * Rename inferenceLoadBalancerHA (#123) * Rename inferenceLoadBalancerHA Rename inferenceLoadBalancerHA to inferenceRouterHA and unify related logic * Update AzureMLKubernetes.py * Remove unused comments to trigger pipeline * Update AzureMLKubernetes.py * Yuyu3/remove relay (#124) * remove relay * disable service bus by default, disable relay if target cluster is managed clusters. * move nginx ingress logic * remove service bus in tests * update HISTORY * If no default values provided for update, assign an empty dict. * set original_extension_config_settings to empty dict if it is None. * bump version to 1.2.2 Co-authored-by: Yue Yu <[email protected]> * Update test documentation for partners (#132) * remove warning message (#129) Co-authored-by: Yue Yu <[email protected]> * Use cluster scale to control clusterPurpose and inferenceRouterHA (#130) * Use cluster scale to control clusterPurpose and inferenceRouterHA * Update AzureMLKubernetes.py To solve transient gate error * Update AzureMLKubernetes.py * Update AzureMLKubernetes.py * Update AzureMLKubernetes.py Co-authored-by: Jonathan Innis <[email protected]> * Fix warning message returned on PATCH (#133) * Do not invoke 'create_or_update' if resource is already exists. (#135) * init * update HISTORY * do not populate clusterPurpose if infrenceRouterHA is not set. * use correct exception type. * use correct exception type. * fix lint * use correct exception type. Co-authored-by: Yue Yu <[email protected]> * [k8s-extension] ContainerInsights Extension Managed Identity Auth Onboarding updates (#137) * bring back containerinsights solution in dcr mode * bring back containerinsights solution in dcr mode * update to stream group and DCR API version * Only test k8s-extension * [k8s-extension] ContainerInsights Extension Managed Identity Auth Onboarding related bug fixes (#141) * fix bugs * fix indent issues * remove get workspace key for msi auth * fix pr feedback * Fix osm-arc installation non-connected clusters Signed-off-by: nshankar13 <[email protected]> * k8s-extension azuredefender namespace to mdc (#152) Co-authored-by: Bsingh16 <[email protected]> * change codeowners for k8s extension & configuration (#150) * change codeowners for k8s extension & configuration * change code owners Co-authored-by: Bavneet Singh <[email protected]> * bump k8s-extension version to 1.2.5 * delete testing files Co-authored-by: Jonathan Innis <[email protected]> Co-authored-by: [email protected] <Action - Fork Sync> Co-authored-by: yuyue9284 <[email protected]> Co-authored-by: Yue Yu <[email protected]> Co-authored-by: Lia Kazakova <[email protected]> Co-authored-by: Niranjan Shankar <[email protected]> Co-authored-by: jingyizhu99 <[email protected]> Co-authored-by: Harry Yang <[email protected]> Co-authored-by: Harry Yang <[email protected]> Co-authored-by: Thomas Stringer <[email protected]> Co-authored-by: NarayanThiru <[email protected]> Co-authored-by: nreisch <[email protected]> Co-authored-by: anagg929 <[email protected]> Co-authored-by: Ji'an Liu <[email protected]> Co-authored-by: nanthi <nanthi@NANTHI01> Co-authored-by: youhuatuyh <[email protected]> Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Youhua Tu <[email protected]> Co-authored-by: Jun <[email protected]> Co-authored-by: Jun Min <[email protected]> Co-authored-by: Sanya Kochhar <[email protected]> Co-authored-by: sangitaray2021 <[email protected]> Co-authored-by: Ganga Mahesh Siddem <[email protected]> Co-authored-by: WangDian <[email protected]> Co-authored-by: Bavneet Singh <[email protected]> Co-authored-by: Niv Ben Shabat <[email protected]>
Alias command spec: https://github.com/chewong/azure-cli-alias-extension/blob/dev/doc/az-alias-command-spec.md
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
./scripts/ci/test_static.sh
locally? (pip install pylint flake8
required)python scripts/ci/test_index.py -q
locally?