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

Reflecting Changes in Tree from 0.4.8 to 0.4.12 #147

Merged
merged 11 commits into from
Jan 17, 2024
Merged

Reflecting Changes in Tree from 0.4.8 to 0.4.12 #147

merged 11 commits into from
Jan 17, 2024

Conversation

7hong13
Copy link
Contributor

@7hong13 7hong13 commented Jan 16, 2024

What this PR does / why we need it?

This PR covers up all the changes in Tree from v0.4.8 to v.0.4.12 except for split() and merge().
I've also updated minSdkVersion to 24, but I'll roll back to 23 if there are any potential issues

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

@7hong13 7hong13 requested review from hackerwins and skhugh January 16, 2024 06:19
@7hong13 7hong13 self-assigned this Jan 16, 2024
@7hong13 7hong13 marked this pull request as ready for review January 16, 2024 06:19
@@ -22,7 +22,7 @@ services:
extra_hosts:
- "host.docker.internal:host-gateway"
yorkie:
image: 'yorkieteam/yorkie:0.4.8'
image: 'yorkieteam/yorkie:0.4.10'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hackerwins activateClientRequest returns the following error for the server version 0.4.11 and above:

io.grpc.StatusException: UNAVAILABLE: upstream connect error or disconnect/reset before headers. reset reason: connection termination

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the protobuf models to the latest version(8454812), but the issue still persists.
It's working fine with the real server(api.yorkie.dev, 443), so I'll keep the CI local server version at 0.4.10 until the issue is resolved

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 36 lines in your changes are missing coverage. Please review.

Comparison is base (632aa5d) 78.33% compared to head (b5998fd) 80.96%.
Report is 4 commits behind head on main.

❗ Current head b5998fd differs from pull request most recent head 0b21905. Consider uploading reports for the commit 0b21905 to get more accurate results

Files Patch % Lines
...c/main/kotlin/dev/yorkie/document/crdt/CrdtTree.kt 86.59% 3 Missing and 23 partials ⚠️
...orkie/src/main/kotlin/dev/yorkie/util/IndexTree.kt 84.61% 1 Missing and 5 partials ⚠️
...c/main/kotlin/dev/yorkie/document/crdt/CrdtRoot.kt 60.00% 2 Missing ⚠️
...c/main/kotlin/dev/yorkie/document/json/JsonTree.kt 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   78.33%   80.96%   +2.62%     
==========================================
  Files          63       63              
  Lines        3721     3840     +119     
  Branches      582      601      +19     
==========================================
+ Hits         2915     3109     +194     
+ Misses        500      415      -85     
- Partials      306      316      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -121,7 +121,7 @@ public class Document(public val key: Key, private val options: Options = Option
val proxy = JsonObject(context, clone.root.rootObject)
updater.invoke(
proxy,
Presence(context, clone.presences[changeID.actor] ?: emptyMap()),
Presence(context, clone.presences.getOrDefault(changeID.actor, emptyMap())),
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just use .orEmpty()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 13b3308

}

/**
* Edits the given [range] with the given [contents].
* This method uses indexes instead of a pair of [TreePos] for testing.
*/
fun editByIndex(
@VisibleForTesting
fun editT(
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the meaning of editT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think T stands for Test since the function is only for testing.
the name editT was a bit confusing to me as well, and the function isn't that essential, so I just removed it in b5998fd.
it works the same though.

(cc. @hackerwins )

@7hong13 7hong13 merged commit 15d0512 into main Jan 17, 2024
5 of 6 checks passed
@7hong13 7hong13 deleted the tree branch January 17, 2024 01:53
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