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

OpenSuse Tumbleweed - azure-cli-telemetry doesn't support python311-portalocker in version 3 and above #30458

Open
martinspudich opened this issue Dec 3, 2024 · 10 comments
Assignees
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request
Milestone

Comments

@martinspudich
Copy link

Describe the bug

When I'm trying to update my system via sudo zypper dup I'm getting an error with python311-portalocker version issue.

Please update azure-cli-telemetry to work with azure-cli-telemetry version 3 and above.

Related command

sudo zypper dup
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...

Problem: 1: the installed azure-cli-telemetry-1.1.0-3.1.noarch requires 'python311-portalocker < 3.0', but this requirement cannot be provided
deleted providers: python311-portalocker-2.10.1-1.2.noarch

Solution 1: Following actions will be done:
deinstallation of azure-cli-telemetry-1.1.0-3.1.noarch
deinstallation of azure-cli-core-2.66.0-1.1.noarch
deinstallation of azure-cli-2.66.0-1.1.noarch
Solution 2: keep obsolete python311-portalocker-2.10.1-1.2.noarch
Solution 3: break azure-cli-telemetry-1.1.0-3.1.noarch by ignoring some of its dependencies

Errors

Problem: 1: the installed azure-cli-telemetry-1.1.0-3.1.noarch requires 'python311-portalocker < 3.0', but this requirement cannot be provided
deleted providers: python311-portalocker-2.10.1-1.2.noarch

Issue script & Debug output

sudo zypper dup
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...

Problem: 1: the installed azure-cli-telemetry-1.1.0-3.1.noarch requires 'python311-portalocker < 3.0', but this requirement cannot be provided
deleted providers: python311-portalocker-2.10.1-1.2.noarch

Solution 1: Following actions will be done:
deinstallation of azure-cli-telemetry-1.1.0-3.1.noarch
deinstallation of azure-cli-core-2.66.0-1.1.noarch
deinstallation of azure-cli-2.66.0-1.1.noarch
Solution 2: keep obsolete python311-portalocker-2.10.1-1.2.noarch
Solution 3: break azure-cli-telemetry-1.1.0-3.1.noarch by ignoring some of its dependencies

Expected behavior

Resolving the package version conflict.

Environment Summary

az --version
azure-cli 2.66.0 *

core 2.66.0 *
telemetry 1.1.0

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.2.0

Python location '/usr/bin/python3.11'
Extensions directory '/home/bliker/.azure/cliextensions'

Python (Linux) 3.11.10 (main, Sep 09 2024, 17:03:08) [GCC]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

@martinspudich martinspudich added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Dec 3, 2024
Copy link

Hi @martinspudich,

2.66.0 is not the latest Azure CLI(2.67.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Dec 3, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Dec 3, 2024

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Dec 3, 2024
@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team feature-request and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Dec 3, 2024
@yonzhan yonzhan added this to the Backlog milestone Dec 3, 2024
@evelyn-ys
Copy link
Member

evelyn-ys commented Dec 3, 2024

@rayluo
Copy link
Member

rayluo commented Dec 3, 2024

cc @jiasl @rayluo for awareness. msal-extensions is also restricting portalocker<3

We set that upper bound because msal-extensions was developed in portalocker 1.x & 2.x era. We haven't looked into portalocker 3.x since then. Azure CLI may consider helping us test the without-portalocker approach.

@bebound
Copy link
Contributor

bebound commented Dec 4, 2024

I've used AzureAD/microsoft-authentication-extensions-for-python#117 in CLI on SAW 2.55.0 and it works.

@rayluo
Copy link
Member

rayluo commented Dec 7, 2024

I've used AzureAD/microsoft-authentication-extensions-for-python#117 in CLI on SAW 2.55.0 and it works.

@bebound Thanks for the promising feedback! You also brought up a good point on SAW. I am not even sure whether the portalocker was allowed on SAW, and if not, how the previous versions of AzureCLI + MsalExtensions + Portalocker combination worked (or, did they?). Regardless, this becomes yet another good reason to trim down that dependency.

@jiasli , do we want this change to be in one of upcoming Azure CLI releases?

@bebound
Copy link
Contributor

bebound commented Dec 11, 2024

Portalocker is prohibited on SAW. I've used this PR's msal-extension without portalocker since the initial release of SAW version 2.40.0.

PS: I used to create my own msal-extension with a dummy lock, but we had a meeting, and you provide this official portalocker-free version. It works well.

@rayluo
Copy link
Member

rayluo commented Dec 12, 2024

I've used this PR's msal-extension without portalocker since the initial release of SAW version 2.40.0.

@bebound, when was that Azure CLI 2.40.0 released? Was it in September 2022?

Sorry I don't quite remember our meeting. Did you mean you used/tested that portalocker-less msal-extension for 2+ years already?

@bebound
Copy link
Contributor

bebound commented Dec 12, 2024

CLI on SAW is an internal version. It's been released for two years, and we haven't received any bug report related to msal. At least it works for the SAW version.

I assume dropping portalocker causes issues in high concurrency environments?

@rayluo
Copy link
Member

rayluo commented Dec 12, 2024

I assume dropping portalocker causes issues in high concurrency environments?

No. Because that PR does not simply drop portalocker. It also uses a replacement locking mechanism without external dependencies.

CLI on SAW is an internal version. It's been released for two years, and we haven't received any bug report related to msal. At least it works for the SAW version.

Thanks for the much-awaited confirmation! I'll merge that PR in, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request
Projects
None yet
Development

No branches or pull requests

5 participants