Revert "Add mongo-dev-server package (#8853)"

This reverts commit 4d37a05fb3.

After git bisecting between origin/release-1.5 and origin/release-1.5.2, I
identified this commit as the culprit in recent failures of the modules
test app: https://circleci.com/gh/meteor/meteor/4857#tests/containers/3

Note that the modules test app seems to be failing only on Linux, and it
does pass reliably with this commit reverted. It must have something to do
with Mongo failing to start, and thus the "App running at" message never
appears, but I don't have a good theory why that might be.

The command to run just the modules test app is

  meteor self-test --history 1000 'modules - test app'

@zimme @hwillson @abernix any ideas?
This commit is contained in:
Ben Newman
2017-08-02 21:09:54 -04:00
parent ebcaceb54b
commit 565281e765
6 changed files with 2 additions and 65 deletions

View File

@@ -30,18 +30,6 @@
root of the bundle, but it may be deprecated in a future version of Meteor.
[PR #8956](https://github.com/meteor/meteor/pull/8956)
* A new package called `mongo-dev-server` has been created and wired into
`mongo` as a dependency. As long as this package is included in a Meteor
application (which it is by default since all new Meteor apps have `mongo`
as a dependency), a local development MongoDB server is started alongside
the application. This package was created to provide a way to disable the
local development Mongo server, when `mongo` isn't needed (e.g. when using
Meteor as a build system only). If an application has no dependency on
`mongo`, the `mongo-dev-server` package is not added, which means no local
development Mongo server is started.
[Feature Request #31](https://github.com/meteor/meteor-feature-requests/issues/31)
[PR #8853](https://github.com/meteor/meteor/pull/8853)
* `Accounts.config` no longer mistakenly allows tokens to expire when
the `loginExpirationInDays` option is set to `null`.
[Issue #5121](https://github.com/meteor/meteor/issues/5121)

View File

@@ -1,18 +0,0 @@
# mongo-dev-server
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/mongo-dev-server) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/mongo-dev-server)
***
When the `mongo-dev-server` package is included in a Meteor application, a
local development MongoDB server is started alongside the application. This
package is mostly used internally, as it is included by default with any
application that has a dependency on `mongo` (which is most Meteor
applications). In some cases however, people might be interested in
using the Meteor Tool without having to start a local development Mongo
instance (e.g. when using Meteor as a build system). If an application has no
dependency on `mongo`, the `mongo-dev-server` package will be removed
(since it is a direct dependency of the `mongo` package), and no local
development Mongo server will be started.
Note this is a `debugOnly` package, meaning it will not be included in any
production bundles.

View File

@@ -1,12 +0,0 @@
Package.describe({
debugOnly: true,
documentation: 'README.md',
name: 'mongo-dev-server',
summary: 'Start MongoDB alongside Meteor, in development mode.',
version: '1.0.1-beta152.7',
});
Package.onUse(function (api) {
api.use('modules');
api.mainModule('server.js', 'server');
});

View File

@@ -1,3 +0,0 @@
if (process.env.MONGO_URL === 'no-mongo-server') {
Meteor._debug('Note: Restart Meteor to start the MongoDB server.');
}

View File

@@ -34,8 +34,7 @@ Package.onUse(function (api) {
'diff-sequence',
'mongo-id',
'check',
'ecmascript',
'mongo-dev-server',
'ecmascript'
]);
// Binary Heap data structure is used to optimize oplog observe driver

View File

@@ -71,20 +71,10 @@ class Runner {
onFailure
});
buildmessage.capture(function () {
self.projectContext.resolveConstraints();
});
const packageMap = self.projectContext.packageMap;
const hasMongoDevServerPackage =
packageMap && packageMap.getInfo('mongo-dev-server') != null;
self.mongoRunner = null;
if (mongoUrl) {
oplogUrl = disableOplog ? null : oplogUrl;
} else if (hasMongoDevServerPackage
|| process.env.METEOR_TEST_FAKE_MONGOD_CONTROL_PORT) {
// The mongo-dev-server package is required to start Mongo, but
// tests using fake-mongod are exempted.
} else {
self.mongoRunner = new MongoRunner({
projectLocalDir: self.projectContext.projectLocalDir,
port: mongoPort,
@@ -96,13 +86,6 @@ class Runner {
mongoUrl = self.mongoRunner.mongoUrl();
oplogUrl = disableOplog ? null : self.mongoRunner.oplogUrl();
} else {
// Don't start a mongodb server.
// Set monogUrl to a specific value to prevent MongoDB connections
// and to allow a check for printing a message if `mongo-dev-server`
// is added while the app is running.
// The check and message is printed by the `mongo-dev-server` package.
mongoUrl = 'no-mongo-server';
}
self.updater = new Updater();