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

Use Jupyter cache in gh workflow docs build #2279

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Conversation

cosenal
Copy link
Contributor

@cosenal cosenal commented Apr 10, 2024

Description

This is an attempt to use Github Actions Cache to restore jupyter_cache from one workflow run to the next one. That cache is created by Sphinx Myst-NB because we are setting this in the configuration.


Test

Unfortunately I can't test this with the awesomeact tool, because this job starts docker in one of the steps (#dockerinception). So only a merge will tell if it works 😬

@cosenal cosenal added documentation Improvements or additions to documentation infrastructure For issues related to building, packaging, and continuous integration. labels Apr 10, 2024
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (ffa4b38) to head (39c8a44).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2279   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          90       90           
  Lines        4263     4263           
=======================================
  Hits         4190     4190           
  Misses         73       73           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@natestemen natestemen left a comment

Choose a reason for hiding this comment

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

Great idea. Save engineering/CI time 💪🏻.

Had a few questions, and generally since we can't test it ourselves I figured it would be good to do some searching across GitHub to see what other people are doing.

.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
@cosenal
Copy link
Contributor Author

cosenal commented Apr 11, 2024

@natestemen comments addressed, PTAL

Copy link
Member

@natestemen natestemen left a comment

Choose a reason for hiding this comment

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

Let's try it out! I have had some instances locally where I needed to remove something from the cache in order to get the build to work correctly, but I haven't recreated that situation.

Just left one question, but not blocking. Thanks for answering my other questions :)

@@ -54,6 +54,12 @@ jobs:
docker run --rm -idt -p 5000:5000 rigetti/qvm -S
docker run --rm -idt -p 5555:5555 rigetti/quilc -R

- name: Fetch Jupyter cache
Copy link
Member

Choose a reason for hiding this comment

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

Just checking my understanding: this is both fetching and setting the cache, right?

Copy link
Contributor Author

@cosenal cosenal Apr 11, 2024

Choose a reason for hiding this comment

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

Yes. My understanding is that it simply populates the specified path in the container with the content that's in cache.

@cosenal
Copy link
Contributor Author

cosenal commented Apr 11, 2024

Unfortunately, because of that linkcheck issue, the build doesn't succeed and the cache is not populated. I will merge anyway, and hopefully we will have a chance to try it out once the build is green.

@cosenal cosenal merged commit 12c7126 into main Apr 11, 2024
17 of 18 checks passed
@cosenal cosenal deleted the jupyter-cache-docs-build branch April 11, 2024 20:25
@purva-thakre
Copy link
Collaborator

@cosenal We could temporarily remove the make linkcheck line from the job

- name: Build and test Sphinx docs

And add it back in when the other issue is resolved.

@cosenal
Copy link
Contributor Author

cosenal commented Apr 11, 2024

@purva-thakre Raise a PR and I will approve it right away :)

cosenal added a commit that referenced this pull request Jun 26, 2024
* Use Jupyter cache in gh workflow docs build

* bump cache action version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation infrastructure For issues related to building, packaging, and continuous integration.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants