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

Stale RepositoryMetadata cleanup #436

Merged
merged 4 commits into from
Dec 26, 2020

Conversation

lemonsaurus
Copy link
Member

@lemonsaurus lemonsaurus commented Dec 13, 2020

We don't want to keep lots of old metadata for repos we no longer need to track on the frontpage. That can lead to this weird side-effect:
image

This happens because we never removed the old RepositoryMetadata from the database after changing the repos we wanted to appear on the front page. After the recent refactor, we're now displaying all RepositoryMetadata objects when we fetch from cache, and then all of these would then be shown on the front page.

We don't want to keep lots of old metadata for repos we no longer need
to track on the frontpage. Previously, whenever we changed the frontpage
line-up, we'd be left with useless, stale data in the database. This
fixes that, and adds tests.
@ghost ghost added the needs 2 approvals label Dec 13, 2020
@coveralls
Copy link

coveralls commented Dec 13, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling 545f46c on hotfix/lemon/front-page-project-sanity into e00be6b on master.

Copy link
Member

@Den4200 Den4200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small thing!

pydis_site/apps/home/views/home.py Outdated Show resolved Hide resolved
Co-authored-by: Dennis Pham <dennis@dennispham.me>
Copy link
Member

@Den4200 Den4200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Den4200 Den4200 merged commit 2e6df20 into master Dec 26, 2020
@Den4200 Den4200 deleted the hotfix/lemon/front-page-project-sanity branch December 26, 2020 22:09
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.

4 participants