Closed Bug 569582 Opened 14 years ago Closed 14 years ago

If build fails because of the non existing private key, no stderror is provided

Categories

(Add-on SDK Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zalun, Assigned: warner)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2
Build Identifier: 

xpi was not build - stderr should be printed.
Problem is that FlighDeck thinks the XPI has been created as no error raised.

Reproducible: Always

Steps to Reproduce:
I do it under FlightDeck, but
1. Create addon
2. Create keypair
3. Remove key from filesystem
4. Build XPI
Actual Results:  
stdout:
Welcome to the Jetpack SDK. Run 'cfx docs' for assistance.
Your package.json says our ID is:
  jid0-kjUotYunSDhhjz7iG9VeuquYp0Y
But I don't have a corresponding private key in:
  /home/zalun/.jetpack/keys/jid0-kjUotYunSDhhjz7iG9VeuquYp0Y
stderr: ''
Good point.. that text should definitely be going to stderr. I'll take this one.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee: nobody → warner-bugzilla
Although.. FlightDeck should be checking the exit code of the "cfx xpi" process (nonzero means error, as usual), rather than depending upon the presence or absence of stderr. I just double-checked: 'cfx xpi' with an unknown ID causes rc=1.
Here's a patch to send preflight no-key/unknown-key message to stderr instead of stdout. I left the last message ("package.json modified/needs-modification, please re-run") going to stdout, since all of the other messages in __init__.py go there too.

It might be better if everything in __init__.py went to stderr, especially the stuff that's printed just before a sys.exit(1), but I'll let Atul make that call.
Attachment #448786 - Flags: review?(avarma)
(In reply to comment #3)
> It might be better if everything in __init__.py went to stderr, especially the
> stuff that's printed just before a sys.exit(1), but I'll let Atul make that
> call.

Makes sense to me, sorry I didn't do that originally.
Comment on attachment 448786 [details] [diff] [review]
send preflight messages to stderr, not stdout

Looks good!
Attachment #448786 - Flags: review?(avarma) → review+
Applied, in http://hg.mozilla.org/labs/jetpack-sdk/rev/e76fa0d4b554

I didn't do the everything-in-__init__.py-to-stderr part yet.
http://hg.mozilla.org/labs/jetpack-sdk/rev/16fbfb85d46f finishes it. All 'print' calls that preceed a sys.exit(1) return now go to sys.stderr. The non-error prints continue to got to stdout.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: