question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CI didn't notice that the slug didn't match the folder

See original GitHub issue

See 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:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
peterbecommented, Jul 15, 2021

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.

0reactions
escattonecommented, Aug 2, 2021

Thanks for tracking this in the get-diff-action repo @peterbe!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found