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

RESOLVED FIXED

Status

Add-on SDK
General
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: zalun, Assigned: warner)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
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: ''
(Assignee)

Comment 1

8 years ago
Good point.. that text should definitely be going to stderr. I'll take this one.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Updated

8 years ago
Assignee: nobody → warner-bugzilla
(Assignee)

Comment 2

8 years ago
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.
(Assignee)

Comment 3

8 years ago
Created attachment 448786 [details] [diff] [review]
send preflight messages to stderr, not stdout

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)

Comment 4

8 years ago
(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 5

8 years ago
Comment on attachment 448786 [details] [diff] [review]
send preflight messages to stderr, not stdout

Looks good!
Attachment #448786 - Flags: review?(avarma) → review+
(Assignee)

Comment 6

8 years ago
Applied, in http://hg.mozilla.org/labs/jetpack-sdk/rev/e76fa0d4b554

I didn't do the everything-in-__init__.py-to-stderr part yet.
(Assignee)

Comment 7

8 years ago
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
Last Resolved: 8 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.