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

added telemetry code for connect cli #4

Merged
merged 85 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:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

arrownj and others added 30 commits April 22, 2020 09:51
* [Breadth Coverage] Onboard Import Export

* update CODEOWNERS

* remove unused code

* fix review problem

* update setup.py & setup.cfg

* remove unused code

* fix tags issues

* fix review issues

* update storage-account-id to storage-account

* add support for location list/show

* update README.md
* replace sdks

* new sdk

* some hacks for recording files and python sdk

* fix version

* add param for storage account id

* finish BYOS for app insight

* finish link LA to AI

* replace new sdk

* change the python sdk

* replase new sdk

* change to latest sdk

* support public access

* fux

* add history

* fix style

* has not been fixed in server

* fix
…zure#1575)

Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=365843

Last commit: Azure@54e0ed2
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=364243

Last commit: Azure@09eecf8
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=365736

Last commit: Azure@581cb60
* [Import Export] add __init__.py for generated package

* update version

* fix style error
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=367568

Last commit: Azure@8877ae4
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=367914

Last commit: Azure@3360eca
* Add code from CodeGen result

* Add code changes for create and update operations

* Add dashboard import operation

* Update tests and upload test json files

* Apply suggestions from code review

Co-Authored-By: Mark Cowlishaw <[email protected]>

* Apply suggestions from code review

Co-Authored-By: Mark Cowlishaw <[email protected]>

* Update test cases

* Address review comments

* Remove un-used file and un-used variable

* Apply style check to all customized files

* Apply style check to all customized files

* Add portal codeowner to CODEOWNERS

* Address review comments

* Update README file

* Remove un-used file _validators.py

Co-authored-by: Mark Cowlishaw <[email protected]>
Co-authored-by: Feng Zhou <[email protected]>
* WIP: Add autogen code and customy changes for workflow and integration-account

* WIP: Impliment integration account update properly

* WIP: Update autogen, get test working

* WIP: Update workflow and intergration account names to name, remove unneeded commands

* WIP: update help file to match how commands actually should be used

* Update test cases to make them more robust. Remove test print statement

* Update integration account show test with proper checks

* Update test jsons to match paths of other extensions

* Remove some overlooked useless code, update try catch

* Remove elif since raises are called now

* Remove subscription specfic stuff from workflow.json

* WIP: New code gen and custom code to handle opaque logic objects and update

* Cusomize variouse commands and tests

add import integration account, fix naming, defualt integration account state if not specified, add update json file

* remove debug statements

* update recording

* Fix up help file

* Fix commands based on comments from PR 1428

* Update comments to match dicussion with service team

* Regen with logic service team swagger changes

* Add new yaml recording

* fix flake 8 linter

* More flake 8 fixes

* Fix flake 8 in init

* Fix help files

* Slight change in help file for create integration account

* Fix some help for workflow

* Add codeowner

* add msft to codeowner

* Add github alias

* Fix PR comments

* Update setup.py to read README.md

* Fix bug based on comments

* Custom change to support integration-account-sku correctly

* Flake8

Co-authored-by: bquantump <[email protected]>
Co-authored-by: Jianhui Harold <[email protected]>
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=364136

Last commit: Azure@17b6c96
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=370168

Last commit: Azure@69c7333
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=368778

Last commit: Azure@4c707a0
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=370579

Last commit: Azure@f40506c
Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=371387

Last commit: Azure@d597d8e
* fix AI issue

* test one more

* fix style

* fix style

* address comments and re-test

* fix style and re-run tests

* re-run tests
…zure#1616)

Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=372857

Last commit: Azure@35b244f
…zure#1621)

Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=374809

Last commit: Azure@14799ae
@@ -84,6 +106,9 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, location
if resourceTypes.resource_type == 'connectedClusters':
rp_locations = [location.replace(" ", "").lower() for location in resourceTypes.locations]
if location.lower() not in rp_locations:
telemetry.set_user_fault()
telemetry.set_exception(exception='Location not supported', fault_type='location-validation-error',
summary='Provided location is not supported for creating connected clusters')
raise CLIError("Connected cluster resource creation is supported only in the following locations: " +

Choose a reason for hiding this comment

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

default [](start = 25, length = 7)

Actually, the param can be auto-detect. For telemetry we should put what we detected. If we dont detect (like today) we should trace/ log default. Hence I think default as distro is better.

Copy link

@raunakpandya raunakpandya left a comment

Choose a reason for hiding this comment

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

:shipit:

Akash Keshari and others added 21 commits May 12, 2020 17:32
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Xiaojian Xu <[email protected]>
Co-authored-by: Xiaojian Xu <[email protected]>
…#1700)

Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=392553

Last commit: Azure@df6806d
@akashkeshari akashkeshari merged commit 669071f into location_data May 18, 2020
akashkeshari pushed a commit that referenced this pull request Dec 16, 2021
* add appservice-kube extension

* Retrieving function triggers from the function image

* Retrieving function triggers from the function image

* Fix appservice kube list by subscription

* Fix transient error when loading arguments

* Added az webapp up support

* Handled code review comments

* bump up version to 0.1.1

* Use custom sdk code for app service plan command sdk

* Version 0.1.2

* Private registry image support and fixig windows to unix line feed char issue to retrive triggers from a function app

* Removing debugpy.breaspoint() line

* Update custom.py

Removing trailing white spaces

* Update custom.py

Removing trailing white spaces

* fixing the condition when the image is from the public registry with no user name and password supplied

* Update sdk, add BYO AKS cluster to kube create command

* Add version 0.1.3

* Copying getfunctionsjson.sh as part of appservice-kube extension and correcting the lookup path

* Adding version 0.1.4

* fix

* Update version to 0.1.5

* Update kube environments SDK

* Add version 0.1.6

* Update kube environments SDK (using api version 2020-06-01), delete old parameters from commands

* Add version 0.1.7

* remove azure-cli-core dependency

* Add version 0.1.8

* Add latest changes from cli core (except az webapp up)

* Bugfix: if ftp deployment profile doesn't exist, zip deploy fails

* Bugfix: index.json had weird merge conflict

* Bugfix: webapp config container set wasn't setting

* Version 0.1.9

* Add functionapp config container set

* Start referencing main cli

* Functionapp deployment source config-zip command fix (copy over from main CLI for now)

* Functions CLI should not pull docker image

* Plan creation should drop --kube-environment and --kube-sku

* Change kind to 'linux,kubernetes'

* Help text changes

* Publish extension v 0.1.10

* Version 0.1.11, since broke appservice plan create for non-k8se plans

* Allow specifying custom location by name rather than resource ID

* az appservice kube create command

* Change ASP kind back to K8SE, reserved to None

* Publish 0.1.12 whl

* az webapp create doesn't require plan for k8se

* Change app service plan kind to 'linux,kubernetes' and reserved=true if
linux

* Webapp create should pass with ASP kind=linux if SKU is a kube sku

* az functionapp create without plan

* Fix bug where if webapp/functionapp create called to update, if --plan isnt specified it creates new plan

* fix webapp/functionapp create, if calling create again with new custom location/plan edge cases

* Version 0.1.13

* Version 0.1.14 temporary change to stop doing the list in web/func app creates

* Add better help text for appservice create with custom location

* Update appservice SDK for kube extension to 2020-12-01

* Clean up az kube create

* Update to version 0.1.15

* Fix dotnet5 bug

* Converting skus for kubernetes ASPs to the new values

* 0.1.16 version

* Set number of workers to 1 when creating ASP

* Add webapp scale command

* Version 0.1.17 with az webapp scale

* rename az webapp scale param

* Move restart in from main CLI, since api returns 202 rather than 200. Need SDK update

* Change SDK to have extended location envelope manually - need to see why
generating SDK locally is failing

* Pass ExtendedLocationEnvelope to web/functionapp, appservice plan and kube environment creates

* Version 0.1.18

* Remove webapp up from extension

* Use delete_app_settings function from cli core

* Use webapp validator from core CLI

* Use updated update_app_settings function from core CLI

* 0.1.19 version

* Fix regression when using main CLI validators

* 0.1.20 version

* az appservice kube create: better error message when conflict

* Remove vsts_cd_manager

* Version 0.1.21

* Update index.json

* K8se master kube env create validations (#3)

* az kube create: allow using custom location name. Also get location from custom location rather than resource group

* Require cli core 2.26.0 or later

* Version 0.2.0

* Use ExtendedLocation property ob object level (#4)

* Static ip not required property in kube create

* Version 0.2.1

* Fix NoneType object has no attribute custom_location error

* Bugfix: Wrong custom location being used if multiple custom locations exist in diff rg (#5)

* Fix NoneType object has no attribute custom_location error

* If two custom locations with same name, in different resource group sometimes it uses wrong custom location

* Version 0.2.2

* remove old SDK and start 'az appservice kube' rewrite

* rewrite 'az appservice kube show'

* rewrite 'az appservice kube list'

* rewrite 'az appservice kube delete'

* re-add appservice kube create checks and start appservice kube update impl

* raise exception for 'az appservice kube update'

* add 'az appservice kube wait'

* add kube list pagination

* fix 'az appservice create'

* fix 'az appservice plan update'

* fix 'az webapp create'

* fix az webapp show/restart

* remove 'az webapp config container set'

* remove uneeded TODOs

* format results of 'az appservice kube show/list'

* remove TODOs and fix 'az webapp show -s'

* add misc style fixes

* fix more style issues

* revert src/index.json to master version

* add summary

* fix linter issues

* remove out-of-date test

* fix appservice kube CLI linter issues

* fix ASP sku validation

* fix style

* increment appservice-kube release number and fix service_name.json

* fix hardcoded 'verify_linter.py'

* add testing -- WIP

* update codeowners and fix 'az appservice kube list' bug

* remove unfinished tests

* remove unnecessary branching

* remove unnecessary options lists

* use specific CLI error types

* use more specific error type

* fix more error types

* use HttpResponseError

* fix style

* revert version and erase history

Co-authored-by: Eben Carek <[email protected]>
Co-authored-by: Satish Ranjan <[email protected]>
Co-authored-by: Sanchit Mehta <[email protected]>
Co-authored-by: Eben Carek <[email protected]>
Co-authored-by: SatishRanjan <[email protected]>
Co-authored-by: Calvin Chan <[email protected]>
akashkeshari pushed a commit that referenced this pull request Apr 13, 2022
* Use userValues.txt instead of --resuse-values in update command

* fix error msg

* added custom cert

* change setup.py

* Helmupdatefix (#4)

* Use userValues.txt instead of --resuse-values in update command

* fix error msg

Co-authored-by: Siri Teja Reddy Kasireddy <[email protected]>

* fix output file

* Helmupdatefix (#5)

* Use userValues.txt instead of --resuse-values in update command

* fix error msg

* fix output file

Co-authored-by: Siri Teja Reddy Kasireddy <[email protected]>

* place values file in .azure folder

* place values file in .azure folder

* Helmupdatefix (#6)

* Use userValues.txt instead of --resuse-values in update command

* fix error msg

* fix output file

* place values file in .azure folder

* place values file in .azure folder

Co-authored-by: Siri Teja Reddy Kasireddy <[email protected]>

* place values file in .azure folder

* nit

* nit

* nit

* setp.py and history.rst updates

* modify the way of fetching userValues.txt path

* Waiting for LRO to complete before moving ahead with agent installation/deletion

* update history.rst

* fix

* fix location variable

Co-authored-by: Siri Teja Reddy Kasireddy <[email protected]>
Co-authored-by: siriteja <[email protected]>
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.