-
Notifications
You must be signed in to change notification settings - Fork 3k
Update python module versions in requirements.txt #8542
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
Conversation
@JanneKiiskila Would you mind asking someone from your team to look this over? I know that y'all have your own CI, and I'd prefer to avoid breaking that with this change if possible (it shouldn't, but I like to make sure). |
I've asked @anttiylitokola to review this. The pr-head CI job does test the client, too - it's passing at least the build. |
One process question though - if you now set the upper limits,
|
Looks to be working fine also in our CI. |
I don't understand... |
This would fix every module to a specific version, unless someone does a PR and changes the |
@jeromecoutant This was brought on because in the past two weeks, CI (and as a result master) broke because all modules were being pulled to the latest versions, and some modules were not compatible with each other (Ref: #8390, #8446).
I can actually guarantee that you're not using the latest versions because the two referenced PRs version-locked two modules. I think it's preferable to not have the latest version of something and have everything work, instead of the opposite.
Not sure I understand the question. You can still point pip to install/update from the requirements.txt file, and it will check your installed versions with the requested package versions.
@JanneKiiskila That's a good question. My initial thoughts is that we update and test the latest public versions somewhere in between feature releases (in line with keeping CI stable during feature release), but if someone needs a newer/older version of a tool, an issue could be opened and the module version be evaluated as a part of that issue. Part of this PR is to get feedback on that as well. |
Fwiw, setting an upper bound should also make us more resiliant against upgrade attacks, such as https://www.zdnet.com/article/twelve-malicious-python-libraries-found-and-removed-from-pypi/ The actual fix to make sure this doesn't happen to users installing requirements.txt is to add all modules needed, and version lock them, but one step at a time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmonr how have you decided which upper version to use? Also if we have a known set of working versions would it not just be safer to lock them now to the latest known working version?
Safer, probably. But what are the odds that all of our CIs are also set to the same vesrions? |
Actually all our CIs should be on the same versions for consistency so this would ensure that. |
Sorry, but the intention of this PR isn't to force everyone, including users, to only use specific versions of tools. The intention is to make it much more unlikely that we'll be hit with the class of issues that caused the need for #8390 and #8446, with what should be minimal impact to other groups. Yes it would be good to get all of our known CIs aligned against testing versions, but that wasn't the scope of this fix. |
@theotherjimmy waiting for your review |
/morph build |
Build : SUCCESSBuild number : 3522 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3139 |
Test : SUCCESSBuild number : 3306 |
Description
A followup to #8390 and #8446.
Allowing packages to have no upper version bound is inviting the above problems. Instead, packages should remain fixed at a max version unless it's specifically requested that a newer version is needed.
With #8446,
pip list
was added into travis to get a list of exactly which package versions are being used in CI. The upadted requirements.txt reflects this list: https://travis-ci.org/cmonr/mbed-os/jobs/442420121#L458Ideally, all packages would have a fixed version, but it seems unrealistic that users would only have the specific version. My thinking is that this would cause more problems than it solves, so the initial net is cast really wide.
Locally tested by instantiating fresh pipenv directories using 2.7.15 and 3.7.1 anbd running
pip install -r ../mbed-os/requirements.txt
in Arch Linux. Both instances worked without issues.Resolves #8396
Pull request type