Closed Bug 542385 Opened 14 years ago Closed 14 years ago

Create a type of add-on that can install/update/uninstall without a restart (bootstrap=true)

Categories

(Toolkit :: Add-ons Manager, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
mozilla1.9.3a5
Tracking Status
blocking2.0 --- beta1+

People

(Reporter: dbuchner, Assigned: mossop)

References

Details

(Keywords: dev-doc-complete, Whiteboard: [rewrite])

Details here.
Whiteboard: [JEP]
After talking to mossop about this, it looks like we can potentially do this with a few tweaks to existing extension manager code:

* Add a new extension type constant, e.g. nsIUpdateItem.TYPE_JETPACK, to http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/public/nsIExtensionManager.idl#556

* In in toolkit/mozapps/extensions/src/nsExtensionManager.js.in modify at least the following functions:
  * getAddonTypeFromInstallManifest()
  * installRequiresRestart()
This is actually a patch that needs to be committed to the extension manager, not to JpSecure; should we move it over there and nominate for blocking 1.9.3?
Moving to Toolkit::Add-ons Manager.  Work here needs to be done in toolkit, not Jetpack, right?
Status: NEW → ASSIGNED
Component: JpSecure → Add-ons Manager
Product: Mozilla Labs → Toolkit
QA Contact: jpsecure → add-ons.manager
Whiteboard: [JEP]
Target Milestone: 0.1 → mozilla1.9.3
Version: 0.1 → Trunk
Nominating for blocking1.9.3 since Jetpack requires this.
blocking2.0: --- → ?
Atul, I can take this off your plate if you haven't already written the patch.
To be clear there are kind of two bugs here. One for implementing this on trunk for 1.9.3 (which is firmly in my court in the EM rewrite) and one for potentially adding the same support to the 3.6/3.5 extension manager. The latter can certainly be taken on by anyone (likely with my assistance). I would suggest first doing a quick scoping exercise to guess at the work required and then getting some kind of agreement from the 3.6/3.5 branch drivers that they would take such a patch before spending the time completing it.
Ah, OK.  Does the first bug you mention already exist?  I assumed it was this one.  (And I presume the second patch can't be written until the first is done.)  I'm writing up the Firefox Q1 project wiki page for Jetpack, which needs to point to a bug for this work.
Let's call this one the trunk version, I've filed bug 544021 for the branch version. There isn't really anything stopping work proceeding on the branch version I think.
Assignee: avarma → dtownsend
Severity: blocker → enhancement
blocking2.0: ? → beta1
Summary: No-restarts ability for Jetpacks on install/update/uninstall → Create a type of add-on that can install/update/uninstall without a restart
Thanks for clarifying that mossop, sorry I didn't mention it earlier.

Drew, if you could do the scoping exercise work for this on 3.6/3.5 it would be incredibly appreciated.  I was thinking we could "cap" the scoping work to 1-2 days of investigation, but whatever works.
Blocks: 543856
Blocks: 548416
Is there some other solution to this in the works?  Seems like I heard someone say that we're going to allow/suggest to people to use parts of the api that don't require a restart, but if they don't, too bad.  If that's the case, is this still something that is required?
This is already implemented on the project branch, waiting on reviews before this will hit trunk.
Blocks: 461973
Depends on: 555349
Whiteboard: [rewrite][fixed-in-addonsmgr]
Blocks: 553169
No longer blocks: 461973
Blocks: 562819
Landed on trunk as a part of bug 553169
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [rewrite][fixed-in-addonsmgr] → [rewrite]
Target Milestone: mozilla1.9.3 → mozilla1.9.3a5
Played around with the examples from Atul (https://secure.toolness.com/xpi/restartless/) and it works fantastic.

Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a5pre) Gecko/20100511 Minefield/3.7a5pre ID:20100511030640

Dave, how does the test coverage look like? What is already covered by automated tests and what should we test with a manual test on Litmus?
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
Flags: in-litmus?
(In reply to comment #13)
> Played around with the examples from Atul
> (https://secure.toolness.com/xpi/restartless/) and it works fantastic.
> 
> Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
> rv:1.9.3a5pre) Gecko/20100511 Minefield/3.7a5pre ID:20100511030640
> 
> Dave, how does the test coverage look like? What is already covered by
> automated tests and what should we test with a manual test on Litmus?

Automated tests are covering installing/uninstalling/enabling/disabling these types of extensions but I think as they are a new feature and the UI around them is potentially different it'd definitely be worth doing the same in litmus tests.
Flags: in-testsuite? → in-testsuite+
Sure. I will add some Litmus tests.
dev-doc-needed; is https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions up to date?

The new flag should also be listed at https://developer.mozilla.org/en/install.rdf

Also linking to bugs about future enhancements of bootstrapped extensions (bug 564675, bug 564667).
Blocks: 564675, 564667
Keywords: dev-doc-needed
Summary: Create a type of add-on that can install/update/uninstall without a restart → Create a type of add-on that can install/update/uninstall without a restart (bootstrap=true)
(In reply to comment #16)
> dev-doc-needed; is
> https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions up to date?

Yes I believe that is still accurate. I'm going to try to find some more time this coming week to work more on updating documentation but if you want to work on it first then I'd be more than grateful for the help!
For the reference, the documentation is at https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions . I updated the wiki.m.o page to point there.
Flags: in-litmus? → in-litmus?(vlad.maniac)
You need to log in before you can comment on or make changes to this bug.