Skip to content

{CI} Add extension dependency check#24582

Draft
bebound wants to merge 5 commits intoAzure:devfrom
bebound:test-dependency
Draft

{CI} Add extension dependency check#24582
bebound wants to merge 5 commits intoAzure:devfrom
bebound:test-dependency

Conversation

@bebound
Copy link
Contributor

@bebound bebound commented Nov 8, 2022

Description

Inspired by TestExtensionsLoading.
This test will check if extension's dependency is conflict with azure-cli. This should avoid issues like #24213
Currently, the extension and its dependency is installed into ~/.azure/cliextensions. The dependency error is not shown during installation.

This test also finds four incompatible extentions: attestation, cloud-service, functionapp, serial-console.
To pass the test, add them to ignore_list in the script.
alias is also not compatible, but jinja is not in setup.py so it's ignored. #22602 (comment)

@ghost ghost added Auto-Assign Auto assign by bot CI CI labels Nov 8, 2022
@ghost ghost requested review from jiasli, jsntcy, kairu-ms, wangzelin007 and yonzhan November 8, 2022 02:44
@ghost ghost assigned wangzelin007 Nov 8, 2022
@ghost ghost added this to the Nov 2022 (2022-12-06) milestone Nov 8, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 8, 2022

One good point to enhance CI

@wangzelin007
Copy link
Member

Hi @bebound,
I think it is necessary to find if extension's dependency is conflict with azure-cli.

  1. I would like to ask, how did we finally solve the az interactive issue?
    Whether to upgrade prompt_toolkit to 3.0.31 or uninstall prompt_toolkit directly, if it is uninstalled, how does the module using prompt_toolkit work?

  2. What should we do after this test finding out the conflict in PR?
    Is it up to the PR author to resolve the conflict or upgrade the version of the conflicting package or uninstall the conflict package directly?

  3. For this four incompatible extentions, what are we going to do but add them to ignore_list in the script?

@bebound
Copy link
Contributor Author

bebound commented Nov 8, 2022

This test can help us to find the broken extension. How to resolve the conflict, it depends.

  1. Make sure the dependency change is necessary and there is no alternative. Otherwise, revert the change.
  2. If the extension is well maintained, we can notify the owner to update the extension before next azure-cli release.
  3. If the extension is not actively developed, we may choose one of these approaches:
    • Fix extension by ourselves.
    • Add it into ignore list. (I'm not sure if we can warn user that the extension is not compatible with cli)

For your first question, the interactive issue is because azure-cli installs 3.0.31 as dependency in 2.41.0. interactive also installs 1.0.18 in ~/.azure/cliextension/interactive, but we always load azure-cli library first (#12778). prompt_toolkit 3.0.31 is loaded and interactive fails to run. In 2.42.0, we fix this by reverting the changes.

I'll check these four extensions later.

@bebound bebound modified the milestones: Feb 2023 (2023-03-07), Backlog Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot CI CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants