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 versions of all the things used in tests #2242

Merged
merged 68 commits into from Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
739de0a
Fix some unused variable warnings
tgoyne Jan 22, 2019
7d2afbe
Use node 8 for the tests
tgoyne Jan 23, 2019
d9a8248
Move dependencies only used by download-realm.js to devDependencies
tgoyne Jan 23, 2019
e1a7a30
Update the iOS stuff to work with Xcode 10
tgoyne Jan 23, 2019
80597a5
Update to a more recent version of react native for the tests
tgoyne Jan 23, 2019
7f9dfda
Use install-local to mimick the pre-npm5 behavior of file: deps
tgoyne Jan 24, 2019
67d0fcf
Upgrade tests to ROS 3.17.1
tgoyne Jan 25, 2019
275b19f
Disable a test which hits an assertion failure in sync due to a core bug
tgoyne Jan 25, 2019
d323bb5
Add a missing check for a node-only test
tgoyne Jan 25, 2019
9c6d26a
Improve error reporting when filesystem errors occur
tgoyne Jan 25, 2019
a1a4819
Don't throw an exception when a file delete fails due to it not existing
tgoyne Jan 25, 2019
57129bf
Update the iOS react example
tgoyne Jan 25, 2019
85071db
Download ROS after building the local copy as npm install cleans up e…
tgoyne Jan 26, 2019
97d034e
Update the versions of everything for react-native android tests
tgoyne Jan 26, 2019
f12362b
Update eslint and fix a bunch of errors
tgoyne Jan 29, 2019
165d1b4
Update electron and fix the electron test runner
tgoyne Jan 29, 2019
9d0bda6
Update to sync 3.15.0
tgoyne Jan 29, 2019
8effe69
Fix a crash when running the react-native tests on iOS
tgoyne Jan 30, 2019
ca6a582
Fix running non-Chrome react-native tests on iOS
tgoyne Jan 30, 2019
f2ca9e6
Enable running chrome tests against a release build of react-native
tgoyne Jan 30, 2019
bd1d4aa
Install dev dependencies for test-runner
tgoyne Jan 30, 2019
308aadd
Wait for ROS to start before running tests
tgoyne Feb 6, 2019
36f0f9f
Fix a variable scoping issue in a test
tgoyne Feb 6, 2019
f6c0e83
Do awful things to get at the JSContext with RN 0.58
tgoyne Feb 7, 2019
ac643c7
Ensure the build directory is created in time
tgoyne Feb 7, 2019
f18d824
Work around some Xcode wierdness
tgoyne Feb 7, 2019
e34b1cd
Upgrade tests to react-native 0.58.4
tgoyne Feb 7, 2019
e6d4cf5
Make the timeout for test startup longer as bundling can take a long …
tgoyne Feb 7, 2019
e4498dd
Work around a CocoaPods 1.5.3 project generation bug
tgoyne Feb 8, 2019
5602d6f
Also set the nvm default alias for react tests as that's what the bun…
tgoyne Feb 8, 2019
5d37e0b
Delete more state before starting the packager
tgoyne Feb 8, 2019
60c7d85
Fix memory leaks when running the react-native tests
tgoyne Feb 8, 2019
8ffa36b
Use RCTEventEmitter rather than deprecated things
tgoyne Feb 8, 2019
282322e
Retry on network errors when hitting the auth endpoint
tgoyne Feb 9, 2019
d147911
Add fake_host.local to the ATS exemption list
tgoyne Feb 9, 2019
7eaebee
Enforce the timeout when calling auth methods from react-native
tgoyne Feb 11, 2019
4050714
Set the executor class for tests at the correct time
tgoyne Feb 11, 2019
7aa3923
Don't let RCTDevSettings change the executor class while running tests
tgoyne Feb 12, 2019
9f64992
Remove the indentWidth setting on the react tests project
tgoyne Feb 12, 2019
9f13d1c
Cut down on the amount of bridge reloading done on startup
tgoyne Feb 12, 2019
022335f
Implement _asyncOpen as a RPC call for the RN debugger
kneth Jan 23, 2019
93d83a1
Handle _createUserAgentDescription not being present in the RPC envir…
tgoyne Feb 12, 2019
6cb7480
Fix RPC (de)serialization of User objects
tgoyne Feb 12, 2019
957d855
Add stubs for the JS-defined functions for when running in the RPC se…
tgoyne Feb 12, 2019
35756c3
Fix a crash when a RPC request was in flight when test state is reset
tgoyne Feb 12, 2019
12c8e72
Fix a crash when an error occurs in a RPC callback
tgoyne Feb 12, 2019
b054e32
Fix a test which crashed on failure
tgoyne Feb 12, 2019
8932694
Add some missing methods to the browser helper
tgoyne Feb 12, 2019
bf1d0e5
Fix the check for if the archive actually needs to be downloaded in d…
tgoyne Feb 13, 2019
7b1415f
Disable a check that doesn't work when running in Chrome
tgoyne Feb 13, 2019
a3aa9d6
Rework the handling of RPC callbacks
tgoyne Feb 13, 2019
7771fda
Run tests before the slow packaging step
tgoyne Feb 16, 2019
85c603e
Regenerate package-lock.json for integration tests
tgoyne Feb 16, 2019
bc50162
Use full sync for ObjectIdTests.testSynced
tgoyne Feb 18, 2019
3d3f894
Fix a race condition in test setup
tgoyne Feb 18, 2019
5aef3dd
Only run Chrome tests when RCT_DEV is defined
tgoyne Feb 18, 2019
e852e1c
Test with both node 8 and node 10 on CI
tgoyne Feb 19, 2019
d9c6578
Improve the PR job concurrency
tgoyne Feb 19, 2019
616807b
Update the react-native example to 0.58
tgoyne Feb 20, 2019
c3a9f79
Remove some old debug code
tgoyne Feb 20, 2019
0d25db5
Update install-local to 1.0.0
tgoyne Feb 20, 2019
729b0d6
Only modify the default nvm alias when running in Jenkins
tgoyne Feb 20, 2019
ac60e61
Only try to shut down simulators on macos
tgoyne Feb 20, 2019
248a9ae
Use Docker images with the correct version of node for the tests
tgoyne Feb 20, 2019
d772c7c
Explicitly use parseInt
tgoyne Feb 21, 2019
0d85430
Fix a ReferenceError in _createUserAgentDescription()
tgoyne Feb 21, 2019
b2f605e
Don't run the package job on aws nodes
tgoyne Feb 22, 2019
0c31fd6
Improve changelog
kneth Feb 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintrc.json
Expand Up @@ -16,5 +16,10 @@
}
],
"strict": [2, "global"]
},
"settings": {
"react": {
"version": "16.6.3"
}
}
}
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -58,6 +58,10 @@ realm-object-server/
tests/react-test-app/ios/out.txt
*.iml
crash.log
tests/react-test-app/ios/Pods/
tests/react-test-app/ios/ReactTests.xcworkspace/
examples/ReactExample/ios/Pods/
examples/ReactExample/ios/ReactExample.xcworkspace/

# Integration tests
integration-tests/**/realm-*.tgz
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.md
Expand Up @@ -2,10 +2,14 @@ x.x.x Release notes (yyyy-MM-dd)
=============================================================
### Enhancements
* Added a `_updateSchema` method on an Realm instance to perform schema manipulation. Specifically creating an object schema and a property on an existing object schema. (partly solving [#2216](https://github.com/realm/realm-js/issues/2216))
* Add support for react-native 0.58 ([#2239](https://github.com/realm/realm-js/issues/2239)).

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-js/issues/????), since v?.?.?)
* None.
* Fixed an assertion failure after creating an object with a null int primary key in a synchronized Realm. ([#3227](https://github.com/realm/realm-core/pull/3227))
* When debugging with React Native, calling `Realm.open()` would crash since `Realm._asyncOpen()` was not available in the debugger. ([#2234](https://github.com/realm/realm-js/pull/2234), since v2.20.0)
* Added several missing functions to the Chrome debugging support library. ([#2242](https://github.com/realm/realm-js/pull/2242)).
tgoyne marked this conversation as resolved.
Show resolved Hide resolved
* Fixed incorrect results when reading data from Realm from within a callback function when debugging in Chrome. ([#2242](https://github.com/realm/realm-js/pull/2242)).
* Report the correct user agent to the sync server rather than always "RealmJS/Unknown". ([#2242](https://github.com/realm/realm-js/pull/2242), since v2.23.0).

### Compatibility
* Realm Object Server: 3.11.0 or later.
Expand All @@ -27,6 +31,7 @@ x.x.x Release notes (yyyy-MM-dd)
* Realm initialized the filesystem when being imported instead of waiting for the first Realm to be opened. ([#2218] (https://github.com/realm/realm-js/issues/2218), since v2.22.0)
* Sync sessions for Realms which were closed while the session was paused would sometimes not be cleaned up correctly. ([realm/realm-object-store#766](https://github.com/realm/realm-object-store/pull/766), since v2.16.0)
* Querying Realm instances obtained from `Realm.Sync.Adapter` would sometimes pin the read transaction version, resulting in the file rapidly growing in size as further transactions were processed. ([realm/realm-object-store#766](https://github.com/realm/realm-object-store/pull/766), since v2.0.2)
* Realm initialized the filesystem when being imported instead of waiting for the first Realm to be opened. ([#2218] (https://github.com/realm/realm-js/issues/2218), since v2.22.0).

### Compatibility
* Realm Object Server: 3.11.0 or later.
Expand All @@ -36,7 +41,7 @@ x.x.x Release notes (yyyy-MM-dd)
### Internal
* Upgraded to Object Store commit: 0f2f8347cb32afddef1753a018f70f65972a4679
* Upgraded to Realm Core v5.13.0.
tgoyne marked this conversation as resolved.
Show resolved Hide resolved
* Upgraded to Realm Sync v3.14.14.
* Upgraded to Realm Sync v3.15.0.
* Stopped including headers from developers JDK when building the Android native module. ([#2223](https://github.com/realm/realm-js/pull/2223))

2.22.0 Release notes (2019-1-10)
Expand Down
77 changes: 42 additions & 35 deletions Jenkinsfile
Expand Up @@ -65,46 +65,21 @@ stage('check') {
}
}

// Create the Realm JS npm package
stage('package') {
node('docker') {
// Unstash the files in the repository
unstash 'source'
// Remove any archive from the workspace, which might have been produced by previous runs of the job
sh 'rm -f realm-*.tgz'
// TODO: Consider moving the node on the other side of the stages
docker.build(
'ci/realm-js:android-build',
'-f Dockerfile.android .'
).inside {
// Install dependencies
sh 'npm install'
// Publish the Android module
sh 'cd react-native/android && ./gradlew publishAndroid'
// Package up the app
sh 'npm pack'
// Archive and stash the package
archiveArtifacts 'realm-*.tgz'
stash includes: 'realm-*.tgz', name: 'package'
}
}
}

stage('test (and build)') {
stage('package and test') {
parallel(
eslint: doDockerBuild('eslint-ci', {
eslint: doDockerBuild('eslint-ci', 10, {
step([$class: 'CheckStylePublisher', canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: 'eslint.xml', unHealthy: ''])
}),
jsdoc: doDockerBuild('jsdoc', {
jsdoc: doDockerBuild('jsdoc', 10, {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'docs/output', reportFiles: 'index.html', reportName: 'Docs'])
}),
linux_node_debug: doDockerBuild('node Debug'),
linux_node_release: doDockerBuild('node Release'),
linux_node_8_debug: doDockerBuild('node Debug v8.15.0', 8),
linux_node_8_release: doDockerBuild('node Release v8.15.0', 8),
linux_node_10_debug: doDockerBuild('node Debug v10.15.1', 10),
linux_node_10_release: doDockerBuild('node Release v10.15.1', 10),
linux_test_runners: doDockerBuild('test-runners'),
macos_node_debug: doMacBuild('node Debug'),
macos_node_release: doMacBuild('node Release'),
//macos_realmjs_debug: doMacBuild('realmjs Debug'),
//macos_realmjs_release: doMacBuild('realmjs Release'),
macos_react_tests_debug: doMacBuild('react-tests Debug'),
macos_react_tests_release: doMacBuild('react-tests Release'),
macos_react_example_debug: doMacBuild('react-example Debug'),
Expand All @@ -113,7 +88,12 @@ stage('test (and build)') {
// junit 'tests/react-test-app/tests.xml'
//}),
windows_node: doWindowsBuild(),
package: packageNpmArchive(),
)
}

stage('integration tests') {
parallel(
// Integration tests:
// The tests above should be removed once we manage to move them to the new test harness in ./integration-tests
'React Native on Android': ReactNativeTests.onAndroid(),
Expand Down Expand Up @@ -220,7 +200,7 @@ def doAndroidBuild(target, postStep = null) {
}
}

def doDockerBuild(target, postStep = null) {
def doDockerBuild(target, nodeVersion = 10, postStep = null) {
return {
node('docker && !aws') {
deleteDir()
Expand All @@ -230,7 +210,7 @@ def doDockerBuild(target, postStep = null) {
reportStatus(target, 'PENDING', 'Build has started')

// We use the bitnami/node image since it comes with GCC 6.3
docker.image('bitnami/node:6').inside('-e HOME=/tmp') {
docker.image("bitnami/node:${nodeVersion}").inside('-e HOME=/tmp') {
sh "scripts/test.sh ${target}"
if(postStep) {
postStep.call()
Expand All @@ -249,7 +229,8 @@ def doDockerBuild(target, postStep = null) {
def doMacBuild(target, postStep = null) {
return {
node('osx_vegas') {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-9.4.app/Contents/Developer']) {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-9.4.app/Contents/Developer',
'REALM_SET_NVM_ALIAS=1']) {
doInside("./scripts/test.sh", target, postStep)
}
}
Expand All @@ -273,3 +254,29 @@ def doWindowsBuild() {
}
}
}

def packageNpmArchive() {
return {
node('docker && !aws') {
// Unstash the files in the repository
unstash 'source'
// Remove any archive from the workspace, which might have been produced by previous runs of the job
sh 'rm -f realm-*.tgz'
// TODO: Consider moving the node on the other side of the stages
docker.build(
'ci/realm-js:android-build',
'-f Dockerfile.android .'
).inside {
// Install dependencies
sh 'npm install'
// Publish the Android module
sh 'cd react-native/android && ./gradlew publishAndroid'
// Package up the app
sh 'npm pack'
// Archive and stash the package
archiveArtifacts 'realm-*.tgz'
stash includes: 'realm-*.tgz', name: 'package'
}
}
}
}
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -33,7 +33,6 @@ The API reference is located at [realm.io/docs/javascript/latest/api/](https://r
In case you don't want to use the precompiled version on npm, you can build Realm yourself from source. You’ll need an Internet connection the first time you build in order to download the core library.

Prerequisites:
- npm < 5.0 (due to symlinks not working)
- Xcode 7.2+
- Android SDK 23+
- [Android NDK 10e](https://developer.android.com/ndk/downloads/older_releases)
Expand Down
6 changes: 3 additions & 3 deletions dependencies.list
@@ -1,5 +1,5 @@
PACKAGE_NAME=realm-js
VERSION=2.23.0
REALM_CORE_VERSION=5.13.0
REALM_SYNC_VERSION=3.14.14
REALM_OBJECT_SERVER_VERSION=3.11.1
REALM_CORE_VERSION=5.14.0
REALM_SYNC_VERSION=3.15.0
REALM_OBJECT_SERVER_VERSION=3.17.1
2 changes: 2 additions & 0 deletions docs/collection.js
Expand Up @@ -16,6 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

/* eslint getter-return: "off" */

/**
* Abstract base class containing methods shared by {@link Realm.List} and {@link Realm.Results}.
*
Expand Down
22 changes: 12 additions & 10 deletions docs/permission.js
Expand Up @@ -16,6 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

/* eslint getter-return: "off" */

/**
* Objects of this class allow to change permissions of owned Realms.
* They are created exclusively by the client and are processed by the server
Expand All @@ -31,7 +33,7 @@
* @memberof Realm.Sync.User
*/
class PermissionChange {

/**
* Gets the unique identifier of this object in the Management realm.
* @type {string}
Expand All @@ -40,18 +42,18 @@ class PermissionChange {

/**
* Gets the creation time of this object.
* @type {Date}
* @type {Date}
*/
get createdAt() {}

/**
* Gets when the object was updated the last time.
* @type {Date}
* @type {Date}
*/
get updatedAt() {}

/**
*
*
*/
get statusCode() {}

Expand Down Expand Up @@ -116,18 +118,18 @@ class PermissionOffer {

/**
* Gets the creation time of this object.
* @type {Date}
* @type {Date}
*/
get createdAt() {}

/**
* Gets when the object was updated the last time.
* @type {Date}
* @type {Date}
*/
get updatedAt() {}

/**
*
*
*/
get statusCode() {}

Expand Down Expand Up @@ -197,18 +199,18 @@ class PermissionOfferResponse {

/**
* Gets the creation time of this object.
* @type {Date}
* @type {Date}
*/
get createdAt() {}

/**
* Gets when the object was updated the last time.
* @type {Date}
* @type {Date}
*/
get updatedAt() {}

/**
*
*
*/
get statusCode() {}

Expand Down
2 changes: 2 additions & 0 deletions docs/realm.js
Expand Up @@ -16,6 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

/* eslint getter-return: "off" */

/**
* A Realm instance represents a Realm database.
*
Expand Down