[#20] - Quick fix to the spotlight selection process - #21
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Addresses the “spotlight gap” issue where the daily safety-net sync could clear the previous Repo of the Week when the weekly selection task hasn’t produced a current-week pick, leaving the site without a spotlight.
Changes:
- Add fallback logic in
sync_spotlight_watchesto use the most recent priorRepoOfTheWeekwhen the current week has no record. - Add test coverage to ensure the fallback preserves the previous spotlight selection.
- Configure
select_repo_of_weekto retry on failures, and document the behavior in the changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
CHANGELOG.md |
Documents the spotlight fallback and weekly task retry behavior under Unreleased → Fixed. |
backend/apps/repositories/spotlight.py |
Prevents daily spotlight sync from clearing watches when there is no current-week pick by falling back to the most recent pick. |
backend/apps/analysis/tests/test_tasks.py |
Adds a regression test ensuring the previous spotlight is preserved if the current-week pick is missing. |
backend/apps/analysis/tasks.py |
Adds Celery retry configuration to the weekly select_repo_of_week task. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue: #20
Summary
Accepting the PR into the development branch will address the spotlight bug where we fail to pick a NEW repo of the week.
Changes
Checklist
ruff checkandblackpass (backend)vue-tsc --noEmitpasses (frontend)CHANGELOG.mdupdated under## Unreleased<style>blocks in.vuefiles