-
Notifications
You must be signed in to change notification settings - Fork 920
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
Refactors database #921
Refactors database #921
Conversation
6421119
to
944eb63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test to cover what's being refactored.
15df7e9
to
8a5a24c
Compare
3118b7a
to
f004b04
Compare
e8dbc40
to
4fbfa2c
Compare
this is done, @tmancey is just adding tests and then we are good to go |
052365b
to
e892938
Compare
05b839f
to
0c0ab8b
Compare
...brave_rewards/resources/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts
Show resolved
Hide resolved
...brave_rewards/resources/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts
Show resolved
Hide resolved
note: tests are still failing, but are not failing because of the code but setup, so PR code is ready for a review while I am working with @tmancey on test setup |
7138068
to
d4ef111
Compare
768146e
to
f316bab
Compare
f316bab
to
d76269c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a general Rewards regression using this feature, and overall things are smooth. No errors or warnings that I can see.
*Items are added to the AC table as expected, respecting settings
*Items can be removed and restored as expected, excluded site counts are correct
*Contribution processed as expected when a command line flag to shorten the time was provided.
I did notice this, and am unsure if it's related to a prior issue:
I have two sites, a.com
and b.com
in the ac table. The first has 71% attention, the second 29%. I go to remove b.com
and we are left with a.com
at 100%, which is correct. However, when I restore the table, both sites are listed as 100% attention.
d278886
to
da60dd7
Compare
da60dd7
to
e3c864e
Compare
@ryanml fixes 100% problem and finish with database tests, ready for re-review |
@NejcZdovc can you provide an overview of the changes? It's quite a large PR so a summary of the changes would be helpful |
@bridiver Change is tied to splitting publisher api. Before there was only one api for publisher and activity, where now we have dedicated publisher api (which updates publisher_info) and activity api (which updates publisher_info and activity_info). This way you don't need to provide filters and all other stuff when you just want to update for example exclusion flag for the publisher. It also optimized save for visited site, so if you have duration 0 we only insert into publisher_info (using new api) and not populating activity_info with data that is 0. This PR also addresses restore problem that we had, where we were sending restore publisher from exclusion list one by one to the db, where now we restore all of them in one sql call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ confirmed attention re-calculation issue is fixed, good work!
e3c864e#diff-4bf8d740c793a0cf750bc637b07f65a0R418 Should these have been included? |
@jasonrsadler nope, this log shouldn't be there, will remove it |
Resolves brave/brave-browser#2163
Resolves brave/brave-browser#2551
Native ledger: brave-intl/bat-native-ledger#183
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist: