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

Whitehall stores historical link check reports #6011

Open
ChrisBAshton opened this issue Mar 2, 2021 · 0 comments
Open

Whitehall stores historical link check reports #6011

ChrisBAshton opened this issue Mar 2, 2021 · 0 comments

Comments

@ChrisBAshton
Copy link
Contributor

Cause

Whitehall stores link_check_reports for each Edition, as a has_many relationship. This was added in 2014 with little explanation.

In the UI, we only ever expose the most recent link checker report, so these historical reports are redundant. A has_one relationship, storing only the most recent report, would be more appropriate.

NB: there is a spike capturing some of the work involved in paying down this technical debt.

Consequences

  1. Makes Whitehall unnecessarily more complex to write code in.
  2. We've had to introduce code to delete old link check reports every day, which is to prevent the database from growing continually and to improve the performance of the Edition.only_broken_links method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant