Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect if new changes break existing links #793

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Conversation

AndyClifford
Copy link
Contributor

@AndyClifford AndyClifford commented Oct 5, 2023

Added a unit test which determines if any static links have been broken by iterating over the build output and comparing it to a snapshot of existing links. The test will fail if a page is removed and no redirect is added for it.

This allows us to migrate the legacy docs site to the new astro site with confidence. Also ensures we add the existing legacy redirects to the new astro redirects once we publish the migration

Test Plan:

  • CI Pipeline passes

@AndyClifford
Copy link
Contributor Author

AndyClifford commented Oct 5, 2023

@MeganSteenkamp @tom-blake just been playing around with this - do you think it's necessary? I think it should only run on the production build but this is difficult as the validate workflow uses a development build

@AndyClifford AndyClifford force-pushed the no-broken-links branch 2 times, most recently from a37a2dc to 2ca57e4 Compare October 5, 2023 02:26
@MeganSteenkamp
Copy link
Contributor

@MeganSteenkamp @tom-blake just been playing around with this - do you think it's necessary? I think it should only run on the production build but this is difficult as the validate workflow uses a development build

It would be nice to have to get some extra confidence as long as it doesn't take too much time to make :) Perhaps running on the development build is ok?

@AndyClifford AndyClifford force-pushed the no-broken-links branch 6 times, most recently from ee66876 to 9401ba3 Compare October 8, 2023 23:56
@AndyClifford AndyClifford requested a review from tom-blake October 9, 2023 02:44
@AndyClifford AndyClifford force-pushed the no-broken-links branch 3 times, most recently from 9cd8d2d to c85b0e8 Compare October 9, 2023 22:23
Added a unit test which determines if any static links have been broken by iterating over the build output and comparing it to a snapshot of existing links. The test will fail if a page is removed and no redirect is added for it.
@AndyClifford AndyClifford merged commit c0f7dcd into master Oct 10, 2023
1 check passed
@AndyClifford AndyClifford deleted the no-broken-links branch October 10, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants