Strange issue with double dependency detection / writing package.json twice #55

Marak opened this Issue Jul 1, 2011 · 10 comments


None yet
5 participants

Marak commented Jul 1, 2011

It appears that the package.json write is sometimes triggered twice when deploying apps.

To reproduce:

  1. clone marak's hellonode application
  2. (you may have to deploy once before deleting the package.json)
  3. delete the package.json
  4. jitsu deploy
  5. read screen output ( package is written twice )

@ghost ghost assigned bmeck Jul 1, 2011


bmeck commented Jul 5, 2011

Can you get a screen dump of this, from what I'm seeing it is bumping the version number if it was already deployed to an unused one and only doing it once if it has not been deployed (or if it has been destroyed).


bmeck commented Jul 7, 2011

So the issue is that it is being written twice, but it is writing 2 different package.json files.

  1. Before asking the server if this is a deployable snapshot.
  2. After finding it is not and bumping the version number.

The problem with not writing twice is that if we don't write through on the first one and there is a connection error you will be prompted to save after an error (odd UX). If we don't prompt on the second we might end up w/ some UX issues from people saying it is not writing what it prompted it would. We could make version bumping not prompt the user and instead just write?

Also, adding a message about the version number being bumped a bit more explicitly.


indexzero commented Jul 7, 2011

This is an order-of-operations problem in the jitsu deploy command:

Ideally the workflow should be:

  2. If no package.json, prompt for app name and then attempt jitsu.apps.view
  3. If application exists, write truncated results to disk and increment version number
  4. If no application exists (i.e. on 404 error), continue with the rest of jitsu.package.get.
  5. Otherwise, error out of the CLI because something bad has happened (i.e. 500)

Marak commented Jul 11, 2011

@bmeck - Will you be able to resolve this issue?


bmeck commented Jul 11, 2011

yes i can, but indexzero put it at a low priority so I stalled

On Mon, Jul 11, 2011 at 4:26 PM, Marak

@bmeck - Will you be able to resolve this issue?

Reply to this email directly or view it on GitHub:
#55 (comment)

bmeck added a commit that referenced this issue Aug 9, 2011

[fix] #55 package.write after filling out package.json was forcing a …
…2nd analyze. Since no deps can be added during filling, don't do that.

AvianFlu commented Aug 10, 2011

It looks like I'm still seeing this issue in Jitsu v0.4.0.


jfhbrook commented Nov 16, 2011

I don't believe this is still an issue. Closing.

@jfhbrook jfhbrook closed this Nov 16, 2011

@indexzero indexzero reopened this Nov 17, 2011


indexzero commented Nov 17, 2011

I've seen this issue recently. I will give you a repro this weekend.

@indexzero indexzero closed this Nov 17, 2011

@indexzero indexzero reopened this Nov 17, 2011


Marak commented Mar 21, 2012

Am not about to reproduce / haven't seen this. Closing unless someone can post reproducible steps.

@Marak Marak closed this Mar 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment