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

Should we be Pinning dependencies? #1106

Open
svrooij opened this issue Feb 7, 2025 · 4 comments
Open

Should we be Pinning dependencies? #1106

svrooij opened this issue Feb 7, 2025 · 4 comments
Labels
Needs: Attention 👋 question Further information is requested type:question An issue that's a question

Comments

@svrooij
Copy link
Contributor

svrooij commented Feb 7, 2025

Recently a few issues appeared that are related to dependencies being updated, namely:

In C# if you install a package it installs the lowest available version that matches (by default). This means if you install the same package next time, you're pretty certain you will get exactly the same dependencies as last time. Back to python, it seems that python does the exact opposite.

Maybe there should be a discussion about whether or not we should start pinning dependencies so you get a more stable installation of a specific version of this sdk. I'm not a python expert and I don't know what is recommended for libraries but it is certainly something to think about.

Any ideas?

dependencies = [
"azure-identity >=1.12.0",
"microsoft-kiota-serialization-json >=1.8.0,<2.0.0",
"microsoft-kiota-serialization-text >=1.8.0,<2.0.0",
"microsoft-kiota-serialization-form >=1.8.0,<2.0.0",
"microsoft-kiota-serialization-multipart >=1.8.0,<2.0.0",
"msgraph_core >=1.3.1"
]

@svrooij svrooij added the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Feb 7, 2025
@svrooij
Copy link
Contributor Author

svrooij commented Feb 7, 2025

See also this comment by @sanmai-NL

@svrooij
Copy link
Contributor Author

svrooij commented Feb 10, 2025

@baywet or @andrueastman what are your ideas on this? It seems to bug people and I have no idea what is the best course of action for python

@baywet
Copy link
Member

baywet commented Feb 13, 2025

Thanks for starting the conversation here.
I'm not sure what we're trying to achieve by pinning dependencies? (which seems to go against guidelines for a library anyway)

Service libs should only depend on graph core.
Graph core should only depend on kiota bundle and kiota auth azure.

Yes there has been a few dependencies alignment issues in the past, but they are usually resolved quickly/easily.

Let us know if you have any additional comments or questions.

@baywet baywet added question Further information is requested status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Feb 13, 2025
@svrooij
Copy link
Contributor Author

svrooij commented Feb 13, 2025

The issue seems to be that due to a pr (by me) in a deep down dependency kiota-abstractions, code that first worked stopped working because python downloads the latest version of dependencies.

Meaning if you install graph now, and you built something. That same code may no longer work in the future if you reinstall graph (build pipeline, user installing something).

In my opinion it should not pin the dependencies in graph. But the developer that built something with it should pin the used dependencies in his/her project and update them at will.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention 👋 question Further information is requested type:question An issue that's a question
Projects
None yet
Development

No branches or pull requests

2 participants