feat(weekly-report): Use recommended sort v1 to find top issues#118605
Draft
amy-chen23 wants to merge 3 commits into
Draft
feat(weekly-report): Use recommended sort v1 to find top issues#118605amy-chen23 wants to merge 3 commits into
amy-chen23 wants to merge 3 commits into
Conversation
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.
Resolves -----
Summary
weekly-report.recommended.*options so they can be tuned via automator independently of the issue stream weightsweight_overridesparameter to_recommended_aggregation()so the weekly report can pass its own weights without duplicating the ClickHouse expression logicorganizations:weekly-report-recommended-sortfeature flagChanges
src/sentry/options/defaults.py— register 4 weekly report weight optionssrc/sentry/search/snuba/executors.py— addweight_overridesparam to_recommended_aggregation()src/sentry/tasks/summaries/utils.py— build candidates using_recommended_aggregationwith weekly report weightssrc/sentry/tasks/summaries/organization_report_context_factory.py— populate candidates behind feature flagsrc/sentry/tasks/summaries/weekly_reports.py— simplify render path: use ClickHouse base_score directly, drop v2 rerankingsrc/sentry/templates/sentry/emails/reports/body.html— conditional header: "Top issues for you" vs "Issues with the most errors"src/sentry/features/temporary.py— register feature flagsrc/sentry/snuba/referrer.py— addREPORTS_RECOMMENDED_ISSUESreferrertests/sentry/tasks/test_weekly_reports.py— 4 tests covering flag on/off, candidate ordering, template renderingTest plan
pytest -k recommended_sort tests/sentry/tasks/test_weekly_reports.py— 4 pass