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

update next major #7520

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a9da1db
Remove flacky test
jedelbo Mar 8, 2024
383bdc8
Release core v14.2.0 (#7435)
nicola-cab Mar 8, 2024
f294a0b
Merge pull request #7436 from realm/release/14.2.0
nicola-cab Mar 8, 2024
8364bab
RCORE-1490 Sync collections in Mixed and nested collections (#7353)
danieltabacaru Mar 12, 2024
e4b64e8
Make Scheduler's factory function a function pointer rather than a Un…
tgoyne Mar 12, 2024
666bb25
RCORE-1928 Use baasaas for baas integration tests in CI (#7423)
jbreams Mar 12, 2024
5edb85d
Store less data for notification tracking on collections in Mixed
tgoyne Mar 1, 2024
0e94a90
Fix a data race in collection notifier logging and extract some dupli…
tgoyne Mar 1, 2024
1792e59
Consolidate collection updating logic somewhat
tgoyne Mar 5, 2024
08546b7
Make Obj trivial and add a separate ObjCollectionParent type
tgoyne Mar 5, 2024
916881b
Restore util::NullLogger rather than duplicating it each place it's used
tgoyne Mar 12, 2024
728ba67
Add more UpdateIfNeeded tests
tgoyne Mar 13, 2024
687bb98
Merge pull request #7402 from realm/tg/obj-perf
tgoyne Mar 13, 2024
95c6efc
Improve performance of aggregate operations on empty dictionaries (#7…
tgoyne Mar 14, 2024
be38196
RCORE-2007 Added Resumption delay configuration to SyncClientTimeouts…
Mar 15, 2024
e551769
core v14.3.0 (#7482)
nicola-cab Mar 15, 2024
1c314ba
release notes
nicola-cab Mar 15, 2024
218df45
Merge pull request #7485 from realm/release/14.3.0
nicola-cab Mar 15, 2024
2f7a765
Update the parent's content version when bumping it in a nested colle…
tgoyne Mar 18, 2024
cfbcb50
Set the minimum buffer size in Group::write() to be equal to the page…
tgoyne Mar 18, 2024
7886683
fix depth for nested collections set to 4 in debug mode (#7486)
nicola-cab Mar 19, 2024
743894b
Include nested path in 'OutOfBounds' error message (#7489)
jedelbo Mar 19, 2024
8e111ae
Derive correct ubuntu version on linuxmint (#7471)
jedelbo Mar 19, 2024
b645fb7
RCORE-2027: Setting log callback should not override existing log lev…
nielsenko Mar 19, 2024
4144c60
RCORE-2008 Bump baas version (#7499)
jbreams Mar 20, 2024
255cb33
RCORE-1982 Opening realm with cached user while offline results in fa…
Mar 20, 2024
a0ef749
🔄 Synced file(s) with realm/ci-actions (#7481)
fealebenpae Mar 20, 2024
8084ba9
sets not allowed at storage level inside mixed (#7502)
nicola-cab Mar 21, 2024
1c4e99b
prepare v14.4.0
finnschiermer Mar 21, 2024
ba03546
update release note
finnschiermer Mar 21, 2024
4d707c4
Merge pull request #7505 from realm/release/14.4.0
finnschiermer Mar 21, 2024
5b9f6c1
RCORE-2035 threadsafe realm for init subscription callback (#7500)
nicola-cab Mar 21, 2024
4a40ee7
Revert back catch2 submodule and up to latest
kiburtse Mar 21, 2024
54bdba4
Add internal changelog
kiburtse Mar 21, 2024
3144148
RCORE-2037: [bindgen] smaller fixes after 14.4.0 (#7507)
kneth Mar 22, 2024
374dd67
prepare v14.4.1
finnschiermer Mar 22, 2024
055a8cb
Merge pull request #7511 from realm/prepare-14.4.1
finnschiermer Mar 22, 2024
33809e6
Update release notes
jedelbo Mar 22, 2024
a2034d1
RCORE-2011: New parameter 'progress_estimate' for sync progress notif…
kiburtse Mar 22, 2024
7512a41
update next-major
nicola-cab Mar 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/lock-threads.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Lock Threads'

on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: write
discussions: write

concurrency:
group: lock-threads

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
issue-inactive-days: 30
pr-inactive-days: 30
log-output: true
87 changes: 85 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,96 @@
# NEXT RELEASE
# NEXT-MAJOR NEXT RELEASE

### Enhancements
* <New feature description> (PR [#????](https://github.com/realm/realm-core/pull/????))

### Fixed
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
* None.

### Breaking changes
* None.

### Compatibility
* Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.

-----------

### Internals
* None.

----------------------------------------------

# 14.4.1 Release notes

### Fixed
* Fix pass a thread safe reference to init subscription callback. ([#7497](https://github.com/realm/realm-core/issues/7497), since v13.16.0)

### Compatibility
* Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.

-----------

### Internals
* Update Catch2 from v3.3.2 to v3.5.3 ([PR #7297](https://github.com/realm/realm-core/pull/7509)).

----------------------------------------------

# 14.4.0 Release notes

### Enhancements
* Nested path included in 'OutOfBoundsø error message ([#7438](https://github.com/realm/realm-core/issues/7438))
* Improve file compaction performance on platforms with page sizes greater than 4k (for example arm64 Apple platforms) for files less than 256 pages in size ([PR #7492](https://github.com/realm/realm-core/pull/7492)).

### Fixed
* Modifying nested collections left the accessor used to make the modification in a stale state, resulting in some unneccesary work being done when making multiple modifications via one accessor ([PR #7470](https://github.com/realm/realm-core/pull/7470), since v14.0.0).
* Fix depth level for nested collection in debug mode, set it to the same level as release ([#7484](https://github.com/realm/realm-core/issues/7484), since v14.0.0).
* Fix opening realm with cached user while offline results in fatal error and session does not retry connection. ([#7349](https://github.com/realm/realm-core/issues/7349), since v13.26.0)
* Fix disallow Sets in ArrayMixed. ([#7502](https://github.com/realm/realm-core/pull/7502), since v14.0.0)

### Breaking changes
* Update C-API log callback signature to include the log category, and `realm_set_log_callback` to not take a `realm_log_level_e`. ([PR #7494](https://github.com/realm/realm-core/pull/7494)

### Compatibility
* Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.

----------------------------------------------

# 14.3.0 Release notes

### Enhancements
* Add support to synchronize collections embedded in Mixed properties and other collections (except sets) ([PR #7353](https://github.com/realm/realm-core/pull/7353)).
* Improve performance of change notifications on nested collections somewhat ([PR #7402](https://github.com/realm/realm-core/pull/7402)).
* Improve performance of aggregate operations on Dictionaries of objects, particularly when the dictionaries are empty ([PR #7418](https://github.com/realm/realm-core/pull/7418))
* Added Resumption delay configuration to SyncClientTimeouts. ([PR #7441](https://github.com/realm/realm-core/pull/7441))

### Fixed
* Fixed conflict resolution bug which may result in an crash when the AddInteger instruction on Mixed properties is merged against updates to a non-integer type ([PR #7353](https://github.com/realm/realm-core/pull/7353)).
* Fix a spurious crash related to opening a Realm on background thread while the process was in the middle of exiting ([#7420](https://github.com/realm/realm-core/issues/7420jj))
* Fix a data race in change notification delivery when running at debug log level ([PR #7402](https://github.com/realm/realm-core/pull/7402), since v14.0.0).
* Fix a 10-15% performance regression when reading data from the Realm resulting from Obj being made a non-trivial type ([PR #7402](https://github.com/realm/realm-core/pull/7402), since v14.0.0).

### Breaking changes
* Remove `realm_scheduler_set_default_factory()` and `realm_scheduler_has_default_factory()`, and change the `Scheduler` factory function to a bare function pointer rather than a `UniqueFunction` so that it does not have a non-trivial destructor.

### Compatibility
* Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.

-----------

### Internals
* The CMake option `REALM_MONGODB_ENDPOINT` for running the object-store-tests against baas has been deprecated in favor of an environment variable of the same name ([PR #7423](https://github.com/realm/realm-core/pull/7423)).
* The object-store-tests test suite can now launch baas containers on its own by specifying a `BAASAAS_API_KEY` in the environment ([PR #7423](https://github.com/realm/realm-core/pull/7423)).

----------------------------------------------

# 14.2.0 Release notes

### Enhancements
* Added ability to get current log level via C API (PR [#7419](https://github.com/realm/realm-core/pull/7419))
* Improve performance of object notifiers with complex schemas and very simple changes to process by as much as 20% ([PR #7424](https://github.com/realm/realm-core/pull/7424)).
* Improve performance with very large number of notifiers as much as 75% ([PR #7424](https://github.com/realm/realm-core/pull/7424)).

### Fixed
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
* Fixed an issue when removing items from a LnkLst that could result in invalidated links becoming visable which could cause crashes or exceptions when accessing those list items later on. This affects sync Realms where another client had previously removed a link in a linklist that has over 1000 links in it, and then further local removals from the same list caused the list to have fewer than 1000 items. ([#7414](https://github.com/realm/realm-core/pull/7414), since v10.0.0)
* Query lists vs lists if the property to check is a path with wildcards would not give correct result. This has for a long time also been a problem for queries with linklist properties in the path ([#7393](https://github.com/realm/realm-core/issues/7393), since v14.0.0)

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import PackageDescription
import Foundation

let versionStr = "14.1.0"
let versionStr = "14.4.1"
let versionPieces = versionStr.split(separator: "-")
let versionCompontents = versionPieces[0].split(separator: ".")
let versionExtra = versionPieces.count > 1 ? versionPieces[1] : ""
Expand Down
26 changes: 23 additions & 3 deletions bindgen/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ primitives:
- void
- std::string
- std::string_view
- std::chrono::milliseconds
# TODO: see if we need nullable versions of these. For now null buffers are treated as empty.
- StringData
- OwnedBinaryData
Expand Down Expand Up @@ -553,6 +554,22 @@ records:
before_notify: 'Nullable<util::UniqueFunction<(r: SharedRealm)>>'
schema_did_change: 'Nullable<util::UniqueFunction<(r: SharedRealm)>>' # new schema available as r.schema

ResumptionDelayInfo:
cppName: sync::ResumptionDelayInfo
fields:
max_resumption_delay_interval:
type: std::chrono::milliseconds
default: 3000000
resumption_delay_interval:
type: std::chrono::milliseconds
default: 1000
resumption_delay_backoff_multiplier:
type: int
default: 2
delay_jitter_divisor:
type: int
default: 4

SyncClientTimeouts:
fields:
connect_timeout:
Expand All @@ -570,6 +587,9 @@ records:
fast_reconnect_limit:
type: uint64_t
default: 60000
reconnect_backoff_info:
type: ResumptionDelayInfo
default: {}

SyncClientConfig:
fields:
Expand Down Expand Up @@ -1324,7 +1344,7 @@ classes:
methods:
start: '(callback: AsyncCallback<(realm: Nullable<ThreadSafeReference>, error: Nullable<std::exception_ptr>) off_thread>)'
cancel: ()
register_download_progress_notifier: '(callback: (transferred_bytes: uint64_t, transferrable_bytes: uint64_t) off_thread) -> uint64_t'
register_download_progress_notifier: '(callback: (transferred_bytes: uint64_t, transferrable_bytes: uint64_t, progress_estimate: double) off_thread) -> uint64_t'
unregister_download_progress_notifier: '(token: uint64_t)'

SyncSession:
Expand All @@ -1335,11 +1355,11 @@ classes:
path: std::string
user: SharedSyncUser
config: SyncConfig
full_realm_url: std::optional<std::string>
full_realm_url: std::string
methods:
wait_for_upload_completion: '(callback: AsyncCallback<(err: Status) off_thread>)'
wait_for_download_completion: '(callback: AsyncCallback<(err: Status) off_thread>)'
register_progress_notifier: '(callback: (transferred_bytes: uint64_t, transferrable_bytes: uint64_t) off_thread, direction: ProgressDirection, is_streaming: bool) -> uint64_t'
register_progress_notifier: '(callback: (transferred_bytes: uint64_t, transferrable_bytes: uint64_t, progress_estimate: double) off_thread, direction: ProgressDirection, is_streaming: bool) -> uint64_t'
unregister_progress_notifier: '(token: uint64_t)'
register_connection_change_callback: '(callback: (old_state: SyncSessionConnectionState, new_state: SyncSessionConnectionState) off_thread) -> uint64_t'
unregister_connection_change_callback: '(token: uint64_t)'
Expand Down
6 changes: 3 additions & 3 deletions dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PACKAGE_NAME: realm-core
VERSION: 14.1.0
VERSION: 14.4.1
OPENSSL_VERSION: 3.2.0
ZLIB_VERSION: 1.2.13
# https://github.com/10gen/baas/commits
# dd016 is 2024 Feb 22
BAAS_VERSION: dd01629d83b86292af9c59ebe2a28673c2e559cf
# 6bf5e1 is 2024 Mar 20
BAAS_VERSION: 6bf5e111499ba32d04224e2fc10acca3595edb20
19 changes: 15 additions & 4 deletions evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ functions:
if [ -z "${disable_tests_against_baas|}" ]; then
scheme="http"
set_cmake_var baas_vars REALM_ENABLE_AUTH_TESTS BOOL On
set_cmake_var baas_vars REALM_MONGODB_ENDPOINT STRING "$scheme://localhost:9090"
if [ -n "${baas_admin_port|}" ]; then
set_cmake_var baas_vars REALM_ADMIN_ENDPOINT STRING "$scheme://localhost:${baas_admin_port}"
fi
Expand Down Expand Up @@ -156,7 +155,7 @@ functions:
if [ -n "${curl_base|}" ]; then
set_cmake_var curl_vars CURL_LIBRARY PATH "$(./evergreen/abspath.sh ${curl_base}/lib/libcurl.dll.a)"
set_cmake_var curl_vars CURL_INCLUDE_DIR PATH "$(./evergreen/abspath.sh ${curl_base}/include)"
set_cmake_var baas_vars REALM_CURL_CACERTS PATH "$(./evergreen/abspath.sh "${curl_base}/bin/cacert.pem")"
set_cmake_var baas_vars REALM_CURL_CACERTS PATH "$(./evergreen/abspath.sh "${curl_base}/bin/curl-ca-bundle.crt")"
fi

set_cmake_var realm_vars REALM_NO_TESTS BOOL ${no_tests|Off}
Expand Down Expand Up @@ -208,10 +207,17 @@ functions:
file: './realm-core/benchmark_results/results.latest.json'

"run tests":
- command: expansions.update
params:
file: realm-core/dependencies.yml
- command: shell.exec
params:
working_dir: realm-core
shell: bash
env:
BAASAAS_API_KEY: "${baasaas_api_key}"
BAASAAS_REF_SPEC: "${BAAS_VERSION}"
BAASAAS_START_MODE: "githash"
script: |-
set -o errexit
set -o verbose
Expand Down Expand Up @@ -244,6 +250,12 @@ functions:

TEST_FLAGS="--no-tests=error $TEST_FLAGS ${test_flags|}"

if [[ -n "${disable_tests_against_baas|}" ]]; then
unset BAASAAS_API_KEY
unset BAASAAS_REF_SPEC
unset BAASAAS_START_MODE
fi

if [[ -n "${llvm_symbolizer}" ]]; then
export ASAN_SYMBOLIZER_PATH="$(./evergreen/abspath.sh ${llvm_symbolizer})"
fi
Expand Down Expand Up @@ -977,18 +989,17 @@ tasks:
test_label: objstore-local
test_executable_name: "realm-object-store-tests"
verbose_test_output: true
disable_tests_against_baas: true
- func: "check branch state"

# These are baas object store tests that run against baas running on a remote host
- name: baas-integration-tests
tags: [ "test_suite", "for_pull_requests", "requires_baas" ]
exec_timeout_secs: 3600
commands:
- func: "launch remote baas"
- func: "compile"
vars:
target_to_build: ObjectStoreTests
- func: "wait for remote baas to start"
- func: "run tests"
vars:
test_label: objstore-baas
Expand Down
13 changes: 13 additions & 0 deletions evergreen/install_baas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ function setup_baas_dependencies() {
DISTRO_NAME="$(. /etc/os-release ; echo "${ID}")"
DISTRO_VERSION="$(. /etc/os-release ; echo "${VERSION_ID}")"
DISTRO_VERSION_MAJOR="$(cut -d. -f1 <<< "${DISTRO_VERSION}")"
if [[ "${DISTRO_NAME}" == "linuxmint" ]]; then
CODENAME="$(. /etc/os-release ; echo "${UBUNTU_CODENAME}")"
case "${CODENAME}" in
bionic) DISTRO_VERSION_MAJOR=18;;
focal) DISTRO_VERSION_MAJOR=20;;
jammy) DISTRO_VERSION_MAJOR=22;;
# noble) DISTRO_VERSION_MAJOR=24;;
*)
echo "Error: unsupported version of linuxmint ${DISTRO_VERSION}"
exit 1
;;
esac
fi
elif [[ -e /etc/redhat-release ]]; then
# /etc/redhat-release covers RHEL
DISTRO_NAME=rhel
Expand Down
2 changes: 1 addition & 1 deletion external/catch
Submodule catch updated 92 files
+81 −0 .clang-tidy
+5 −10 .conan/test_package/CMakeLists.txt
+19 −6 .conan/test_package/conanfile.py
+0 −1 .github/workflows/linux-meson-builds.yml
+50 −2 .github/workflows/linux-other-builds.yml
+1 −8 .github/workflows/linux-simple-builds.yml
+31 −0 .github/workflows/package-manager-builds.yaml
+1 −0 .gitignore
+1 −1 CMakeLists.txt
+13 −2 appveyor.yml
+51 −24 conanfile.py
+19 −1 docs/cmake-integration.md
+2 −2 docs/command-line.md
+20 −6 docs/generators.md
+16 −0 docs/limitations.md
+27 −1 docs/release-notes.md
+1 −1 docs/reporters.md
+1 −1 docs/tutorial.md
+1 −2 examples/210-Evt-EventListeners.cpp
+1 −1 examples/231-Cfg-OutputStreams.cpp
+1 −1 examples/232-Cfg-CustomMain.cpp
+1 −1 examples/300-Gen-OwnGenerator.cpp
+9 −8 examples/301-Gen-MapTypeConversion.cpp
+56 −37 extras/catch_amalgamated.cpp
+173 −59 extras/catch_amalgamated.hpp
+1 −1 meson.build
+1 −1 src/CMakeLists.txt
+2 −2 src/catch2/benchmark/detail/catch_analyse.cpp
+1 −1 src/catch2/catch_approx.cpp
+1 −0 src/catch2/catch_message.cpp
+0 −1 src/catch2/catch_registry_hub.cpp
+3 −1 src/catch2/catch_test_case_info.cpp
+1 −1 src/catch2/catch_test_case_info.hpp
+5 −5 src/catch2/catch_tostring.cpp
+2 −2 src/catch2/catch_tostring.hpp
+1 −1 src/catch2/catch_version.cpp
+1 −1 src/catch2/catch_version_macros.hpp
+1 −1 src/catch2/internal/catch_commandline.cpp
+4 −4 src/catch2/internal/catch_compiler_capabilities.hpp
+6 −6 src/catch2/internal/catch_console_colour.cpp
+6 −1 src/catch2/internal/catch_decomposer.cpp
+141 −29 src/catch2/internal/catch_decomposer.hpp
+1 −1 src/catch2/internal/catch_enum_values_registry.hpp
+2 −2 src/catch2/internal/catch_jsonwriter.cpp
+2 −2 src/catch2/internal/catch_jsonwriter.hpp
+2 −3 src/catch2/internal/catch_random_integer_helpers.hpp
+1 −1 src/catch2/internal/catch_reporter_spec_parser.cpp
+7 −3 src/catch2/internal/catch_section.hpp
+20 −7 src/catch2/internal/catch_string_manip.cpp
+2 −2 src/catch2/internal/catch_stringref.hpp
+1 −1 src/catch2/internal/catch_test_macro_impl.hpp
+4 −4 src/catch2/internal/catch_test_registry.hpp
+2 −2 src/catch2/reporters/catch_reporter_console.cpp
+1 −2 src/catch2/reporters/catch_reporter_cumulative_base.cpp
+2 −2 src/catch2/reporters/catch_reporter_json.cpp
+1 −1 src/catch2/reporters/catch_reporter_junit.cpp
+1 −1 src/catch2/reporters/catch_reporter_multi.hpp
+1 −1 src/catch2/reporters/catch_reporter_sonarqube.hpp
+2 −2 src/catch2/reporters/catch_reporter_teamcity.hpp
+1 −1 tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp
+1 −0 tests/ExtraTests/X29-CustomArgumentsForReporters.cpp
+2 −2 tests/ExtraTests/X91-AmalgamatedCatch.cpp
+21 −21 tests/SelfTest/Baselines/compact.sw.approved.txt
+21 −21 tests/SelfTest/Baselines/compact.sw.multi.approved.txt
+70 −54 tests/SelfTest/Baselines/console.sw.approved.txt
+70 −54 tests/SelfTest/Baselines/console.sw.multi.approved.txt
+2 −0 tests/SelfTest/Baselines/junit.sw.approved.txt
+2 −0 tests/SelfTest/Baselines/junit.sw.multi.approved.txt
+2 −0 tests/SelfTest/Baselines/sonarqube.sw.approved.txt
+2 −0 tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt
+25 −25 tests/SelfTest/Baselines/tap.sw.approved.txt
+25 −25 tests/SelfTest/Baselines/tap.sw.multi.approved.txt
+84 −72 tests/SelfTest/Baselines/xml.sw.approved.txt
+84 −72 tests/SelfTest/Baselines/xml.sw.multi.approved.txt
+2 −2 tests/SelfTest/IntrospectiveTests/Details.tests.cpp
+0 −1 tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp
+16 −1 tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp
+1 −1 tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp
+11 −0 tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp
+1 −1 tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp
+1 −1 tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp
+7 −7 tests/SelfTest/UsageTests/Benchmark.tests.cpp
+1 −1 tests/SelfTest/UsageTests/Class.tests.cpp
+69 −2 tests/SelfTest/UsageTests/Compilation.tests.cpp
+2 −2 tests/SelfTest/UsageTests/Exception.tests.cpp
+7 −7 tests/SelfTest/UsageTests/Matchers.tests.cpp
+5 −5 tests/SelfTest/UsageTests/Message.tests.cpp
+6 −6 tests/SelfTest/UsageTests/Misc.tests.cpp
+10 −21 tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp
+2 −2 tests/SelfTest/UsageTests/Tricky.tests.cpp
+14 −9 tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp
+1 −1 tools/scripts/releaseCommon.py
48 changes: 25 additions & 23 deletions how-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,39 +145,41 @@ These are the available variables:
testing process as soon as a check fails or an unexpected exception is thrown
in a test.

## Running [app] tests against a local MongoDB BAAS

Due to MongoDB security policies, running baas requires company issued AWS account credentials.
These are for MongoDB employees only, if you do not have these, reach out to #realm-core.
Once you have them, they need to be set in the shell environment.

First, log in to aws using their command line tool. On mac this requries `brew install awscli`.
Then login using `aws configure` and input your access key and secret acess key. The other
configuration options can be left as none. This creates a correctly formatted file locally at
`~/.aws/credentials` which we will use later.

If you do not want to install the aws command line tools, you can also create the aws file
manually in the correct location (`~/.aws/credentials`) with the following contents:
## Running [app] tests against a local BAAS instance

If you already have a baas instance running, you can specify that directly via the
`BAAS_BASE_URL` environment variable. You can run baas in a local docker container using
instructions from [the wiki](https://wiki.corp.mongodb.com/display/10GEN/%28Device+Sync%29+Using+Docker+to+run+a+BAAS+server+instance).
```
AWS_ACCESS_KEY_ID = <your-key-id>
AWS_SECRET_ACCESS_KEY = <your-secret-key>
export BAAS_BASE_URL=http://localhost:9090
mkdir build.sync.ninja
cmake -B build.sync.ninja -G Ninja -DREALM_ENABLE_AUTH_TESTS=1
cmake --build build.sync.ninja --target realm-object-store-tests
./build.sync.ninja/test/object-store/realm-object-store-tests -d=1
```

We use a script to fetch the dependencies for and run baas locally. Use the `-b sha` to use a particular version from https://github.com/10gen/baas/
The script uses the configuration from https://github.com/10gen/baas/blob/master/etc/configs/test_rcore_config.json
## Running [app] tests against an on-demand BAASAAS container

Due to MongoDB security policies, running baas requires company issued credentials.
These are for MongoDB employees only, if you do not have these, reach out to
#appx-device-sync-internal. Once you have a baasaas API key, it needs to be set
in the shell environment.
```
./evergreen/install_baas.sh -w baas
```

To run the [app] tests against the local baas, you need to configure a build with some cmake options to tell the tests where to point to.
```
export BAASAAS_API_KEY=<your API key here>
mkdir build.sync.ninja
cmake -B build.sync.ninja -G Ninja -DREALM_ENABLE_AUTH_TESTS=1 -DREALM_MONGODB_ENDPOINT=http://localhost:9090
cmake -B build.sync.ninja -G Ninja -DREALM_ENABLE_AUTH_TESTS=1
cmake --build build.sync.ninja --target realm-object-store-tests
./build.sync.ninja/test/object-store/realm-object-store-tests -d=1
```
You can tell the object-store tests to use a specific version of baas with the
`BAASAAS_START_MODE` environment variable, which can either be `githash`, `patchid`,
or `branch`. If you specify a start mode, you need to tell it which githash or
branch name to start with via the `BAASAAS_REF_SPEC` environment variable. Omitting
these will use the latest available commit from the main branch of baas.

If you've started a baasaas container already via the baasaas CLI, you can tell
the object-store tests to use that with the `BAASAAS_INSTANCE_ID` environment variable.


### Developing inside a container

Expand Down
Loading
Loading