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

{CI} Install azure-cli from dev #4012

Merged
merged 2 commits into from
Oct 25, 2021
Merged

{CI} Install azure-cli from dev #4012

merged 2 commits into from
Oct 25, 2021

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Oct 22, 2021

The current pipeline installs azure-cli from edge build. However, when there is a hotfix, like 2.29.1, it overrides edge build like 2.29.0.postxxx.

Meanwhile azure-cli-testsdk is installed from dev branch. When public azure-cli and dev azure-cli-testsdk are not compatible, failures will occur: https://dev.azure.com/azure-sdk/public/_build/results?buildId=1155581&view=logs&j=9c80867e-ccda-50f1-65bc-e11447f3cda9&t=8e28b004-aba6-5a56-67c2-9d40a66e3ed9

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/azure_devtools/scenario_tests/base.py", line 146, in setUp
    patch(self)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/azure/cli/testsdk/patches.py", line 76, in patch_retrieve_token_for_user
    mock_in_unit_test(unit_test, 'azure.cli.core.auth.identity.UserCredential', UserCredentialMock)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/azure_devtools/scenario_tests/patches.py", line 36, in mock_in_unit_test
    mp.__enter__()
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/mock.py", line 1231, in __enter__
    self.target = self.getter()
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/mock.py", line 1401, in <lambda>
    getter = lambda: _importer(target)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/mock.py", line 1088, in _importer
    thing = _dot_lookup(thing, comp, import_path)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/mock.py", line 1077, in _dot_lookup
    __import__(import_path)
ModuleNotFoundError: No module named 'azure.cli.core.auth.identity'

The CI pipeline should install both azure-cli and azure-cli-sdk from dev branch.

Similar issue: #3950, but the root cause is different.

@yonzhan yonzhan assigned jiasli and yonzhan and unassigned yonzhan Oct 22, 2021
@yonzhan yonzhan added this to the Oct 2021 (2021-11-02) milestone Oct 22, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Oct 22, 2021

Install azure-cli from dev

@jiasli jiasli merged commit 6822c82 into Azure:main Oct 25, 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