Commit Graph

5015 Commits

Author SHA1 Message Date
David Glasser
d8ff20103d version bumps (pre rc10)
We'll make rc10 tomorrow, but I want to build a release just to play
with built releases again.
2014-08-18 20:48:43 -07:00
David Glasser
9054effdeb Fix ServiceConnection DDP negotiation
Now ServiceConnection's guarantee is that once a DDP connection is
successfully negotiated, it won't restart. This relies on the assumption
that the only use of reconnect({_force: true}) is DDP protocol
negotiation!

Drop some unnecessary (and flawed, for this application) `disconnect`
stream events.

Also, remove some unnecessary `new` calls.

Fixes 'meteor mongo some-galaxy app'.
2014-08-18 17:09:04 -07:00
David Glasser
3b3e8d7b93 Simplify ServiceConnection.
- ServiceConnection should never try to reconnect. It's already the case
  that we don't hold open ServiceConnections over long periods while
  idle; it makes the class much simpler if it corresponds to a single
  TCP connection. This also means that as soon as we have one connection
  failure (eg you're offline) we can fail instantly instead of retrying
  pointlessly.

- Drop the explicit timeout code in ServiceConnection. There's already
  timeout handling in stream_client, and now that we don't retry, it
  actually takes effect.

- Be more rigorous about uses of Future in ServiceConnection. Ensure
  that each Future is only used once (ie, avoid "Future resolved more
  than once" errors).  Hopefully fixes #2390.

- ServiceConnection constructor now blocks until it's connected (and
  throws if there's a connection failure).  Maybe this introduces a tiny
  bit more latency to the connection, but it makes it much easier to
  handle errors properly.

- In packageClient.handlePackageServerConnectionError, show the error
  message corresponding to the connection failure.

- In Node, the (newish) error passed to the Stream callback is now a
  "DDP.ConnectionError" object. We can detect this in the tool (and we
  don't even need to do some complex uniload/instanceof dance, since
  error classes made with Meteor.makeErrorType label themselves with a
  string errorType).  We also no longer have a special
  ServiceConnection.ConnectionTimeoutError.
2014-08-17 21:34:57 -07:00
David Glasser
87b3748ec5 node ddp client: send errors to disconnect event
this includes the timeout one
2014-08-17 20:30:34 -07:00
David Glasser
b4039173a6 Status shouldn't be "waiting" unless we will retry 2014-08-17 20:19:57 -07:00
David Glasser
2115eed79a Revert "include a backtrace for "got open from inactive""
This reverts commit 4378d9f5d0.

The previous commit switches to a version of Faye which fixes the bug
that causes this error to be thrown.
2014-08-17 20:16:54 -07:00
David Glasser
6aae5086e5 Switch to a fork of faye fixing close-before-start
This should stop all the "Got open from inactive client" errors.
2014-08-17 20:15:32 -07:00
David Greenspan
e897539adb Work-around for Safari JIT bug 2014-08-16 20:39:24 -07:00
David Greenspan
b5715a9621 Stop trying to fetch an MP4 file in tests
We test event capturing using the <video> “play” event, because it is a non-bubbling event native to modern browsers.  We previously had the src URL be a video on the Internet, but even if the video could not be accessed, the test still seemed to work.

So now set the “src” to “”.  Seems to work in IE 9, Firefox, Safari, Chrome.
2014-08-16 11:21:45 -07:00
David Greenspan
7981f17af1 Make “same input.value” test work in IE 8 2014-08-16 11:04:43 -07:00
David Greenspan
0c9d5337aa Improve test driver progress bar CSS
Keep the label from moving with the progress bar in Firefox
2014-08-16 11:04:43 -07:00
David Glasser
56f96cc6df First try locking all previousSolution versions.
This is how some of us thought previousSolution already worked.
2014-08-15 22:42:09 -07:00
David Glasser
f39a820d96 Don't parse '@>=' ranges by default
They are still used internally by the constraint solver (to implement
update --breaking) but cannot be externally specified.

Also, stop supporting "@none", whatever that was.
2014-08-15 22:12:04 -07:00
David Glasser
e06c091652 Fix constraint solver tests 2014-08-15 21:46:13 -07:00
David Glasser
66ea15a9f3 Fix c.upsert with no callback from the client
Fixes #2413.
2014-08-15 17:53:07 -07:00
David Greenspan
7e44526ab9 Test for Avi’s fix to input elements (c2cf671)
Needs IE 8 version of test
2014-08-15 17:12:46 -07:00
Matthew Arbesfeld
67aee54c6a Remove the refreshable fields from autoupdate docs because they are no longer used 2014-08-15 16:30:56 -07:00
Matthew Arbesfeld
da08cc421e Fix autoupdate to ship autoupdateVersion to the client 2014-08-15 15:59:14 -07:00
David Glasser
bc6239dfc1 vbump for rc9
Hopefully we won't have to do "bump for all the npm modules" again after
this
2014-08-15 12:34:47 -07:00
Avital Oliver
c2cf67179f Blaze: Don't update input elements if their value doesn't need updating
This resolves #2403. Specifically, if you implement some form of
two-way databinding, and you modify an input field in some way
other than adding characters to the end, the insertion point
jumps to the end.

Still need to write a test for this.
2014-08-15 11:50:31 -07:00
ekatek
328ecb4d98 a lot of minor fixes that manifested as weird CS behavior 2014-08-15 14:27:22 -04:00
David Glasser
401cee2ef6 Lazily load constraint-solver instead of its mori
This should be a performance win (no need to load constraint-solver
unless you actually need to use it!), and it's what I wanted to do
initially instead of lazily loading mori, but it wasn't feasible with
the old super-recursive catalog.

This fixes an issue where running 'curmeteor rebuild' twice (!) died the
second time with a "Can't load npm module 'mori'" error. This is because
uniload (when run from a checkout) sets up Npm.require to read directly
from PACKAGE/.build.PACKAGE/npm/node_modules, which might get deleted
later in the process!  There are some complex and maybe slow ways to
resolve this general issue (copy the node_modules somewhere else?) but
for now, the easiest way to avoid the issue is just to load Npm modules
immediately inside packages which need to be uniloaded.
2014-08-14 16:12:05 -07:00
David Glasser
a9db15a9e6 vbump for 0.9.0-rc8 2014-08-14 12:02:08 -07:00
David Glasser
2a598ef56c vbump rc7 2014-08-13 18:15:47 -07:00
David Glasser
2755f95bb6 Move uniload package list to uniload.js
Actually verify that uniloaded packages are in the list. Add missing
'ejson'. Remove (ah well) test that relies on ability to uniload an app
package (which shouldn't work anyway, but it would be nice to test
uniload Assets...)
2014-08-13 18:11:46 -07:00
Matthew Arbesfeld
c9476a350f Fix typo in autoupdate and bump autoupdate package version. 2014-08-13 17:36:12 -07:00
David Glasser
adb3a65b96 version bumps for 0.9.0-rc6 2014-08-12 16:27:51 -07:00
David Glasser
4378d9f5d0 include a backtrace for "got open from inactive" 2014-08-12 16:24:57 -07:00
David Glasser
0822033ca5 Tell resolver about ECVs of overridden versions
Otherwise trying to use a package with constraint "livedata@1.0.0" when
you are loading livedata 1.0.1 from a local package will fail.
2014-08-12 15:56:24 -07:00
Matthew Arbesfeld
c6aa178f22 Fix typo in Autoupdate.newClientAvailable 2014-08-10 17:35:56 -07:00
Matthew Arbesfeld
1f6f15dc20 Fix autoupdate in cases where Autoupdate.autoupdateVersion is set.
If Autoupdate.autoupdateVersion is set outside of the Autoupdate
package, we wouldn't notify the client of the new version. This
patch simplifies the updating logic by only having one document
per version type.
2014-08-10 17:27:22 -07:00
David Glasser
f4eefa1f04 vbump rc5 2014-08-08 00:06:55 -07:00
David Glasser
2d5c481e49 Upgrade less from 1.7.1 to 1.7.4. Fixes #2346 2014-08-07 14:36:50 -07:00
David Glasser
5675d3e29a Merge branch 'packaging' into devel 2014-08-07 14:29:53 -07:00
David Greenspan
d2b0cb73df Merge pull request #2358 from mquandalle/edit-comment
Edit `TemplateTag` comments to mention BLOCKCOMMENT
2014-08-07 13:43:28 -07:00
Matthew Arbesfeld
4d288bd39b Fix the case where the autoupdateVersion and autoupdateVersionRefreshable
strings are identical in the autoupdate package.

If the server set AUTOUPDATE_VERSION, this case was alsways triggered.
2014-08-06 17:36:12 -07:00
David Glasser
67de025b6f bump 0.9.0-rc4 2014-08-06 16:03:35 -07:00
David Glasser
88fb0bbf2c vbump for real 2014-08-06 14:23:27 -07:00
David Glasser
54c33aeaae bump for 0.9.0-rc3 2014-08-06 14:07:16 -07:00
David Glasser
92323ad569 vbump, 0.9.0-rc2 2014-08-06 11:30:37 -07:00
David Glasser
97ec098cb6 more version bumps 2014-08-05 20:11:40 -07:00
David Glasser
a785fc835e bump version numbers again 2014-08-05 19:43:37 -07:00
David Glasser
563860c769 Version number bumps, this time for real 2014-08-05 19:03:16 -07:00
David Glasser
3d75f53149 Client sync queue: better logic around setTimeout
In the old code, if you queued a task, did something which flushes the
queue (runTask, flush, or drain), and then queued another task, you'd
end up with two pending timeouts, rather than zero. With this change,
we're careful to never have two pending timeouts, and also to clear the
timeout if we're about to run all current tasks.
2014-08-05 14:50:21 -07:00
David Glasser
845286b925 Merge branch 'devel' into packaging 2014-08-05 13:13:27 -07:00
David Glasser
835eb66377 a tiny bit more info to help debug an error 2014-08-05 12:56:07 -07:00
David Glasser
ddc3657e4f Watch files which fail before emitting a resource
Regression introduced by the CSS watching code (specifically, f230eba62)
by the sourceIsWatched check. We need to be able to tell the difference
between "source handler didn't do anything because there was an error"
and "source handler didn't do anything because it's web-specific and
this is an os arch".

A simple fix would have been to interpret compileStep.error as
"sourceIsWatched = true", but I didn't think of that until after doing
it the slightly more complicated but more precise way :)

Also, ensure that if the runner rebuilds the client and there's an
error, it properly kills the app process (and the watchers and the
keepalive interval, etc).
2014-08-04 21:32:22 -07:00
David Greenspan
5ff8117310 Update comments after looking into e7250a0
It seems that when ObserveSequence observed a Cursor, it used to stop() the observe when the main autorun was invalidated, creating a “gap” during which no callbacks would be received (or fired).  This was before we used Deps.nonreactive in the main autorun (shielding the cursor.observe from being stopped).  Now the observe is only stopped upon re-run or when the ObserveSequence is stopped, and there is no gap.

Removed references to this gap from comments.

I believe the current code is correct, and in addition, we could now optimize the cursor-to-same-cursor case (and basically not do anything if seq===lastSeq and is a Cursor, i.e. not stop the old handle, create a new handle, or diff).
2014-08-04 19:06:15 -07:00
MaximDubrovin
6345d92f07 move phantom_script.js setInterval into page.open callback
Until I made this I always got only ```<head/>``` with it's content, ```<body>``` was empty.

It seems setInterval script was finished earlier then url content was loaded to the page. Maybe because I have subscriptions with response time lower then 100ms so they were ready very quickly — database server in the same data center.

http://phantomjs.org/api/webpage/method/open.html
2014-08-01 16:44:04 -07:00
Avital Oliver
e7250a045f Eliminate _fetch on handles returned from cursor.observe()
This was originally introduced with
f1b77fec96, but it looks
like all of our tests now pass. (Maybe eliminating `rewind` in
b5a0613f85 made this no
longer necessary?)

If we find that this commit did break something, let's make sure to
add a failing test before reverting.
2014-08-01 15:01:26 -07:00