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

Pin all python dependencies #283

Merged
merged 3 commits into from
Mar 3, 2022
Merged

Conversation

XN137
Copy link
Contributor

@XN137 XN137 commented Mar 2, 2022

Split out from #280

we should pin all dependencies to avoid random new version releases form affecting our build.

however in the pandas case we relied on pip selecting the right version for us, which needs to be compatible with the (strange) flink dependencies, thus we are now pinning different versions in the respective requirement files.

also noticed that flake8 was in the dev requirements, while its plugins where in the lint requirements, which does not make much sense.
Since we are now using the more restrictive pip dependency resolver (see #280) we should clean up this inconsistency to avoid incompatibilities going forward.

Copy link
Member

@snazy snazy left a comment

Choose a reason for hiding this comment

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

Does it still work fine with the pinned pandas dependency?
I could be wrong, but IIRC there were some issues with pandas before - but could be no longer an issue since we dropped support for Google Colab.

@XN137
Copy link
Contributor Author

XN137 commented Mar 2, 2022

Does it still work fine with the pinned pandas dependency?

define "it" 😅 as you can see the tests are passing...
i can re-test building/running the docker image locally again if you want (I originally tested the whole combination of changes in the other PR)

@snazy
Copy link
Member

snazy commented Mar 2, 2022

Ah - should have been more precise...

"it" == mybinder

@XN137
Copy link
Contributor Author

XN137 commented Mar 3, 2022

ok i re-tested everything

i built the new image tag locally:

bash .github/scripts/create_and_push_docker_image.sh projectnessie/nessie-binder-demos $(grep -i 'FROM' binder/Dockerfile | cut -f2 -d":") docker

then locally modified the Dockerfile to use the local image:

-FROM ghcr.io/projectnessie/nessie-binder-demos:982fe3adb1e8b58263c74d0b3fc4b6b9ab97f652
+FROM projectnessie/nessie-binder-demos:982fe3adb1e8b58263c74d0b3fc4b6b9ab97f652

and then ran the repo2docker logic:

jupyter-repo2docker .

and i was able to execute all 4 notebooks without errors.
So i think this is the best we can do to ensure mybinder will continue to work?

@snazy
Copy link
Member

snazy commented Mar 3, 2022

I meant to run the notebooks in binder from your branch.

@XN137
Copy link
Contributor Author

XN137 commented Mar 3, 2022

I meant to run the notebooks in binder from your branch.

how do you think its different than running jupyter-repo2docker locally?
i dont see how the binder one would fail due to python dependency changes, while the local build/testing still works (because both are using the same docker image definition?)... so to me this seems like a lot of overhead.

also pretty sure testing on binder would run into #272 still

@XN137
Copy link
Contributor Author

XN137 commented Mar 3, 2022

actually i dont think you can test this branch on binder because the base image tag has changed and is not available yet in the github repo:
https://github.com/projectnessie/nessie-demos/pkgs/container/nessie-binder-demos

it is only published once the workflow on main has run.
which is why local testing with docker+jupyter-repo2docker is the best (only?) option right now imo.

@snazy
Copy link
Member

snazy commented Mar 3, 2022

Doesn't it work via e.g. https://mybinder.org/v2/gh/XN137/nessie-demos/pin-all-python-reqs?filepath=notebooks/nessie-iceberg-demo-nba.ipynb ?
Mean, I'd be okay to merge and immediately test on binder and revert if necessary though.

@XN137
Copy link
Contributor Author

XN137 commented Mar 3, 2022

the link runs into the problem of not finding the base image (since as i mentioned, it is not published to ghcr.io yet).

HEAD is now at 94f1bdd run modify_dockerfile.sh
Using DockerBuildPack builder
Step 1/7 : FROM ghcr.io/projectnessie/nessie-binder-demos:982fe3adb1e8b58263c74d0b3fc4b6b9ab97f652
manifest unknownBuilt image, launching...
Failed to connect to event stream

@XN137 XN137 merged commit b7d5c37 into projectnessie:main Mar 3, 2022
@XN137 XN137 deleted the pin-all-python-reqs branch March 3, 2022 13:02
@XN137
Copy link
Contributor Author

XN137 commented Mar 3, 2022

after workflows ran on main i confirmed the binder notebooks still work, so everything went fine i think.

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.

2 participants