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

Only update BlockchainTransaction on the worker when we absolutely have to #564

Merged
merged 4 commits into from Nov 27, 2020

Conversation

michielderoos
Copy link
Contributor

@michielderoos michielderoos commented Nov 26, 2020

Describe the Pull Request

Whenever we update BlockchainTransaction, the /api/v1/blockchain_taskable webhook is called. The problem is that we update BlockchainTransaction when we don't have to a lot of the time (like when the state changes from PENDING to PENDING), leading to a bunch of webhook calls that don't ever really have to happen. This tests to make sure that we need to update, before we actually do!

Todo

  • Link relevant trello card or related issue to the pull request
  • Request review from relevant @person or team
  • QA your pull request. This includes running the app, login, testing changes etc.
  • Bump backend and/or frontend versions following Semver

@michielderoos
Copy link
Contributor Author

@codecov
Copy link

codecov bot commented Nov 26, 2020

Codecov Report

Merging #564 (6da45d8) into master (9c71c1e) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #564      +/-   ##
==========================================
- Coverage   47.34%   47.34%   -0.01%     
==========================================
  Files         337      337              
  Lines       17262    17263       +1     
  Branches     1284     1284              
==========================================
  Hits         8173     8173              
- Misses       9074     9075       +1     
  Partials       15       15              
Flag Coverage Δ
javascript 5.44% <ø> (ø)
python 71.07% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
config.py 82.50% <100.00%> (ø)
eth_worker/eth_src/sql_persistence/interface.py 63.29% <100.00%> (+0.15%) ⬆️
app/server/__init__.py 92.20% <0.00%> (-0.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c71c1e...6da45d8. Read the comment docs.

@michielderoos michielderoos merged commit 1614da9 into master Nov 27, 2020
@michielderoos michielderoos deleted the only-update-status-when-we-have-to branch November 27, 2020 13:49
enjeyw added a commit that referenced this pull request Nov 30, 2020
* master:
  Stop retrying infinitely (#565)
  Only update BlockchainTransaction on the worker when we absolutely have to (#564)
  Make SynchronizedBlock be updated in batch instead of one giant update (#563)
  Hide Filters and Groups (#558)
  adding more colors to charts, and tweaking legends (#561)
  Chart Tweaks (#560)
  Recipients filter (#533)
  Dynamic transfer card loaded (#559)
  multi-line notes (#556)
  Add indexes to eth_worker database (#545)
  Changes to custom attributes (#540)
  Rewrite custom attribute filters (#552)
enjeyw added a commit that referenced this pull request Dec 3, 2020
* master:
  Silence loading spinner warning (#568)
  Custom attribute bugfix (#549)
  Antify Message Bar (#566)
  Stop retrying infinitely (#565)
  Only update BlockchainTransaction on the worker when we absolutely have to (#564)
  Make SynchronizedBlock be updated in batch instead of one giant update (#563)
  Hide Filters and Groups (#558)
  adding more colors to charts, and tweaking legends (#561)
  Chart Tweaks (#560)
  Recipients filter (#533)
  Dynamic transfer card loaded (#559)
  multi-line notes (#556)
  Add indexes to eth_worker database (#545)

# Conflicts:
#	config.py
enjeyw added a commit that referenced this pull request Dec 3, 2020
* master:
  Silence loading spinner warning (#568)
  Custom attribute bugfix (#549)
  Antify Message Bar (#566)
  Stop retrying infinitely (#565)
  Only update BlockchainTransaction on the worker when we absolutely have to (#564)
  Make SynchronizedBlock be updated in batch instead of one giant update (#563)
  Hide Filters and Groups (#558)
  adding more colors to charts, and tweaking legends (#561)
  Chart Tweaks (#560)
  Recipients filter (#533)
  Dynamic transfer card loaded (#559)
  multi-line notes (#556)
  Add indexes to eth_worker database (#545)
  Changes to custom attributes (#540)
  Rewrite custom attribute filters (#552)
enjeyw added a commit that referenced this pull request Dec 15, 2020
* master: (28 commits)
  Adding blockchain_task_uuid index to worker messages (#551)
  Make location lookup look at existing users' coordinates as a last resort (#555)
  Add support for Commcare (#569)
  Improve external transaction detection (#570)
  Remove unused imports (#571)
  Celo integration (#535)
  feat: small improvements to accessibility across the web app (#562)
  Group by Sender and Recipient (#567)
  Enable multiple chains (#496)
  Silence loading spinner warning (#568)
  Custom attribute bugfix (#549)
  Antify Message Bar (#566)
  Stop retrying infinitely (#565)
  Only update BlockchainTransaction on the worker when we absolutely have to (#564)
  Make SynchronizedBlock be updated in batch instead of one giant update (#563)
  Hide Filters and Groups (#558)
  adding more colors to charts, and tweaking legends (#561)
  Chart Tweaks (#560)
  Recipients filter (#533)
  Dynamic transfer card loaded (#559)
  ...

# Conflicts:
#	app/server/api/transfer_card_api.py
#	app/test_app/functional/api/test_transfer_card_api.py
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.

None yet

2 participants