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

[Task]: Make growth threshold before flagging relative instead of absolute #15049

Open
1 task
diox opened this issue Sep 26, 2024 · 2 comments
Open
1 task
Labels
needs:info repository:addons-server Issue relating to addons-server

Comments

@diox
Copy link
Member

diox commented Sep 26, 2024

Description

We currently flag add-ons that have their number of users grow above a certain rate threshold depending on their usage tier, but that threshold is an absolute number that is fixed for a given usage tier.

That approach doesn't play well with seasonality, we sometimes have higher or lower growth rates at specific times of the year for various reasons, and we don't want to constantly adjust the thresholds.

To address this, we should make that threshold relative to the mean growth (called hotness internally) for add-ons in the given usage tier instead of absolute.

Acceptance Criteria

Milestones/checkpoints

Checks

  • If I have identified that the work is specific to a repository, I have removed "repository:addons-server" or "repository:addons-frontend"

┆Issue is synchronized with this Jira Task

@diox diox added needs:info repository:addons-server Issue relating to addons-server labels Sep 26, 2024
@diox
Copy link
Member Author

diox commented Sep 26, 2024

Relevant code: https://github.com/mozilla/addons-server/blob/b9af959f76f9669de41fd4aca7c6d219557e5baf/src/olympia/addons/tasks.py#L528

For example, if an Addon has average_daily_users set to 50, it then belongs to the UsageTier that has lower_adu_threshold=0 and upper_adu_threshold=100. If the growth_threshold_before_flagging on that UsageTier is 5, then instead of flagging the add-on when their hotness value is 0.05 or above (hotness is a percentage), we'd flag it if it's 0.05 + {mean hotness value for all add-ons in that usage tier} or above.

Finding the add-ons should still be doable in a single query, though we probably need separate queries to determine the mean hotness for each usage tier.

@wagnerand
Copy link
Member

Note on timing: To avoid running into the issues again that triggered this work item, this would need to be done for the last push this year, at the latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:info repository:addons-server Issue relating to addons-server
Projects
None yet
Development

No branches or pull requests

2 participants