Conversation
…fail harder if necessary
b9e42ef to
92c71e8
Compare
There was a problem hiding this comment.
@nrichers I don't think this fixed the issue (with the notebooks, at least) — the notebooks were NOT executed, they were skipped because no files were changed:
Let me pull test with a fake changed notebook file to see if it runs correctly.
I am not that familiar with our notebook execution step, so I appreciate your extra testing here. The issue should be resolved, as there is now always a file to build for the {{< include >}}. |
The notebook executions always run for staging and prod, and for PR previews it's a very easy filter for changed files in the # See if site/notebooks/ has updates
# Checks the current PR branch against the target branch
- name: Filter changed files
uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.event.pull_request.base_ref }}
ref: ${{ github.head_ref }}
filters: |
notebooks:
- 'site/notebooks/EXECUTED/**'(Just pointing out that again, just because something is documented doesn't make it transparent to the person that didn't do the designing/documenting. :p) |
validbeck
left a comment
There was a problem hiding this comment.
Nice, it did work: https://github.com/validmind/documentation/actions/runs/23913198659/job/69740245958?pr=1263
Let me remove the test notebook before you merge.
23cf169 to
4e1f603
Compare
validbeck
left a comment
There was a problem hiding this comment.
Actually, I just noticed this race condition:
The parallel render of the notebooks used to take longer than the full site render (which is why we pulled them out of the render and ran them parallel to begin with, to minimize runtime and prevent failures if the notebooks failed), meaning that the executed versions of the notebooks would replace the non-executed versions.
Now, the LLM markdown render step brings the runtime of the full render to longer than the execution, meaning ... the executed notebooks will always be replaced by the non-executed versions.
Can we look into chaining these steps into a separate workflow that only runs if the full site render is successful?
- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Validate LLM markdown render
run: bash llm/render.sh && bash llm/clean.sh
working-directory: site
Yes, but not in this PR. I added c7a6d11 to prevent our validate workflow from syncing the executed notebooks folder. If that works, I can update staging and prod workflows. Simplest, safest solution. |
Lighthouse check resultsShow Lighthouse scoresFolder depth level checked: 0 Commit SHA: 41d20de Modify the workflow to check a different depth:
|
Execute training notebooks for PRs✓ INFO: Live previews are available — |
validbeck
left a comment
There was a problem hiding this comment.
Looks like that worked — can you apply the same changes to staging & prod (and remove the test notebook)? 🙏🏻
|
OK, applied the same --exclude directive for the executed notebooks when we sync to AWS S3 for staging and prod. Looks like we're done here, merging. |
PR SummaryThis PR introduces several functional improvements in the documentation deployment and template schema generation processes:
Together, these changes streamline the documentation deployment and ensure that the template schema documentation is reliably and accurately generated and updated whenever the backend JSON schema changes. Test Suggestions
|
Validate docs site✓ INFO: A live preview of the docs site is available — Open the preview |
Pull Request Description
What and why?
This PR solves the issue whereby notebook execution and LLM Markdown rendering fail when no generated template schema docs are present but are referenced in an {{< include >}} statement.
The solution:
The alternative solution would have been a comment marker of some kind that gets replaced with a file embed or a mostly blank template schema docs baseline, both with more downsides than the solution in this PR. Happy to talk through this, if necessary.
Changes:
.gitignore— Removed_template-schema-generated.qmdfrom gitignore so baseline docs can be trackedREADME.md— Minor documentation updatesscripts/generate_template_schema_docs.py— Modified with stricter validation to fail CI on generation errorssite/Makefile— Changedpiptopython -m pipfor environment robustness_template-schema-generated.qmd— Added tracked baseline template schema docstemplates/customize-document-templates.qmd— Removed comment that is no longer applicableFixes sc-15354
How to test
What needs special review?
Dependencies, breaking changes, and deployment notes
Release notes
Checklist