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

feat(SPV-1038): decouple sync job from SyncTx #701

Merged
merged 16 commits into from
Sep 23, 2024

Conversation

chris-4chain
Copy link
Contributor

image

  • SyncTransaction model is no longer "used" (I left the model for now because that would delete this table from database)
  • The column tx_status has new values (which basically replaces SyncTransaction model purpose)
  • The main changes were in strategies (outgoing, internal/external incoming) and for SYNC task.

Pull Request Checklist

  • 📖 I created my PR using provided : CODE_STANDARDS
  • 📖 I have read the short Code of Conduct: CODE_OF_CONDUCT
  • 🏠 I tested my changes locally.
  • ✅ I have provided tests for my changes.
  • 📝 I have used conventional commits.
  • 📗 I have updated any related documentation.
  • 💾 PR was issued based on the Github or Jira issue.

@chris-4chain chris-4chain requested a review from a team as a code owner September 18, 2024 06:15
Copy link

github-actions bot commented Sep 18, 2024

Manual Tests

💚 Manual testing by @dzolt-4chain resulted in success.

@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 23.24561% with 175 lines in your changes missing coverage. Please review.

Project coverage is 46.69%. Comparing base (4ded60a) to head (3b3450b).

Files with missing lines Patch % Lines
engine/tx_sync_task.go 0.00% 73 Missing ⚠️
engine/record_tx_strategy_outgoing_tx.go 28.57% 23 Missing and 7 partials ⚠️
engine/chainstate/transaction.go 44.82% 11 Missing and 5 partials ⚠️
engine/action_transaction.go 12.50% 13 Missing and 1 partial ⚠️
engine/model_transactions.go 8.33% 11 Missing ⚠️
engine/tx_broadcast.go 73.91% 4 Missing and 2 partials ⚠️
engine/record_tx_strategy_internal_incoming_tx.go 0.00% 5 Missing ⚠️
actions/transactions/broadcast_callback.go 0.00% 4 Missing ⚠️
engine/record_tx_strategy_external_incoming_tx.go 0.00% 4 Missing ⚠️
engine/cron_job_definitions.go 0.00% 2 Missing ⚠️
... and 7 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
- Coverage   46.87%   46.69%   -0.18%     
==========================================
  Files         302      301       -1     
  Lines       13136    13020     -116     
==========================================
- Hits         6157     6080      -77     
+ Misses       6381     6352      -29     
+ Partials      598      588      -10     
Flag Coverage Δ
unittests 46.69% <23.24%> (-0.18%) ⬇️

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

Files with missing lines Coverage Δ
engine/chainstate/chainstate.go 53.84% <100.00%> (+2.12%) ⬆️
engine/cron_job_declarations.go 53.12% <100.00%> (ø)
engine/model_bump.go 56.84% <100.00%> (+0.45%) ⬆️
engine/model_sync_transactions.go 41.17% <ø> (-54.07%) ⬇️
engine/tx_service.go 67.81% <ø> (+5.71%) ⬆️
engine/db_model_transactions.go 59.80% <0.00%> (-0.78%) ⬇️
engine/examples/client/custom_cron/custom_cron.go 0.00% <0.00%> (ø)
engine/paymail_service_provider.go 27.64% <0.00%> (+0.86%) ⬆️
mappings/transaction.go 0.00% <0.00%> (ø)
engine/cron_job_definitions.go 0.00% <0.00%> (ø)
... and 12 more

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

engine/tx_sync_task.go Show resolved Hide resolved
engine/tx_sync_task.go Show resolved Hide resolved
engine/tx_sync_task.go Outdated Show resolved Hide resolved
@wregulski
Copy link
Contributor

Looks good to me, all paths that I know seems covered.

engine/tx_sync_task.go Outdated Show resolved Hide resolved
@chris-4chain chris-4chain self-assigned this Sep 18, 2024
engine/model_bump.go Outdated Show resolved Hide resolved
engine/record_tx_strategy_outgoing_tx.go Outdated Show resolved Hide resolved
engine/record_tx_strategy_outgoing_tx.go Show resolved Hide resolved
models/errors.go Show resolved Hide resolved
engine/action_transaction.go Show resolved Hide resolved
engine/record_tx_strategy_outgoing_tx.go Outdated Show resolved Hide resolved
engine/record_tx_strategy_outgoing_tx.go Outdated Show resolved Hide resolved
engine/record_tx_strategy_outgoing_tx.go Show resolved Hide resolved
engine/tx_broadcast.go Show resolved Hide resolved
Copy link
Contributor

@dorzepowski dorzepowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot that I asked you to add tests for the error Is method

@dzolt-4chain dzolt-4chain added the tested PR was tested by a team member label Sep 23, 2024
@chris-4chain chris-4chain merged commit 9ce0fac into main Sep 23, 2024
16 checks passed
@chris-4chain chris-4chain deleted the feat-decouple-sync-job-from-synctx branch September 23, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR was tested by a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants