Open kevwalsh opened 2 years ago
Currently the array of broken links is keyed by source
broken-links = [
'source' => [ destinations ]
'ann-arbor-health-care/health-services' => [
'<a href="//www.va.gov/ann-arbor-health-care/programs/intimate-partner-violence-assistance-program">Intimate partner violence assistance program</a>',
'<a href="//www.va.gov/ann-arbor-health-care/programs/intimate-partner-violence-assistance-program">Intimate partner violence assistance program</a>'
],
'ann-arbor-health-care/locations/adrian-va-clinic' =>
'<a href="//www.va.gov/ann-arbor-health-care/programs/intimate-partner-violence-assistance-program">Intimate partner violence assistance program</a>'
];
counts 3 times
recommending keying it by destination (the bad href of the link)
broken-links = [
'destination' => [ sources ],
'//www.va.gov/ann-arbor-health-care/programs/intimate-partner-violence-assistance-program' => [
'ann-arbor-health-care/health-services' => '<a href="//www.va.gov/ann-arbor-health-care/programs/intimate-partner-violence-assistance-program">Intimate partner violence assistance program</a>',
'ann-arbor-health-care/locations/adrian-va-clinic' =>
'<a href="//www.va.gov/ann-arbor-health-care/programs/intimate-partner-violence-assistance-program">Intimate partner violence assistance program</a>'
]
];
Counts as one 404
We're not currently under a substantial amount of pressure because this limit has been raised.
User Story or Problem Statement
Historical
When all content was code, one broken link was enough to fail the build.
Current state:
In Q1 2021, we started failing the build only when there were mroe there are 10 broken links. It doesn't matter how many pages have broken links.
Proposal (rough version)
Now that we have tens of thousands of CMS-supported pages and 600 active CMS editors, we are often coming close to 10 broken links, we believe that it may be time to raise the limit somewhat, but in a way that makes the logic more aware of Veteran impact.
In many cases, one page can be archived or get an updated URL alias, and cause 10 or more broken links. Or, an editor is working on a handful of pages that interrelate, and we get a race condition where they start publishing the interrelated pages during the content release.
We believe that the build-breaking rules for the broken link checker could be tuned to the needs of the much larger enterprise CMS, while maintaining quality of content for Veterans
Possible changes (not mutually exclusive, just a brainstorm)
Count destinations not sources
Currently the system counts the number of sources of broken links. So one unpublished page (one 404) can result in multiple broken links being counted. Flipping the counter to count the number of broken link destinations would make the count more representative of the actual number of 404's a veteran encounters.
Directory based
Consider number affected pages as well as number of links
Others?
Acceptance Criteria
Implementation steps