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.

Low-hanging fruit fixes on bad redirects in dumper

See original GitHub issue

When reviewing https://github.com/mdn/stumptown-renderer/pull/499/files I noticed a bunch of things the repairUri has to do. Every time. Things that cause unnecessary trouble that could be solved once and for all in the dumper.

For example, a lot of _redirects.txt files look like this:

# FROM-URL      TO-URL
/th/docs/en     /
...

and that can become:

# FROM-URL      TO-URL
/th/docs/en     /en-US/docs/
...

Another example is there’s 27 uses of a _ in the locale code in content/files/zh-tw/_redirects.txt. It uses zh_tw instead of zh-TW which is what what’s in VALID_LOCALES.

In content/files/zh-cn/_redirects.txt there are a lot of these:

/zh-CN/docs/AJAX:Getting_Started        /cn/docs/AJAX/Getting_Started

Just like we once used to called en-US just en, I guess at some point we used to call zh-CN just cn. There’s also a lot of redirects to things like /pt/docs/... which needs to be replaced with pt-BR or pt-PT but which one?! Perhaps it can be deduced from the locale in the MySQL wiki_document row.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
peterbecommented, Apr 22, 2020

Here’s what I think we should do:

  1. Wait for https://github.com/mdn/stumptown-renderer/pull/499 to land
  2. Work on this issue and test it with the repairUri function to see how much less it had to do in the builder.
  3. Revisit how repairUri is used in the builder, in a new issue, to make it much much stricter so that faulty fatfingered PR builds where people edit the _redirects.txt files break the build before it makes things worse.

Good plan?

0reactions
peterbecommented, May 7, 2020

But what about things like:

/zh-CN/docs/About_the_MDC       /Project:cn/docs/%E5%85%B3%E4%BA%8E

that shouldn’t have been included in the _redirects.txt file, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Low Hanging Fruits: The Top Five Easiest Ways to Hack or ...
“Console Redirection Connection” screen provides full remote control of the system. Defense. The root cause of this low-hanging fruit is lack of strong ......
Read more >
What does "low-hanging fruit" mean in tech terms? - YouTube
What does " low - hanging fruit " mean in tech terms? Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >
Breaking Free Of Obsessive Compulsive Disorder (OCD)
Biting her lower lip the seconds tick by. She can't be 100% sure. Swearing under her breath she gets quickly out of the...
Read more >
April 2014 - ProfessorBainbridge.com
The [Supreme] Court held that a tipper like the analyst in Dirks is liable if the tipper breached a fiduciary duty by tipping...
Read more >
Appendix G. Verbatim comments from online survey Questions 1
97006 Grab the low-hanging fruit first. any re-pave of a street without bike lanes should, where physically possible, have them.
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