-
Notifications
You must be signed in to change notification settings - Fork 334
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
require azure-cli in current version and get rid of deps that are already in azure-cli #1781
base: dev
Are you sure you want to change the base?
require azure-cli in current version and get rid of deps that are already in azure-cli #1781
Conversation
…eady in azure-cli
@Klaas- First of all, this change is definitely not possible, because many modules depend on the packages you remove. Consider the issue of version compatibility. You can install the specified version of azure-cli before installing 'requirements.txt', for example azure-cli==2.67.0). Thank you! |
@Fred-sun I don't actually remove any dependencies, they are right now direct dependencies via requirements.txt, after my change they are indirect dependencies via the azure-cli requirement. First I'll show you my change does not actually remove the dependencies - I'll show you that my change actually installs all the packages I removed:
You could also do it differently and remove the versions from requirements.txt and have the versions chosen by the azure-cli requirement. But at the end of the day, what does not work is having different requirements in the module requirements.txt than in the azure-cli requirements (if the goal is to be able to install them both together, which I assume it is). If you do what you currently suggest, you'll end up with version conflicts:
it will say:
Full pipdeptree output:
But if you want to make 100% sure they are installed I can change the requirements.txt to just remove the version pinning here. If you don't do either change you will always need to keep up with all dependency changes in azure-cli -- which is also an option but means more work here. |
@Klaas- However, the requirements.txt defined in azure-azcollection is the version that its runtime requires to be installed. In addition, our Pipeline automation test will also install requirments.txt to run playbook. Thank you! |
@Fred-sun so the answer is "it is not wanted to install azure-cli and ansible azure modules within the same python env"? |
@Klaas- No, because of compatibility issues, you can install 'azure-cli' and login to 'az login' before installing ansible and azure.azcollection. Thank you! |
No you can't do that, if you do that azure-cli will have unmet depdendencies -- unless azure-cli and azure collection harmonize dependencies :) |
@Klaas- The azure. azcollection doesn't rely directly on 'azure-cli'? If you need 'az login' authentication, I will install azure-cli and login first, and then install ansible and azure.azcollection. Thank you |
Yeah, it currently does not rely on azure-cli -- but I want to use collection and azure cli in the same python env - same ansible execution environment -- #1779 -- so we have two possibilities:
if 2) is the way forward then I need to work around this -- not sure, maybe use two containers or two different venvs, there are ways to make this work, but they are all avoiding the real problem :) |
this only works by chance -- your azure-cli has unmet dependencies in your setup |
I think if we want to solve this properly we should force to use the latest stable versions of all python sdk packages in azure collection as well as azure-cli, that would also solve the dep problem, it does mean you have to change the versions in both requirement files if a new version of a sdk python package is released |
Yes, I would rethink that. Thank you! |
SUMMARY
In order to make it possible to install azure-cli and azure collection side by side in the same python env we need to change requirements, I suggest to directly use azure-cli as dependency and not define the deps that are transitive through azure-cli, that way we also ensure compatibility in the future. I've updated it to the newest azure-cli version, but we can keep using the older one if you're more comfortable with it
Fixes #1779
ISSUE TYPE
COMPONENT NAME
Collection general