Enabling a plugin A that has a component-import dependency on another plugin B fails if plugin B is disabled

Description

Steps:

1.- Start JIRA locally in your dev environment.
2.- Go to Administration-> Plugins.
3.- Make sure that "JIRA Development Only - Reference Dependent Plugin" and "JIRA Development Only - Reference Plugin" are disabled.
4.- Try to enable the "JIRA Development Only - Reference Dependent Plugin".
5.- [BUG] You will see the following error message on the plugins page "This plugin failed to enable. Please refer to the logs for more information." See screenshot.

From the stack trace in the logs it seems to be trying enable the plugins recursively but it's failing for some reason. This could possibly be a bug in the plugins framework itself.

Another question is, what is actually the desired behaviour from UPM in this case?.

A.- Do not try to enable the plugin and notify the user that must update [list of plugins] in order to be able to enable this specific plugin.
B.- Try to enable the plugins on which this plugin depends on recursively, after confirming with the user that he really wants this to happen.
C.- Simply try to enable the plugins on which this plugin depends on recursively.

From the code, it seems to be that we are trying to do option C. In my mind, solution B is more correct although it would require more work to be done.

Log Output:

Let's ONLY fix option C. If we are going to add confirmations etc this maybe longer.

See https://jdog.atlassian.com/browse/JRADEV-4175

Environment

None

Testing Notes

None

Security Policy

None

Status

Assignee

Robin Fernandes

Reporter

Andreas Knecht

Labels

Team

None

QA Dev

None

Needs Doc

None

Peer Reviewer

None

Mgr Approver

None

CC

None

Product

None

App Key

None

DC app ready for review?

None

Priority

Major
Configure