Skip to content

Conversation

@wooj2
Copy link
Contributor

@wooj2 wooj2 commented Dec 1, 2020

First approach was here:
#917

I realized late that we have effectively coupled the instantiation of the storageEngine with starting the syncEngine. The approach in this PR maintains this behavior in order to skirt around having to save state of whether or not the sync engine has been started in conjunction with the storage engine being instantiated. I believe that by preserving this coupling, makes for a significantly more elegant approach than the design/implementation in PR 917.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@wooj2 wooj2 requested a review from palpatim December 1, 2020 06:36
@codecov
Copy link

codecov bot commented Dec 1, 2020

Codecov Report

Merging #919 (8372fa1) into main (ff776df) will increase coverage by 0.25%.
The diff coverage is 87.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #919      +/-   ##
==========================================
+ Coverage   67.27%   67.52%   +0.25%     
==========================================
  Files         895      896       +1     
  Lines       35372    35638     +266     
==========================================
+ Hits        23796    24066     +270     
+ Misses      11576    11572       -4     
Flag Coverage Δ
API_plugin_unit_test 62.49% <ø> (-0.08%) ⬇️
Analytics_plugin_unit_test 72.38% <ø> (ø)
Auth_plugin_unit_test 48.62% <ø> (ø)
DataStore_plugin_unit_test 83.56% <90.30%> (+0.53%) ⬆️
Predictions_plugin_unit_test 49.49% <ø> (ø)
Storage_plugin_unit_test 74.74% <ø> (ø)
build_test_amplify 63.07% <0.00%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
...egories/DataStore/DataStoreCategory+Behavior.swift 12.50% <0.00%> (-4.17%) ⬇️
...ataStoreCategoryPlugin/Storage/StorageEngine.swift 50.74% <0.00%> (+1.20%) ⬆️
...TestCommon/Mocks/MockDataStoreCategoryPlugin.swift 32.35% <0.00%> (-4.32%) ⬇️
...Plugin/Storage/StorageEngine+SyncRequirement.swift 54.76% <57.14%> (-0.80%) ⬇️
...WSDataStoreCategoryPlugin/AWSDataStorePlugin.swift 56.04% <77.27%> (+17.67%) ⬆️
...gin/AWSDataStorePlugin+DataStoreBaseBehavior.swift 71.12% <77.77%> (+7.41%) ⬆️
...nSync/Support/MockSQLiteStorageEngineAdapter.swift 62.80% <85.71%> (+9.92%) ⬆️
...ryPluginTests/Core/AWSAPICategoryPluginTests.swift 95.81% <95.81%> (ø)
...eCategoryPluginTests/Core/ConfigurationTests.swift 90.90% <100.00%> (-0.76%) ⬇️
...sts/Core/SQLiteStorageEngineAdapterJsonTests.swift 90.02% <100.00%> (+0.08%) ⬆️
... and 19 more

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 ff776df...c01010e. Read the comment docs.

Copy link
Member

@palpatim palpatim left a comment

Choose a reason for hiding this comment

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

Discussed offline

@wooj2 wooj2 requested a review from palpatim December 1, 2020 18:16
Copy link
Member

@palpatim palpatim left a comment

Choose a reason for hiding this comment

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

approved w/ minor changes

wooj2 and others added 4 commits December 1, 2020 12:35
Co-authored-by: Tim Schmelter <schmelte@amazon.com>
Co-authored-by: Tim Schmelter <schmelte@amazon.com>
…rePlugin+DataStoreBaseBehavior.swift

Co-authored-by: Tim Schmelter <schmelte@amazon.com>
@wooj2 wooj2 merged commit 5fa5d7e into main Dec 1, 2020
@wooj2 wooj2 deleted the feat/startstopV2 branch December 1, 2020 20:37
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.

2 participants