Replace thrown errors in SessionCollectionView.changed and .removed with early returns and explanatory comments to tolerate high-concurrency races where the cache is updated synchronously but callbacks are processed asynchronously.
Add missing EJSON import to observe_multiplex.ts so EJSON usage (cloning/argument handling) is available.
Ensure ObserveMultiplexer updates its LocalCollection cache synchronously before scheduling async notifications to handlers to avoid races (e.g. an update arriving before the insert is recorded). Remove the manual cache set in ChangeStreamObserveDriver._handleUpdate since the multiplexer now guarantees synchronous cache updates.
- mongo_connection.js: ensure a polling driver fallback and log a debug message when no driverClass is returned from _selectReactivityDriver.
- tests/changestream_observe_driver_tests.js: complete rewrite and modernization of tests:
- Replace old server/admin version checks with a simple driver-detection helper.
- Convert tests to async, add helpers (makeCollection, waitFor, getPromiseAndResolver).
- Remove brittle isMaster/version logic and server-only gating.
- Add/clarify numerous tests covering detection, CRUD, projections, selectors, multiple observers, fence sync, pending writes, ordering, error recovery, stop/cleanup, matcher edge cases, and internal driver behaviors.
- Improve assertions and stability (timeouts, waits) and simplify teardown.
- Introduce availableDrivers and DEFAULT_REACTIVITY_ORDER (uses 'polling').
- Validate Meteor.settings.packages.mongo.reactivity if provided.
- Add _getConfiguredReactivityOrder to normalize/validate configured order.
- Extract _selectReactivityDriver to centralize async availability checks and selection.
- Simplify driverChecks and remove duplicated selection logic in _observeChanges.
- Use this consistently (instead of self) and fix multiplexer onStop closure.
- Ensure observe driver receives correct mongoHandle and store multiplexers on this.
- Add JSDoc for compareOperationTimes in mongo_common.js.
- Add clear warning that forbidClientAccountCreation must be set on both client and server
- Include practical example showing shared config file approach
- Fixes issue where UI still shows 'Create account' link when only set on server
Fixes#13922
Co-authored-by: Italo José <italo.i@live.com>
Pass the stored document directly to the observeChanges `removed` callback
instead of creating a synthetic `{_id: id}` fallback. Also stop coercing
the id to a string when awaiting `query.removed` in `_removeFromResultsAsync`
so the original id type is preserved.
Update ChangeStreamObserveDriver to write the new document into the multiplexer
cache when emitting a 'changed' event so the cache remains in sync with change
stream updates. Also remove a 100ms test sleep from observe_changes_tests (was
used to wait for cache updates) since change streams now update faster.
- Remove MongoConnection._checkChangeStreamSupport and inline the server capability
checks into the changeStreams driver availability probe.
- Lazily compute and cache self._supportsChangeStreams and
self._changeStreamServerReasons so the server check is only run once and
readable reasons are preserved.
- Return early with a clear unavailable reason when change streams aren't
supported or when ordered/_testOnlyPollCallback constraints apply.
- Improve handling of selector matcher errors by returning an unavailable reason
instead of pushing to a shared reasons array.
- Update tests to use the new cached support fields instead of calling the
removed helper.
- Remove storing and runtime check of options.ordered in ChangeStreamObserveDriver (no longer enforce ordered observeChanges).
- Revert DEFAULT_REACTIVITY_ORDER to ['oplog','changeStreams','pooling'] so oplog remains the default unless overridden by METEOR_REACTIVITY_ORDER.
- Replace legacy testingOplog flag with IS_OPLOG (derived from METEOR_REACTIVITY_ORDER) and gate oplog tests accordingly across tests (mongo_livedata_tests, oplog_tests).
- Small test comment/todo in observe_changes_tests to note changeStream vs oplog timing.
- Add travis.yml CI config file.
Use direct Map.get(id) to retrieve cached docs (avoid optional-chaining call)
and add a short Meteor._sleepForMs(100) in the unordered basics test to allow
the changeStream-driven multiplexer cache to settle and prevent timing races.
- Add workflow name/ENV and set METEOR_REACTIVITY_ORDER in .github/workflows/test-packages.yml
- LocalCollection: pass native id to query.removed (remove String coercion)
- Update app docs example BackgroundColor to use 0x-prefixed value
- Trim stray trailing whitespace/blank lines and remove extra space in ddp-rate-limiter test
* Add travis-compat GitHub Actions workflow to run Travis parity tests
- Add .github/workflows/travis-compat.yml
- Trigger on push to ci/removing-travis
- Runs on ubuntu-22.04 with Node 22.17 and C++ toolchain g++-12
- Restores caches (.npm, .meteor, .babel-cache, dev_bundle, chromium), installs system/npm deps and runs packages/test-in-console/run.sh
* Install Puppeteer in test-packages workflow, add jquery to test-in-console, and export METEOR_NO_DEPRECATION earlier in run.sh
* Detect writable group dynamically in webapp socket tests and skip when none found
Add getGroupNameForGid and getWritableGroupName helpers to resolve a writable
group from /etc/group, the current user's gid/groups, or fallbacks (TRAVIS/staff/root).
Use the resolved group for UNIX_SOCKET_GROUP in socket_file_tests and skip the
group-specific test when no writable group can be determined.
* Update app.md
Fix example value for a preference
* Rename workflow job, remove Puppeteer install, add TINYTEST_FILTER, and add email debug logs
- Rename GitHub Actions job travis-compat -> test-packages
- Add TINYTEST_FILTER="email" to test-packages workflow env
- Remove global Puppeteer install step and drop "Travis parity" label from run step
- Add console.log debug output in Email.sendAsync to show MAIL_URL env, settings, and Meteor.isProduction before the production check
* Remove console.log debug output and include MAIL_URL, settings, and production flag in missing-mail error message
* Unquote TINYTEST_FILTER value and add NODE_ENV: CI to test-packages workflow
* Remove MAIL_URL, settings and production flag from missing-mail error message
Previously the thrown error included the MAIL_URL environment value, package
settings JSON, and Meteor.isProduction flag. That could leak sensitive
configuration into logs. Replace it with the original concise guidance and
link to the docs.
* Remove TINYTEST_FILTER from test-packages workflow
* Disable ambiguous error messages in password tests (#14027)
Set Accounts._options.ambiguousErrorMessages = false in password_tests.js
so tests receive specific, deterministic error reasons instead of ambiguous
messages.
---------
Co-authored-by: imongithubnow <76787178+imongithubnow@users.noreply.github.com>
Co-authored-by: Nacho Codoñer <igcogi@gmail.com>