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

Update makefile to pin pip version to fix nightly CI #3182

Merged
merged 6 commits into from
Oct 16, 2023
Merged

Conversation

noklam
Copy link
Contributor

@noklam noklam commented Oct 16, 2023

NOTE: Kedro datasets are moving from kedro.extras.datasets to a separate kedro-datasets package in
kedro-plugins repository. Any changes to the dataset implementations
should be done by opening a pull request in that repository.

Description

pypa/pip#12317

pip 23.2 breaks Python <3.8 and we have pin it in environment.py, now pip 23.3 breaks the dependency resolution.

See full log here: https://github.com/kedro-org/kedro/actions/runs/6527279214/job/17743502460

The conflict is caused by:
kedro[test] 0.18.13 depends on dask~=2021.10; extra == "test"
dask[complete] 2021.12.0 depends on dask 2021.12.0 (from https://files.pythonhosted.org/packages/15/6d/99c63be3ea8a4a651d845addeea1f1b3bb8e5c6730bc26cfb6176631adf7/dask-2021.12.0-py3-none-any.whl (from https://pypi.org/simple/dask/) (requires-python:>=3.7))

The conflict does not exist and this is because pip switch the backend for dependency resolver.

Development notes

Cause: pip 23.2 or 23.3 used a new backend for dependency resolver and it’s buggy.

Changes:
Pin pip <23.2 for all Python versions (used to be specific one due to pip-tools)
Change .readthedoc.yml - this one is rather hacky but because RTD has a very rigid build steps that cannot be overrided.

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

@noklam noklam self-assigned this Oct 16, 2023
@ankatiyar
Copy link
Contributor

@noklam Might also need to pin the pip version for rtd build!

@noklam
Copy link
Contributor Author

noklam commented Oct 16, 2023

https://docs.readthedocs.io/en/stable/config-file/v2.html
It isn’t exactly clear where did RTD inject those command, I am trying to use pre_install now.

post_checkout, pre_system_dependencies, post_system_dependencies, pre_create_environment, post_create_environment, pre_install, post_install, pre_build, post_build

I am trying to move everything to pre_install and abandon the install steps because RTD always upgrade pip if we choose to install requirements.txt, which is causing the failure.

Signed-off-by: Nok <[email protected]>
@noklam
Copy link
Contributor Author

noklam commented Oct 16, 2023

Appear to be working, I have added some comments there. This is quite hacky and we should remove it when pip release a better version.

@noklam noklam marked this pull request as ready for review October 16, 2023 16:43
@noklam noklam requested a review from merelcht as a code owner October 16, 2023 16:43
@noklam noklam enabled auto-merge (squash) October 16, 2023 16:52
Copy link
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @noklam for the super quick fix! 💯

Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@noklam noklam merged commit d2070a7 into main Oct 16, 2023
56 of 65 checks passed
@noklam noklam deleted the noklam/fix-nightly branch October 16, 2023 17:56
@SajidAlamQB SajidAlamQB mentioned this pull request Oct 18, 2023
7 tasks
@notatallshaw
Copy link

Do you have a small reproducible example of where newer versions of Pip fail?

I want to check if it's really the same issue as the one you link, and have an additional test case for when there is a fix.

@notatallshaw
Copy link

FYI, after some investigating I do not beleive the issue you linked to (pypa/pip#12317) triggers this issue, I have created a new issue on Pip for this error: pypa/pip#12376

adamkells pushed a commit to adamkells/kedro that referenced this pull request Oct 30, 2023
* Update makefile to pin pip version to fix nightly CI

* Add more comments

Signed-off-by: Nok <[email protected]>

* Update pip for RTD

Signed-off-by: Nok <[email protected]>

* update RTD build

Signed-off-by: Nok <[email protected]>

* hijack the pre_install steps

Signed-off-by: Nok <[email protected]>

* Fix linting

Signed-off-by: Nok <[email protected]>

---------

Signed-off-by: Nok <[email protected]>
Signed-off-by: Adam Kells <[email protected]>
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.

4 participants