CI didn't notice that the slug didn't match the folder
See original GitHub issueSee https://github.com/mdn/content/pull/6734
If you look carefully, @Rumyra made the perfectly human error of accidentally forgetting to update the slug
value. The folder was correctly named .../firefox/releases/92
but a mismatch in folder and slug
(from front-matter) should crash the CI build. In fact, I proved that with:
▶ yarn build files/en-us/mozilla/firefox/releases/92/index.html
yarn run v1.22.10
$ env-cmd --silent cross-env CONTENT_ROOT=files BUILD_OUT_ROOT=build node node_modules/@mdn/yari/build/cli.js files/en-us/mozilla/firefox/releases/92/index.html
CONTENT_ROOT: /Users/peterbe/dev/MOZILLA/MDN/content/files
CONTENT_TRANSLATED_ROOT: not set
CONTENT_ARCHIVED_ROOT: not set
Time to gather all translations: 4.210s
Error: The document's slug (Mozilla/Firefox/Releases/91) doesn't match its disk folder name (en-us/mozilla/firefox/releases/92)
at buildDocument (/Users/peterbe/dev/MOZILLA/MDN/content/node_modules/@mdn/yari/build/index.js:288:11)
at buildDocumentInteractive (/Users/peterbe/dev/MOZILLA/MDN/content/node_modules/@mdn/yari/build/cli.js:51:35)
at buildDocuments (/Users/peterbe/dev/MOZILLA/MDN/content/node_modules/@mdn/yari/build/cli.js:130:15)
at Se._action (/Users/peterbe/dev/MOZILLA/MDN/content/node_modules/@mdn/yari/build/cli.js:320:66)
at Se.run (/Users/peterbe/dev/MOZILLA/MDN/content/node_modules/@caporal/core/dist/index.js:1:27590)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Te._run (/Users/peterbe/dev/MOZILLA/MDN/content/node_modules/@caporal/core/dist/index.js:1:32257)
error: The document's slug (Mozilla/Firefox/Releases/91) doesn't match its disk folder name (en-us/mozilla/firefox/releases/92)
So the Yari builder code is working at least.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
configure deploy preview path when the file name doesn't ...
I've read on Netlify CMS docs that you can configure the preview paths to a specific page. The instructions assume that you use...
Read more >blog/posts.category.get_absolute_url, didn't match any of these
I am stuck at url problem. I suppose it is because of my 'blog.urls', or the href is my 'models.py'.But I am not...
Read more >Permalinks & Slugs – WordPress.com Support
Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. Slugs are the...
Read more >Variable $uid not provided for root slug - Prismic People
The solution was to move my article page to the template folder and add validation checks to ensure preview routes were built correctly....
Read more >URL dispatcher - Django documentation
Django runs through each URL pattern, in order, and stops at the first one that matches the requested URL, matching against path_info ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No update here other than I’m taking the P1 label off. I’m genuinely stumped and we might have either a bug in a lib or an extremely rare case of some race condition in the git storage. Let’s keep it open till more clues, magically, appear.
Thanks for tracking this in the
get-diff-action
repo @peterbe!