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

CI: Build cache issue #552

Closed
kp992 opened this issue Oct 9, 2024 · 10 comments · Fixed by #557
Closed

CI: Build cache issue #552

kp992 opened this issue Oct 9, 2024 · 10 comments · Fixed by #557

Comments

@kp992
Copy link
Contributor

kp992 commented Oct 9, 2024

Hi @mmcky,
I was checking the build cache issue and looks like it is working as expected.
For example: https://github.com/QuantEcon/lecture-python-intro/actions/runs/11118983947/job/30893458986?pr=551

The logs show that for the build jobs: Build HTML and Build download notebooks things are working fine and it is using the cached notebooks. Build PDF from Latex does not seem to be using the cache and may the issue behind this is that in cache.yml, we are just building and uploading html build and so it couldn't find PDF cache.

Please let me know if you were pointing some other lecture series issue.

@mmcky
Copy link
Contributor

mmcky commented Oct 10, 2024

@kp992 thanks for your thoughts on this.

The latex build is the first active build in the action, so it looks like it is executing all the notebooks and rebuilding the cache, so download notebooks and the html runs use that cache. The step download_cache should fetch the _build folder to enable the latex run to use the cache made by cache.yml but that doesn't seem to work.

the sphinx message indicates that the environment has changed?

@kp992
Copy link
Contributor Author

kp992 commented Oct 12, 2024

yeah, you are right. Comparing two builds: https://github.com/QuantEcon/lecture-python-intro/actions/runs/11118983947/job/30893458986?pr=551 (2 weeks back) and https://github.com/QuantEcon/lecture-python-intro/actions/runs/10396786335/job/28791423058 (Aug 15), the difference is in the log loading pickled environment... checking bibtex cache... out of date. I don't see any changes in workflow files and so the regression is probably due to some upstream changes. I am trying to debug more into this.

@mmcky
Copy link
Contributor

mmcky commented Oct 14, 2024

thanks @kp992 it is a really frustrating bug. No idea why the pickling would change.

@kp992
Copy link
Contributor Author

kp992 commented Oct 17, 2024

I have even tried to match the same environment as 2 months but the issue still persists. Not sure what is the root cause because it's not even reproducible in previous environments. Any reason why aren't we using latest versions for each libraries and have pinned? I will try to remove all the pins locally and try to see if that fixes.

@mmcky
Copy link
Contributor

mmcky commented Oct 18, 2024

Any reason why aren't we using latest versions for each libraries and have pinned? I will try to remove all the pins locally and try to see if that fixes.

You mean in environment.yml? I keep them up to date regularly but the pins have provided stability for us. I do a check execution each time we upgrade them.

@mmcky
Copy link
Contributor

mmcky commented Oct 18, 2024

It's like sphinx is pickling something in the environment that is changing between cache runs and ci runs causing sphinx to think everything has changed?

@kp992
Copy link
Contributor Author

kp992 commented Oct 28, 2024

I was debugging into it by trying various ways. I created a forked version where I added more logs to check the pickling info like path and all but that was never logged meaning it wasn't called anytime. So maybe not sure what is really wrong. sphinx isn't looking like a breaking library. There are many other extensions and may be something silently got changed in the existing version. Not sure. I tried many approaches.

@mmcky
Copy link
Contributor

mmcky commented Nov 3, 2024

thanks @kp992 it is a tricky one to solve.

I don't fully understand why sphinx decides that the environment has changed sometimes. perhaps we should start to:

  1. test the build without using Jupyter-book but myst-nb directly
  2. then test myst-parser

if the problem persists it is something impacting the sphinx change logic.

@mmcky
Copy link
Contributor

mmcky commented Nov 4, 2024

@kp992 I think I have figured out the issue

QuantEcon/lecture-python-programming.myst#329

@mmcky
Copy link
Contributor

mmcky commented Nov 4, 2024

@mmcky mmcky closed this as completed Nov 4, 2024
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 a pull request may close this issue.

2 participants