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

ref(replacements): Move ProjectsQueryFlags out of errors_replacer #3504

Merged
merged 3 commits into from
Dec 13, 2022

Conversation

rahul-kumar-saini
Copy link
Contributor

@rahul-kumar-saini rahul-kumar-saini commented Dec 12, 2022

Overview

  • ProjectsQueryFlags is a huge class and concept, and although tied to the errors_replacer, it should probably reside in its own module and not errors_replacer.py
  • Also, it seems strange that errors_replacer.py resides in the main snuba/datasets/ directory while the snuba/datasets/replacements/ directory is empty, and the replacer isn't a dataset
    • Moved errors_replacer.py into that directory and created a new file for ProjectsQueryFlags in the same directory

For context, ProjectsQueryFlags is the abstraction we use on top of Redis to handle setting and getting replacement data for projects.

@rahul-kumar-saini rahul-kumar-saini marked this pull request as ready for review December 12, 2022 23:09
@rahul-kumar-saini rahul-kumar-saini requested a review from a team as a code owner December 12, 2022 23:09
@codecov-commenter
Copy link

Codecov Report

Base: 91.73% // Head: 21.71% // Decreases project coverage by -70.02% ⚠️

Coverage data is based on head (a1a7325) compared to base (06590b3).
Patch coverage: 30.28% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3504       +/-   ##
===========================================
- Coverage   91.73%   21.71%   -70.03%     
===========================================
  Files         717      677       -40     
  Lines       33519    32189     -1330     
===========================================
- Hits        30750     6989    -23761     
- Misses       2769    25200    +22431     
Impacted Files Coverage Δ
snuba/replacer.py 0.00% <0.00%> (-91.17%) ⬇️
tests/datasets/test_errors_replacer.py 0.00% <0.00%> (-99.62%) ⬇️
tests/test_replacer.py 0.00% <0.00%> (-97.20%) ⬇️
...nuba/datasets/replacements/projects_query_flags.py 32.78% <32.78%> (ø)
snuba/datasets/replacements/errors_replacer.py 33.15% <33.33%> (ø)
snuba/datasets/storages/errors.py 100.00% <100.00%> (ø)
snuba/query/processors/physical/replaced_groups.py 40.27% <100.00%> (-55.56%) ⬇️
tests/base.py 0.00% <0.00%> (-100.00%) ⬇️
tests/helpers.py 0.00% <0.00%> (-100.00%) ⬇️
tests/conftest.py 0.00% <0.00%> (-100.00%) ⬇️
... and 639 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rahul-kumar-saini rahul-kumar-saini merged commit 9062c36 into master Dec 13, 2022
@rahul-kumar-saini rahul-kumar-saini deleted the rahul/ref/projects-query-flags branch December 13, 2022 20:24
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.

3 participants