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

All Cookbook builds currently broken #100

Closed
brian-rose opened this issue Jan 3, 2023 · 17 comments
Closed

All Cookbook builds currently broken #100

brian-rose opened this issue Jan 3, 2023 · 17 comments
Labels
infrastructure Infrastructure related issue

Comments

@brian-rose
Copy link
Member

As of four days ago, it looks like all Cookbook including this Template are failing their nightly builds.

See build log here where this error is raised:

pkg_resources.ContextualVersionConflict: (jsonschema 3.2.0 (/usr/share/miniconda3/envs/cookbook-dev/lib/python3.10/site-packages), Requirement.parse('jsonschema[format-nongpl]>=4.3.0'), {'jupyter-events'})
@brian-rose brian-rose added the infrastructure Infrastructure related issue label Jan 3, 2023
@brian-rose
Copy link
Member Author

Trying to run jupyter-book build locally on my laptop with a fresh environment yielded the same error.

@brian-rose
Copy link
Member Author

@ProjectPythia/infrastructure hopefully we can get this fixed this week given the AMS meeting coming up.

@brian-rose
Copy link
Member Author

Possibly related to ProjectPythia/intake-cookbook#26?

@brian-rose
Copy link
Member Author

Interestingly, the Foundations book (which uses a very similar stack of dependencies) is still passing its nightly builds: https://github.com/ProjectPythia/pythia-foundations/actions/runs/3826152298/jobs/6509714548

@jnmorley
Copy link

jnmorley commented Jan 3, 2023

I tried cloning the radar-cookbook, which seemed to be having this issue. After creating the Conda environment, I was not able to start Jupyter Lab. It would throw a ModuleNotFoundError: No module named 'jsonschema.protocols'. Comparing the Conda environment with a working environment I created a few days ago, I noticed that jupyter_server had updated from version 1.23.4 to version 2.0.6. Downgrading jupyter_server back to 1.23.4 seemed to fix the issue. I am not sure exactly what the problem is, but downgrading jupyter_server might work as a temporary work around for this issue. From what I can tell, jupyter_server version 2.0.6 tries to use a module in jsonschema that was added around jsonschema=4.3.0, but Jupyter Book requires a version of jsonschema <4.0.0

@brian-rose
Copy link
Member Author

In #101 I added

- jupyter_server<2

to the environment.yml file and that resolved the build problem.

This does seem like a bandaid solution since there's nothing Pythia-specific that triggered this error. I think it's worth tracing the problem upstream and seeing where we can report it, or if it's already being tracked somewhere.

@jukent
Copy link
Contributor

jukent commented Jan 3, 2023

Should I go through and add this dependency to the other cookbooks?

@brian-rose
Copy link
Member Author

Should I go through and add this dependency to the other cookbooks?

Yes, please @jukent that would be great.

If you have time, it would also be great if you could do some digging to see if this problem has been reported anywhere, e.g. jupyterlab or jupyterbook repos.

@mgrover1
Copy link
Contributor

mgrover1 commented Jan 3, 2023

I suspect these issues are related to one that was opened ~13 hours ago jupyter-book/jupyter-book#1902

@jukent
Copy link
Contributor

jukent commented Jan 3, 2023

They all look to be passing to me now? I didn't make any changes.

@brian-rose
Copy link
Member Author

They all look to be passing to me now? I didn't make any changes.

The cookbooks that are building via binder are not currently affected by this issue because they are using an earlier image cached on the binder. I assume they would probably fail with the same issue if we tried to build a new image with a new environment. Unfortunately we don't have a good way to test this right now.

@jukent
Copy link
Contributor

jukent commented Jan 3, 2023

I'm not sure I fully understand - but it sounds like all the Cookbooks displayed in the gallery are unaffected (except maybe the intake one).

@brian-rose
Copy link
Member Author

I'm not sure I fully understand - but it sounds like all the Cookbooks displayed in the gallery are unaffected (except maybe the intake one).

The Radar cookbook was affected, but it was already fixed this morning in ProjectPythia/radar-cookbook#84

@brian-rose
Copy link
Member Author

There are several gaps in our nightly testing strategy. One of them is this inconsistency between what gets tested when we execute the notebooks on GitHub Actions vs on the Binder. On Github Actions, we make a fresh new conda environment every calendar day, or if there are any changes to the environment file. On Binder, we use the cached image associated with the main branch of the repo. This means that the tests run much quicker since we don't have to solve a new environment and build a new docker image, but in some cases (like right now) we are then running the notebooks in a different, out-of-date environment relative to what conda would create for us today -- usually because some new package versions became available upstream. It's a bit of a double-edged sword -- the cached Binder image means that we can run and test the content of our notebooks, and keep doing that even when something breaks upstream -- but we're not testing the reproducibility of the environment.

Something to think about in the bigger picture of what our health checking suite should ideally cover.

@jukent
Copy link
Contributor

jukent commented Jan 3, 2023

Thanks for explaining. Topic for next IWG?

@clyne
Copy link
Contributor

clyne commented Jan 3, 2023

Thanks @brian-rose, @jukent, @jnmorley, @mgrover1 for unraveling this.

weiji14 added a commit to weiji14/zen3geo that referenced this issue Jan 12, 2023
The latest jupyter_server=2.0.6 version installed via readthedocs requires a version of jsonschema which is incompatible with jupyter-book=0.13, resulting in an error like `pkg_resources.UnknownExtra: jsonschema 3.2.0 has no such extra feature 'format-nongpl'`, see also ProjectPythia/cookbook-template#100 (comment) for details. Applying the workaround from ProjectPythia/cookbook-template#101 for now.

Also remove the ipython!=8.7.0 pin added in d29b4bd, since ipython=8.8.0 is released now.
weiji14 added a commit to weiji14/zen3geo that referenced this issue Jan 12, 2023
* ⬆️ Bump gitpython from 3.1.27 to 3.1.30

Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.27 to 3.1.30.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](gitpython-developers/GitPython@3.1.27...3.1.30)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🩹 Relock with poetry 1.3.0

Use new poetry lock file format (version 2.0).

* 📌 Temporarily pin jupyter_server<2 to prevent jsonschema error

The latest jupyter_server=2.0.6 version installed via readthedocs requires a version of jsonschema which is incompatible with jupyter-book=0.13, resulting in an error like `pkg_resources.UnknownExtra: jsonschema 3.2.0 has no such extra feature 'format-nongpl'`, see also ProjectPythia/cookbook-template#100 (comment) for details. Applying the workaround from ProjectPythia/cookbook-template#101 for now.

Also remove the ipython!=8.7.0 pin added in d29b4bd, since ipython=8.8.0 is released now.

* 💚 Use jupyter_server==1.* pinning

Prevent the ` /bin/sh: 1: cannot open 2: No such file` error in readthedocs build due to `<2` not being escaped properly.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@brian-rose
Copy link
Member Author

This was left open in order to improve our testing strategy to do a better job of catching this type of failure. We'll continue that discussion elsewhere. Closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Infrastructure related issue
Projects
Status: Done
Development

No branches or pull requests

5 participants