-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Consume monorepo core binaries #7241
Conversation
* Use monorepo * Use newer CMake * use latest monorepo * Point to right cmake version Jenkins to use right cmake version Fix imports and executables linking * Fix cmake url * Add ninja-build package to docker image * Add new cmake instructions to readme * don’t worry about realm-core’s command-line targets * use latest monorepo * Add support for LTO. It is enabled by default for release builds, but can be opted out of. * Rename abiFilter to indicate it support multiple flags * Set an optimization level, it is required when enabling LTO. * Bump core commit * Bump monorepo core version * rollback mongodb realm server version * Fix checkstyle step in Jenkins file * remove the gradle logic to download core this should be moved to CMake Co-authored-by: Clemente Tort <clementetb@gmail.com> Co-authored-by: Christian Melchior <christian@ilios.dk>
# Conflicts: # realm/realm-library/src/main/cpp/object-store
…with LTO enabled on release.
Enable LTO optimizations by default
Fix gradle not picking up boolean values
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.
Looks good, great job!
Co-authored-by: Yavor Georgiev <fealebenpae@users.noreply.github.com>
Co-authored-by: Yavor Georgiev <fealebenpae@users.noreply.github.com>
Co-authored-by: Yavor Georgiev <fealebenpae@users.noreply.github.com>
Sizes for generated JNI binaries:
|
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.
Looks good. I'm a bit concerned about the number of ignored tests though. It could indicate we should wait with merging this until that has been fixed?
@@ -113,6 +114,7 @@ | |||
*/ | |||
|
|||
@RunWith(Parameterized.class) | |||
@Ignore("Tests crash due to bug in core, see https://jira.mongodb.org/browse/RCORE-435") |
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.
Is this still a problem? At least the comments in the issue seems to indicate it has been fixed?
If it hasn't been fixed, how critical is it?
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.
It has been fixed but hasn't been released yet. It is on the core develop
branch.
The issue crashes the test process, and it would crash any app. We shouldn't release without fixing the issue.
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.
Okay, in that case, I would put this PR on hold until we can get a fix from Core. But otherwise I would say this PR is ready to be merge.
@@ -75,6 +75,7 @@ | |||
import static org.junit.Assume.assumeThat; | |||
|
|||
@RunWith(AndroidJUnit4.class) | |||
@Ignore("Tests crash due to bug in core, see https://jira.mongodb.org/browse/RCORE-435") |
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.
Is this still relevant?
@@ -68,6 +68,7 @@ | |||
import static org.junit.Assert.fail; | |||
|
|||
@RunWith(AndroidJUnit4.class) | |||
@Ignore("Tests crash due to bug in core, see https://jira.mongodb.org/browse/RCORE-435") |
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.
Same?
@@ -135,6 +135,7 @@ | |||
|
|||
|
|||
@RunWith(AndroidJUnit4.class) | |||
@Ignore("Tests crash due to bug in core, see https://jira.mongodb.org/browse/RCORE-435") |
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.
Same?
CHANGELOG.md
Outdated
@@ -1,3 +1,25 @@ | |||
## 10.3.0 (YYYY-MM-DD) | |||
|
|||
### Deprecated |
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.
We normally leave this out if nothing here.
CHANGELOG.md
Outdated
### Deprecated | ||
* None. | ||
|
||
### Breaking Changes |
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.
We normally leave this section out if nothing here.
CHANGELOG.md
Outdated
* None. | ||
|
||
### Compatibility | ||
* None. |
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.
Copy the section from previous releases here.
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.
Had some minor comments.
@@ -91,6 +91,7 @@ try { | |||
// But still build all ABI's and run all types of tests. | |||
useEmulator = true | |||
emulatorImage = "system-images;android-29;default;x86" | |||
buildFlags = "-PenableLTO=true -PbuildCore=true" |
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.
For traceability/reproducability etc. I would assume that it safest to do release from the prebuilts. Is it safe to to the release from locally build cores? Or don't we get the benefits of optimizations unless we build it?
* Install CMake version 3.18.2 and build Ninja. | ||
* Install the NDK (currently r21) from the SDK Manager in Android Studio or using the [website](https://developer.android.com/ndk/downloads). If downloaded | ||
You may unzip the file wherever you choose. For macOS, a suggested location is `~/Library`. The download will unzip as the directory `android-ndk-r21`. | ||
* Install the NDK (Side-by-side) **21.0.6113669** from the SDK Manager in Android Studio. Remember to check `☑ Show package details` in the manager to display all available versions. |
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.
Isn't this download automatically when we specify the ndkVersion
through the Android Gradle Plugin.
``` | ||
|
||
* If you'd like to specify the location in which to store the archives of Realm Core, define the `REALM_CORE_DOWNLOAD_DIR` environment variable. It enables you to keep Core's archive when executing `git clean -xfd`. | ||
* If you'd like to specify the location in which to store the archives of Realm Core, define the `REALM_CORE_DOWNLOAD_DIR` environment variable. It enables caching core release artifacts. |
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.
* If you'd like to specify the location in which to store the archives of Realm Core, define the `REALM_CORE_DOWNLOAD_DIR` environment variable. It enables caching core release artifacts. | |
* If you'd like to specify the location in which to store the archives of Realm Core, define the `REALM_CORE_DOWNLOAD_DIR` environment variable. It enables caching of downloaded core release artifacts. |
CHANGELOG.md
Outdated
* None. | ||
|
||
### Fixes | ||
* None. |
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.
We should probably add a comment about https://jira.mongodb.org/browse/HELP-21241. Maybe something like * [RealmApp] Sometimes getting
Index out of range error when integrating a remote Sync changeset into the local Realm
It is a bit vague, but not sure I can come up with something more specific that doesn't involve writing 10s of lines of text.
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.
If CI is happy 🚀
Co-authored-by: Christian Melchior <christian@ilios.dk>
Co-authored-by: Christian Melchior <christian@ilios.dk>
* None. | ||
|
||
### Fixes | ||
* [RealmApp] Integrating a remote Sync changeset into the local Realm could result in an `Index out of range error`. |
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.
It looks like the Core release has a few other fixes we should also mention. Sorry for not catching this earlier. https://github.com/realm/realm-core/blob/master/CHANGELOG.md#1033-release-notes
I would propose changing it to this:
* [RealmApp] Integrating a remote Sync changeset into the local Realm could result in an `Index out of range error`.
* Change notifications not firing when removing and adding an object with the same primary key within a transaction (Issue [#7098](https://github.com/realm/realm-java/issues/7098)).
* Race condition which would lead to "uncaught exception in notifier thread: N5realm15InvalidTableRefE: transaction_ended" and a crash when the source Realm was closed or invalidated at a very specific time during the first run of a collection notifier (Core issue [#3761](https://github.com/realm/realm-core/issues/3761), since v7.0.0).
* Deleting and recreating objects with embedded objects could fail (Core issue [#4240](https://github.com/realm/realm-core/pull/4240), since v10.0.0)
But feel free to do that after CI has run, no reason to retrigger it for a doc update.
# Conflicts: # CHANGELOG.md # realm/realm-library/src/main/cpp/object-store
This PR adds the option to consume prebuild realm-core monorepo release artifacts, with the intention of minimizing the CI timings.
Warning: This PR will fail to run due to an error in the CMake file distributed in the release artifacts.