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

[next] decouple next from azure-cli-core and support personalized recommendation #3023

Merged
merged 9 commits into from
Mar 2, 2021

Conversation

zhoxing-ms
Copy link
Contributor

@zhoxing-ms zhoxing-ms commented Feb 20, 2021

Associated core PR: Azure/azure-cli#17009

Description for decoupling part:

  • The logic of log_command_history() is invoked in load_command_table() to log the command history for az next.
    ALWAYS_LOADED_EXTENSIONS = ['azext_next'] is declared in azure-cli-core to ensure that this logic will be called after next extension is installed.

  • Modify the environment variable AZURE_CORE_USE_COMMAND_INDEX=False, and then reload the command table in log_command_history() to skip command index
    But cli_ctx.invocation.commands_loader.load_command_table(args) will not only reload a new object of NextCommandsLoader, but also recursively calls load_command_table() again, and fall into infinite nested call. So NextCommandsLoader is designed as a singleton, and _has_reload_command_table is used to avoid infinite nested calls.

  • Delete method log_latest_error_info(), clean_exception_history() and get exception information from Telemetry cache


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.

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 20, 2021

next

@yonzhan yonzhan added this to the S183 milestone Feb 20, 2021
@zhoxing-ms zhoxing-ms force-pushed the decouple_az_next branch 2 times, most recently from 2ca96d2 to c88046b Compare February 20, 2021 08:07
@zhoxing-ms zhoxing-ms changed the title [next] Decouple next from azure-cli-core and support personalized recommendation [next] decouple next from azure-cli-core and support personalized recommendation Feb 20, 2021
@zhoxing-ms zhoxing-ms force-pushed the decouple_az_next branch 8 times, most recently from a1d0018 to 9105f87 Compare February 22, 2021 09:19
@zhoxing-ms zhoxing-ms marked this pull request as ready for review February 22, 2021 10:20
@zhoxing-ms zhoxing-ms requested a review from houk-ms February 22, 2021 10:24
@zhoxing-ms zhoxing-ms requested a review from kairu-ms as a code owner March 2, 2021 06:09
@yonzhan yonzhan modified the milestones: S183, S184 Mar 2, 2021
Copy link
Member

@jsntcy jsntcy left a comment

Choose a reason for hiding this comment

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

:shipit:

@zhoxing-ms zhoxing-ms merged commit 301f8dd into Azure:master Mar 2, 2021
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.

5 participants