Skip to content

Commit

Permalink
[Automated] Merge releases into main (#1729)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored May 2, 2024
1 parent ecc7eac commit 52ad45b
Show file tree
Hide file tree
Showing 24 changed files with 315 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/include-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
deploy:
runs-on: macos-latest
runs-on: macos-12
name: Deploy release

steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/include-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

# TODO: The Monkey seems to crash the app all the time, but with failures that are not coming from the app. Figure out why.
# android-sample-app:
# runs-on: macos-latest
# runs-on: macos-12
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
./gradlew assembleDebug jvmJar
realm-java-compatibiliy:
runs-on: macos-latest
runs-on: macos-12
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
- type: gradle75
path: integration-tests/gradle/gradle75-test
arguments: integrationTest
runs-on: macos-latest
runs-on: macos-12
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
- type: gradle8
path: integration-tests/gradle/gradle8-test
arguments: integrationTest
runs-on: macos-latest
runs-on: macos-12
steps:
- uses: actions/checkout@v3

Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
retention-days: 1

build-jvm-macos-native-lib:
runs-on: macos-latest
runs-on: macos-12
needs: [check-cache, build-jni-swig-stub]
if: |
always() &&
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
# This task is also responsible for creating the Gradle and Compiler Plugin as well as
# all Kotlin Multiplatform Metadata
build-jvm-packages:
runs-on: macos-latest
runs-on: macos-12
needs: [check-cache, build-jvm-linux-native-lib, build-jvm-windows-native-lib, build-jvm-macos-native-lib]
if: |
always() &&
Expand Down Expand Up @@ -638,7 +638,7 @@ jobs:
# TODO: ccache is not being used by this build for some reason
build-macos-x64-packages:
runs-on: macos-latest
runs-on: macos-12
needs: check-cache
if: always() && !cancelled() && needs.check-cache.outputs.packages-macos-x64-cache-hit != 'true'

Expand Down Expand Up @@ -706,7 +706,7 @@ jobs:
retention-days: 1

build-macos-arm64-packages:
runs-on: macos-latest
runs-on: macos-12
needs: check-cache
# needs: static-analysis
if: always() && !cancelled() && needs.check-cache.outputs.packages-macos-arm64-cache-hit != 'true'
Expand Down Expand Up @@ -774,7 +774,7 @@ jobs:
retention-days: 1

build-ios-x64-packages:
runs-on: macos-latest
runs-on: macos-12
needs: check-cache
# needs: static-analysis
if: always() && !cancelled() && needs.check-cache.outputs.packages-ios-x64-cache-hit != 'true'
Expand Down Expand Up @@ -843,7 +843,7 @@ jobs:
retention-days: 1

build-ios-arm64-packages:
runs-on: macos-latest
runs-on: macos-12
needs: check-cache
# needs: static-analysis
if: always() && !cancelled() && needs.check-cache.outputs.packages-ios-arm64-cache-hit != 'true'
Expand Down Expand Up @@ -931,7 +931,7 @@ jobs:
- type: sync
test-title: Unit Test Results - Android Sync (Emulator)

runs-on: macos-latest
runs-on: macos-12
needs: [check-cache, build-android-packages, build-jvm-packages, build-kotlin-metadata-package]
if: |
always() &&
Expand Down Expand Up @@ -1175,15 +1175,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest] # , macos-arm]
os: [macos-12] # , macos-arm]
type: [base, sync]
include:
- os: macos-latest
- os: macos-12
type: base
os-id: macos
package-prefix: macos-x64
test-title: Unit Test Results - MacOS x64 Base
- os: macos-latest
- os: macos-12
type: sync
os-id: macos
package-prefix: macos-x64
Expand Down Expand Up @@ -1297,15 +1297,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest] # , macos-arm]
os: [macos-12] # , macos-arm]
type: [base, sync]
include:
- os: macos-latest
- os: macos-12
type: base
package-prefix: x64
test-title: Unit Test Results - iOS x64 Base
test-task: iosTest
- os: macos-latest
- os: macos-12
type: sync
package-prefix: x64
test-title: Unit Test Results - iOS x64 Sync
Expand Down Expand Up @@ -1419,10 +1419,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest] # TODO Should we also test om MacOS arm64?
os: [macos-12, ubuntu-latest, windows-latest] # TODO Should we also test om MacOS arm64?
type: [base, sync]
include:
- os: macos-latest
- os: macos-12
os-id: mac
type: base
test-title: Unit Test Results - Base JVM MacOS x64
Expand All @@ -1434,7 +1434,7 @@ jobs:
os-id: win
type: base
test-title: Unit Test Results - Base JVM Windows
- os: macos-latest
- os: macos-12
os-id: mac
type: sync
test-title: Unit Test Results - Sync JVM MacOS x64
Expand Down
18 changes: 13 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 1.16.0-SNAPSHOT (YYYY-MM-DD)
## 1.17.0-SNAPSHOT (YYYY-MM-DD)

[!NOTE]
This release will bump the Realm file format from version 23 to 24. Opening a file with an older format will automatically upgrade it from file format v10. If you want to upgrade from an earlier file format version you will have to use Realm Kotlin v1.13.1 or earlier. Downgrading to a previous file format is not possible.
Expand Down Expand Up @@ -31,7 +31,7 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi
### Internal
* None.

## 1.15.1-SNAPSHOT (YYYY-MM-DD)
## 1.16.0 (2024-05-01)

[!NOTE]
This release will bump the Realm file format from version 23 to 24. Opening a file with an older format will automatically upgrade it from file format v10. If you want to upgrade from an earlier file format version you will have to use Realm Kotlin v1.13.1 or earlier. Downgrading to a previous file format is not possible.
Expand All @@ -40,10 +40,18 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi
* None.

### Enhancements
* None.
* Add support for changing the App Services base URL. It allows to roam between Atlas and Edge Server. Changing the url would trigger a client reset. (Issue [#1659](https://github.com/realm/realm-kotlin/issues/1659)/[RKOTLIN-1013](https://jira.mongodb.org/browse/RKOTLIN-1023))

### Fixed
* None.
* Fixed a bug when running a IN query (or a query of the pattern `x == 1 OR x == 2 OR x == 3`) when evaluating on a string property with an empty string in the search condition. Matches with an empty string would have been evaluated as if searching for a null string instead. (Core issue [realm/realm-core#7628](https://github.com/realm/realm-core/pull/7628) since Core v10.0.0-beta.9)
* Fixed several issues around encrypted file portability (copying a "bundled" encrypted Realm from one device to another). (Core issues [realm/realm-core#7322](https://github.com/realm/realm-core/issues/7322) and [realm/realm-core#7319](https://github.com/realm/realm-core/issues/7319))
* Queries using query paths on Mixed values returns inconsistent results (Core issue [realm/realm-core#7587](https://github.com/realm/realm-core/issues/7587), since Core v14.0.0)
* [Sync] `App.allUsers()` included logged out users only if they were logged out while the App instance existed. It now always includes all logged out users. (Core issue [realm/realm-core#7300](https://github.com/realm/realm-core/pull/7300))
* [Sync] Deleting the active user left the active user unset rather than selecting another logged-in user as the active user like logging out and removing users did. (Core issue [realm/realm-core#7300](https://github.com/realm/realm-core/pull/7300))
* [Sync] Schema initialization could hit an assertion failure if the sync client applied a downloaded changeset while the Realm file was in the process of being opened (Core issue [realm/realm-core#7041](https://github.com/realm/realm-core/issues/7041), since Core v11.4.0).

### Known issues
* Missing initial download progress notification when there is no active downloads. (Issue [realm/realm-core#7627](https://github.com/realm/realm-core/issues/7627), since 1.15.1)

### Compatibility
* File format: Generates Realms with file format v24 (reads and upgrades file format v10 or later).
Expand All @@ -61,7 +69,7 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi
* Minimum R8: 8.0.34.

### Internal
* None.
* Updated to Realm Core 14.6.1 commit cde3adb7649d3361806dbbae0cf353b8fdc4d54e.


## 1.15.0 (2024-04-17)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ val HOST_OS: OperatingSystem = findHostOs()

object Realm {
val ciBuild = (System.getenv("CI") != null)
const val version = "1.16.0-SNAPSHOT"
const val version = "1.17.0-SNAPSHOT"
const val group = "io.realm.kotlin"
const val projectUrl = "https://realm.io"
const val pluginPortalId = "io.realm.kotlin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ expect enum class ErrorCode : CodeDescription {
RLM_ERR_CUSTOM_ERROR,
RLM_ERR_CLIENT_USER_NOT_FOUND,
RLM_ERR_CLIENT_USER_NOT_LOGGED_IN,
RLM_ERR_CLIENT_APP_DEALLOCATED,
RLM_ERR_CLIENT_REDIRECT_ERROR,
RLM_ERR_CLIENT_TOO_MANY_REDIRECTS,
RLM_ERR_CLIENT_USER_ALREADY_NAMED,
RLM_ERR_BAD_TOKEN,
RLM_ERR_MALFORMED_JSON,
RLM_ERR_MISSING_JSON_KEY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,16 @@ expect object RealmInterop {
callback: AppCallback<Array<ApiKeyWrapper>>,
)

fun realm_app_get_base_url(
app: RealmAppPointer,
): String

fun realm_app_update_base_url(
app: RealmAppPointer,
baseUrl: String?,
callback: AppCallback<Unit>,
)

// User
fun realm_user_get_all_identities(user: RealmUserPointer): List<SyncUserIdentity>
fun realm_user_get_identity(user: RealmUserPointer): String
Expand All @@ -596,8 +606,8 @@ expect object RealmInterop {
appId: String
)

fun realm_sync_client_config_set_base_file_path(
syncClientConfig: RealmSyncClientConfigurationPointer,
fun realm_app_config_set_base_file_path(
appConfig: RealmAppConfigurationPointer,
basePath: String
)

Expand All @@ -607,13 +617,13 @@ expect object RealmInterop {

fun realm_set_log_level(level: CoreLogLevel)

fun realm_sync_client_config_set_metadata_mode(
syncClientConfig: RealmSyncClientConfigurationPointer,
fun realm_app_config_set_metadata_mode(
appConfig: RealmAppConfigurationPointer,
metadataMode: MetadataMode
)

fun realm_sync_client_config_set_metadata_encryption_key(
syncClientConfig: RealmSyncClientConfigurationPointer,
fun realm_app_config_set_metadata_encryption_key(
appConfig: RealmAppConfigurationPointer,
encryptionKey: ByteArray
)
fun realm_sync_client_config_set_user_agent_binding_info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ actual enum class ErrorCode(actual override val description: String?, actual ove
RLM_ERR_CUSTOM_ERROR("CustomError", realm_errno_e.RLM_ERR_CUSTOM_ERROR),
RLM_ERR_CLIENT_USER_NOT_FOUND("ClientUserNotFound", realm_errno_e.RLM_ERR_CLIENT_USER_NOT_FOUND),
RLM_ERR_CLIENT_USER_NOT_LOGGED_IN("ClientUserNotLoggedIn", realm_errno_e.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN),
RLM_ERR_CLIENT_APP_DEALLOCATED("ClientAppDeallocated", realm_errno_e.RLM_ERR_CLIENT_APP_DEALLOCATED),
RLM_ERR_CLIENT_REDIRECT_ERROR("ClientRedirectError", realm_errno_e.RLM_ERR_CLIENT_REDIRECT_ERROR),
RLM_ERR_CLIENT_TOO_MANY_REDIRECTS("ClientTooManyRedirects", realm_errno_e.RLM_ERR_CLIENT_TOO_MANY_REDIRECTS),
RLM_ERR_CLIENT_USER_ALREADY_NAMED("ClientUserAlreadyNamed", realm_errno_e.RLM_ERR_CLIENT_USER_ALREADY_NAMED),
RLM_ERR_BAD_TOKEN("BadToken", realm_errno_e.RLM_ERR_BAD_TOKEN),
RLM_ERR_MALFORMED_JSON("MalformedJson", realm_errno_e.RLM_ERR_MALFORMED_JSON),
RLM_ERR_MISSING_JSON_KEY("MissingJsonKey", realm_errno_e.RLM_ERR_MISSING_JSON_KEY),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package io.realm.kotlin.internal.interop

import io.realm.kotlin.internal.interop.Constants.ENCRYPTION_KEY_LENGTH
import io.realm.kotlin.internal.interop.RealmInterop.cptr
import io.realm.kotlin.internal.interop.sync.ApiKeyWrapper
import io.realm.kotlin.internal.interop.sync.AuthProvider
import io.realm.kotlin.internal.interop.sync.CoreConnectionState
Expand Down Expand Up @@ -1158,7 +1157,7 @@ actual object RealmInterop {
syncClientConfig: RealmSyncClientConfigurationPointer,
basePath: String
): RealmAppPointer {
return LongPointerWrapper(realmc.realm_app_create(appConfig.cptr(), syncClientConfig.cptr()), managed = true)
return LongPointerWrapper(realmc.realm_app_create(appConfig.cptr()), managed = true)
}

actual fun realm_app_log_in_with_credentials(
Expand Down Expand Up @@ -1229,6 +1228,18 @@ actual object RealmInterop {
return result
}

actual fun realm_app_get_base_url(
app: RealmAppPointer,
): String = realmc.realm_app_get_base_url(app.cptr())

actual fun realm_app_update_base_url(
app: RealmAppPointer,
baseUrl: String?,
callback: AppCallback<Unit>,
) {
realmc.realm_app_update_base_url(app.cptr(), baseUrl, callback)
}

actual fun realm_user_get_all_identities(user: RealmUserPointer): List<SyncUserIdentity> {
val count = AuthProvider.values().size.toLong() // Optimistically allocate the max size of the array
val keys = realmc.new_identityArray(count.toInt())
Expand Down Expand Up @@ -1335,11 +1346,11 @@ actual object RealmInterop {
)
}

actual fun realm_sync_client_config_set_base_file_path(
syncClientConfig: RealmSyncClientConfigurationPointer,
actual fun realm_app_config_set_base_file_path(
appConfig: RealmAppConfigurationPointer,
basePath: String
) {
realmc.realm_sync_client_config_set_base_file_path(syncClientConfig.cptr(), basePath)
realmc.realm_app_config_set_base_file_path(appConfig.cptr(), basePath)
}

actual fun realm_sync_client_config_set_multiplex_sessions(syncClientConfig: RealmSyncClientConfigurationPointer, enabled: Boolean) {
Expand All @@ -1354,22 +1365,22 @@ actual object RealmInterop {
realmc.realm_set_log_level(level.priority)
}

actual fun realm_sync_client_config_set_metadata_mode(
syncClientConfig: RealmSyncClientConfigurationPointer,
actual fun realm_app_config_set_metadata_mode(
appConfig: RealmAppConfigurationPointer,
metadataMode: MetadataMode
) {
realmc.realm_sync_client_config_set_metadata_mode(
syncClientConfig.cptr(),
realmc.realm_app_config_set_metadata_mode(
appConfig.cptr(),
metadataMode.nativeValue
)
}

actual fun realm_sync_client_config_set_metadata_encryption_key(
syncClientConfig: RealmSyncClientConfigurationPointer,
actual fun realm_app_config_set_metadata_encryption_key(
appConfig: RealmAppConfigurationPointer,
encryptionKey: ByteArray
) {
realmc.realm_sync_client_config_set_metadata_encryption_key(
syncClientConfig.cptr(),
realmc.realm_app_config_set_metadata_encryption_key(
appConfig.cptr(),
encryptionKey
)
}
Expand Down
1 change: 1 addition & 0 deletions packages/cinterop/src/native/realm.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
headers = realm.h realm/error_codes.h
headerFilter = realm.h realm/error_codes.h
compilerOpts = -DREALM_APP_SERVICES=1
// Relative paths in def file depends are resolved differently dependent on execution
// location
// https://youtrack.jetbrains.com/issue/KT-43439
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ actual enum class ErrorCode(
RLM_ERR_CUSTOM_ERROR("CustomError", realm_errno.RLM_ERR_CUSTOM_ERROR),
RLM_ERR_CLIENT_USER_NOT_FOUND("ClientUserNotFound", realm_errno.RLM_ERR_CLIENT_USER_NOT_FOUND),
RLM_ERR_CLIENT_USER_NOT_LOGGED_IN("ClientUserNotLoggedIn", realm_errno.RLM_ERR_CLIENT_USER_NOT_LOGGED_IN),
RLM_ERR_CLIENT_APP_DEALLOCATED("ClientAppDeallocated", realm_errno.RLM_ERR_CLIENT_APP_DEALLOCATED),
RLM_ERR_CLIENT_REDIRECT_ERROR("ClientRedirectError", realm_errno.RLM_ERR_CLIENT_REDIRECT_ERROR),
RLM_ERR_CLIENT_TOO_MANY_REDIRECTS("ClientTooManyRedirects", realm_errno.RLM_ERR_CLIENT_TOO_MANY_REDIRECTS),
RLM_ERR_CLIENT_USER_ALREADY_NAMED("ClientUserAlreadyNamed", realm_errno.RLM_ERR_CLIENT_USER_ALREADY_NAMED),
RLM_ERR_BAD_TOKEN("BadToken", realm_errno.RLM_ERR_BAD_TOKEN),
RLM_ERR_MALFORMED_JSON("MalformedJson", realm_errno.RLM_ERR_MALFORMED_JSON),
RLM_ERR_MISSING_JSON_KEY("MissingJsonKey", realm_errno.RLM_ERR_MISSING_JSON_KEY),
Expand Down
Loading

0 comments on commit 52ad45b

Please sign in to comment.