Commit Graph

134 Commits

Author SHA1 Message Date
ekatek
f83c08e8fa introduces the 'meteor admin get-machine' command; changes publish not to publish binary builds
This commit does the following:
- Introduces the get-machine command. This command contacts the build farm server
 gets back a machine reservation and then opens    a secure shell to the machine (Alternatively,
 you can ask for a json). This also involved factoring out some   commands to deal with authenticated
 ddp from package-client into a more general auth-client.

- No longer publish binary builds in publish or publish-release; instead give the user a warning
to run get-machine and then publish-for-arch. Someone could ignore this: --existing-version and
publish-for-arch both publish binary builds, but you need to be    at least somewhat familiar with
what you are doing to run them.      Hopefully, you are running them  from a certified build machine,   but
if you are not,    then, well, it    is your    package.

Stuff remaining:
  - We are going to have a url to external documentation, but I haven't written it yet.
  - We are currently talking to   the test-build server, instead of the build server, so mac doesn't
work.
(Neither of those changes require significant tool changes)
2014-10-14 16:49:50 -07:00
David Glasser
cca0112b99 use format 1.1 sync token!
fixes ability to get new styles of data, including
package-depends-on-either-version test
2014-10-08 22:27:38 -07:00
ekatek
43eace5af8 allow publication of debugOnly packages 2014-10-07 15:55:50 -07:00
David Greenspan
eb83087046 Publish versioned dependencies of core packages
When publishing a core package, you’re allowed to omit version numbers in package.js.  With this change, we determine the correct versions of all the dependent packages based on the current checkout, and we send them to troposphere (instead of core packages having “null” constraints on their dependencies).

We throw an error if you have any missing version constraints on your package dependencies and you are not using versionsFrom or publishing a core package from a checkout.

We’ve already fixed this (no constraints on core package deps) retroactively in troposphere.

It speeds up the constraint solver by orders of magnitude when publishing a package.
2014-10-01 17:02:37 -07:00
ekatek
c67de0830a merging from sqllite 2014-09-30 16:29:41 -07:00
Avital Oliver
f65873f315 Don't crash when failing to contact the package server
Fixes #2713
2014-09-30 00:07:18 -07:00
ekatek
f4563457e8 fix the update server package data unit test
Rewrote parts of the update server package data unit test to compare a pre-sync and a
post-sync catalog, rather than the output of package client's attempts to contact the server.
This is because in the new world, there is no accurate output, and instead, the function
modifies the catalog in place. Additionally, removed the old function that read from
data.json, since it was not used anymore, and cleaned up some comments and return values in
package-client. We no longer claim to return the contents of data.json, instead we return
an object that signals if we should reset the entire catalog, and/or if our connection to the
server flat-out failed. I am not sure that this is the best abstraction for this piece of code
(why does package-client modify the catalog, but not reset it, for example? Since resetting
has consequences, in the ideal world, the package-client would only have the logic to get data
from the server and it would be up to the catalog to figure out how to insert it into sql lite,
I think, maybe. Regardless, now is not the time to do that refactoring.)

The test is a little odd in the following ways. First, comparing every record ever published is
something that is already significantly harder than it used to be, and will get only harder from
there. (However, the test claims to check that no data has been erased, so we need to check it).
We check the vague existence of most records, on the theory that it is unlikely that
we only got a portion of the record in, rather than the entire thing. Second, it doesn't check the
actual contents on disk, because I wasn't sure about writing another interface to sqllite this
late in the game. There are some ways to get around this -- we could be sneaky and submit a non-blank
syncToken in some way (faking a previous sync), so we only get the packages touched since (time X).
Usually, that might violate some internal consistency, but we only care about the contents at this stage.
Second, we should probably write some method on the catalogs to compare themselves instead of making
and querying a copy.For now, though, I think that this is sufficiently expedient.

Also, the test publishes 5 packages. That's a lot of packages, so I marked it as slow.
2014-09-29 22:16:32 -07:00
ekatek
8ce15905c2 to check syncing, we now need to create a new 'remoteCatalog' and sync into it 2014-09-29 22:16:31 -07:00
Sashko Stubailo
7e4848d939 Merge branch 'isopack' into release-0.9.4
Conflicts:
	tools/uniload.js
2014-09-29 20:08:02 -07:00
Sashko Stubailo
8bd7a14993 Merge branch 'release-0.9.4' into isopack 2014-09-29 17:57:15 -07:00
David Greenspan
98eff9059e Capitalize buildmessages 2014-09-29 16:18:38 -07:00
Sashko Stubailo
7cd12072ea Rename unipackage to isopack in almost all cases 2014-09-29 16:01:08 -07:00
Justin SB
98d4d3a96c Use builds & versions as the hack for package sync progress 2014-09-29 08:15:15 -07:00
Justin SB
2175da218b Only write sync timestamp after a complete sync 2014-09-29 08:09:37 -07:00
Justin SB
e9a88b00b9 Fix some fibers vs SQLite issues 2014-09-29 07:57:51 -07:00
Justin SB
e50fab39a0 Merge branch 'devel' into sqlite_store
Conflicts:
	tools/catalog.js
	tools/tests/autoupdate.js
2014-09-29 07:08:54 -07:00
Justin SB
35601acd36 Fix typo 2014-09-24 15:53:05 -07:00
Sashko Stubailo
b312c1f6e6 Rename Unipackage to Isopack 2014-09-23 19:19:58 -07:00
Pascal Rapicault
2465991e92 fix pb resuling from merge 2014-09-22 23:56:52 -04:00
Pascal Rapicault
32a0178e88 merge devel 2014-09-22 22:59:15 -04:00
Pascal Rapicault
1d47b57338 don't show can't connect when we can 2014-09-22 13:40:49 -04:00
ekatek
8e9dbe6513 a less obnoxious banner that only comes up once 2014-09-19 19:34:14 -07:00
Justin SB
e5dcef9127 Prettify publish 2014-09-19 17:26:48 -07:00
Justin SB
9963a8bcf3 Progress bars and output formatting 2014-09-19 16:56:25 -07:00
ekatek
e1311c407c function to check if a version constraint is compatible with pre0.9.3 versions, default token to send to syncNewData includes format specifications 2014-09-19 16:56:25 -07:00
Pascal Rapicault
894638cec7 merge devel 2014-09-16 10:20:38 -04:00
ekatek
c246d04db1 cleaning up debug messages 2014-09-14 19:09:15 -07:00
ekatek
856110c4ce when talking to the package server, try to reconnect 2014-09-14 17:02:36 -07:00
Pascal Rapicault
6cc7eee173 hook the remote catalog 2014-09-12 17:07:01 -04:00
Sashko Stubailo
3189a364e9 Rename livedata to ddp, meteor test-packages passes 2014-08-28 12:53:34 -07:00
Emily Stark
38d6525cea Do login prompt when talking to package server with expired credential 2014-08-26 17:04:42 -07:00
David Glasser
24d844a808 consistently handle package server calls
I don't love this idiom but we might as well use it consistently.

This will mean that, eg, errors from the server will not be stack
traces.
2014-08-24 19:51:41 -07:00
David Glasser
1ff2c3bae9 Bundle build before creating time-sensitive URL 2014-08-22 12:41:16 -07:00
David Glasser
5bc415c51a Improve package name/version parsing errors
We now throw more specific errors, consistent between both tools and
package-version-parser (copy-and-pasted code, sadly, but we really do
have to make this check before uniload-from-checkout).
2014-08-21 16:21:12 -07:00
ekatek
b28a84cca2 wrap opennign server connection in a try/catch block from refresh 2014-08-19 18:47:37 -07:00
ekatek
b29a4cc439 more detaled wip on name coming from package.js 2014-08-19 12:32:16 -07:00
David Glasser
69cf01a138 don't leak readstream 2014-08-18 20:11:47 -07:00
David Glasser
196089ae33 package-client: Help users without usernames
- If they're in deferred-registration state, give them their
  registration link and exit.

- Before running the login prompt, mention that it's a Meteor developer
  account which you can sign up for on www.meteor.com.
2014-08-18 19:13:06 -07:00
David Glasser
08a6fa99fd Don't use _.once or instanceof with uniload
_.once has the problem that if you call the once'd function while it is
still in progress (re-entrantly or in another Fiber), it returns
undefined immediately.  That's bad for uniload! uniload already has a
cache, so just use that.  (In the future, perhaps detect an attempt to
uniload something that's currently in the process of being uniloaded in
another fiber and block until the other fiber is ready.)

Using instanceof with things you've uniloaded is a little sketchy: maybe
two different uniload calls will end up with two different copies of
Package.meteor.Meteor.Error, and it seems kind of hairy to ensure you're
not mixing and matching copies.  However, Meteor.Errors are all tagged
with a string errorType, which fills me with much less fear,
uncertainty, and doubt than instanceof.
2014-08-17 23:37:38 -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
b6955a3899 Move towards non-singleton catalog.complete
We're going to make uniload use a different flavor of "complete" catalog
soon.  So we need to reduce the number of singleton-ish references to
it.

Also, we need one PackageCache per catalog, so stop it from being a
singleton too.
2014-08-13 18:11:46 -07:00
David Glasser
52230a8d79 fix 'update server package data unit test'
various things were not talking to the test server / storage file
2014-08-06 19:56:48 -07:00
David Glasser
f8234543bd fix publish-release crash 2014-08-05 19:00:55 -07:00
David Glasser
332215ae7d wipe all packages (from this server) on resetData
note that we should NOT wipe the symlinked tool if we're running from a
release, but we haven't done that yet
2014-08-05 17:59:38 -07:00
David Glasser
2aa9fe6600 include a data.json in the bootstrap tarball
this will allow us to react to resetData by deleting packages, without
having that be everybody's first experience
2014-08-05 17:32:33 -07:00
David Glasser
d88a96fe87 don't write buildinfo.json in tropohouse
(it was basically empty anyway)

also, simpler implementation of not writing buildinfo.json in published
builds
2014-08-05 17:32:33 -07:00
David Glasser
504b281793 Reset data.json when server tells us to 2014-08-05 16:57:36 -07:00
David Glasser
59e5b031f8 use just one connection in updateServerPackageData 2014-08-05 15:49:46 -07:00
ekatek
82323fcfa9 do not close the connection 2014-08-05 13:10:56 -07:00
ekatek
64ddf8a979 fixing the amIAuthorized issues 2014-08-05 13:10:56 -07:00