Commit Graph

105 Commits

Author SHA1 Message Date
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
ekatek
98a9b5b31a don't check authorization on the client 2014-08-05 13:10:55 -07:00
ekatek
1976d4f4f1 different error code for server errors 2014-07-31 13:53:40 -07:00
ekatek
a91ff48da5 Allow MDG members to publish unprefixed releases in client 2014-07-30 15:58:12 -07:00
David Glasser
26f9b283a5 Tree hashes of builds now ignore package.json
We were finding that npm was inconsistently including various fields (eg
"readme") in package.json, leading to spurious "must update the version
number" errors in publish-release --from-checkout. This should be good
enough, as any actual package change should also have some other file
changed!
2014-07-30 15:44:12 -07:00
ekatek
0902f7e39a make sure errors go to stderr: cursory pass 2014-07-30 08:07:12 -07:00
David Glasser
43b04a12b2 add some buildmessage.assertInJob to PackageClient 2014-07-29 18:57:59 -07:00
David Glasser
950a3d9c1b Use buildmessage in publish-for-arch
Also, drop a unipkg.saveToPath that we think is redundant (since
5e72f55eb2 changed bundleBuildResult to also call saveToPath)
2014-07-29 18:57:59 -07:00
ekatek
5ff34557a1 calculate versions earlier to be wary of race conditions 2014-07-23 16:36:18 -07:00
Emily Stark
1e83c64183 Add test for 61bf03c (get all pages back from updateServerPackageData) 2014-07-23 12:40:51 -07:00
Emily Stark
61bf03c8d3 Fix updateServerPackageData to return all data, not just the first page 2014-07-23 00:04:04 -07:00
ekatek
01102d2d44 getting rid of githubUrl and replacing it with git
Conflicts:
	tools/package-source.js
2014-07-09 14:32:59 -07:00
ekatek
22c6d152e6 check for emptiness better 2014-07-02 16:47:17 -07:00
ekatek
d7e4a10015 do not write to disk if the server doesn't return anything useful 2014-07-02 16:47:17 -07:00
ekatek
fee935e24a rename versions files and don't write versions files for tests 2014-06-30 15:25:43 -07:00
David Glasser
6bcd277c64 when uploading tarballs, check for errors
and throw something that looks better than [Object Object]
2014-06-26 15:30:25 -07:00
David Glasser
439f7d7231 correct logic 2014-06-26 14:23:41 -07:00
David Glasser
6d4767d471 fix minor bugs 2014-06-26 13:52:26 -07:00
ekatek
8ce251c46e better error handling 2014-06-26 00:38:49 -07:00
ekatek
18e5bd3b6c check for obviously bad architectures 2014-06-25 19:16:56 -07:00
ekatek
b2dd824fc0 pagination support and also override arch to deploy to mother 2014-06-25 15:59:40 -07:00
ekatek
f7defb2c0d don't print null if there is no description for a version and don't let people publish description-less packages 2014-06-24 16:28:32 -07:00
ekatek
459b1a588e replacing repositoryUrl with homepage and adding an optional githubUrl field to version 2014-06-23 17:10:02 -07:00
David Glasser
60cff13f05 typo 2014-06-20 22:49:37 -07:00
David Glasser
2a93777d73 meteor publish --existing-version
It's a variant of publish-for-arch which uses your local source instead
of downloading it.  I expect it to be good for meteor-tool (once we make
that work).

Fix a bug where shrinkwrap files weren't getting included in source
tarballs unless you were in the package directory.
2014-06-20 22:48:00 -07:00
David Glasser
58a4be8094 include tree hash with source bundle too
requires a matching troposphere change (already deployed)
2014-06-20 21:43:28 -07:00
ekatek
8018f38f8b better safety 2014-06-20 15:11:36 -07:00
ekatek
285a3ef8d4 use the actual date object to sync 2014-06-18 22:10:24 -07:00
David Glasser
975a25508d some other stuff that goes together 2014-06-17 17:51:36 -07:00
David Glasser
4f3aa0fc53 initial checkpoint for "buildArchitectures"
this is a string like "browser+os"
2014-06-17 17:48:08 -07:00