-
Bug
-
Resolution: Fixed
-
Minor
-
None
Problem statement
Consider plugins A and B.
A has an optional dependency to B.
B exposes an extension point called B.
A contains an @Extension(optional=true) or an @OptionalExtension(requiresPlugins = "B") (when using the variant plugin)
and has public class A extends B.
- Set up a new Jenkins instance
- Install plugin A
- Install plugin B
- Check groovy console ExtensionList.lookup(B.class)
- An empty list is returned. Expected to see class A singleton.
After restarting the Jenkins instance, class A singleton is listed properly.
Prior/related work
JENKINS-19976fixed classloading in this kind of situation- JENKINS-19508 is proposing to eliminate this use case altogether
- JENKINS-49026 is a consequence of this problem
- relates to
-
JENKINS-49026 Plugins are not installed in right order in case of optional dependency
-
- Open
-
-
JENKINS-19508 Replace @Extension(optional=true) and optional dependencies with bridge plugins
-
- Open
-
-
JENKINS-19976 Cannot load a class in depended plugin after install before restart
-
- Resolved
-
-
JENKINS-14392 Optional Extensions should be reloaded when dependencies are dynamically loaded
-
- Open
-
- links to
[JENKINS-50336] Optional extensions are not picked up after installing the optional dependency
Description |
Original:
h1. Problem statement Consider plugin A and B. A has an optional dependency to B. B exposes an extension point called B A contains an {{@Extension(optional=true)}} or an {{@OptionalExtension(requiresPlugins = "B")}} (when using the [variant plugin|https://github.com/jenkinsci/variant-plugin]) and has {{public class A extends B}}. * Set up a new Jenkins instance * Install plugin A * Install plugin B * Check groovy console ExtensionList.lookup(B.class) * An empty list is returned. Expected to see class A singleton. After restarting the Jenkins instance, class A singleton is listed properly. h1. Prior/related work * * JENKINS-19508 is proposing to eliminate this use case altogether * JENKINS-49026 is a consequence of this problem |
New:
h1. Problem statement Consider plugin A and B. A has an optional dependency to B. B exposes an extension point called B. A contains an {{@Extension(optional=true)}} or an {{@OptionalExtension(requiresPlugins = "B")}} (when using the [variant plugin|https://github.com/jenkinsci/variant-plugin]) and has {{public class A extends B}}. * Set up a new Jenkins instance * Install plugin A * Install plugin B * Check groovy console ExtensionList.lookup(B.class) * An empty list is returned. Expected to see class A singleton. After restarting the Jenkins instance, class A singleton is listed properly. h1. Prior/related work * * JENKINS-19508 is proposing to eliminate this use case altogether * JENKINS-49026 is a consequence of this problem |
Description |
Original:
h1. Problem statement Consider plugin A and B. A has an optional dependency to B. B exposes an extension point called B. A contains an {{@Extension(optional=true)}} or an {{@OptionalExtension(requiresPlugins = "B")}} (when using the [variant plugin|https://github.com/jenkinsci/variant-plugin]) and has {{public class A extends B}}. * Set up a new Jenkins instance * Install plugin A * Install plugin B * Check groovy console ExtensionList.lookup(B.class) * An empty list is returned. Expected to see class A singleton. After restarting the Jenkins instance, class A singleton is listed properly. h1. Prior/related work * * JENKINS-19508 is proposing to eliminate this use case altogether * JENKINS-49026 is a consequence of this problem |
New:
h1. Problem statement Consider plugins *A* and *B*. *A* has an optional dependency to *B*. *B* exposes an extension point called B. *A* contains an {{@Extension(optional=true)}} or an {{@OptionalExtension(requiresPlugins = "B")}} (when using the [variant plugin|https://github.com/jenkinsci/variant-plugin]) and has {{public class A extends B}}. * Set up a new Jenkins instance * Install plugin *A* * Install plugin *B* * Check groovy console {{ExtensionList.lookup(B.class)}} * An empty list is returned. Expected to see class *A* singleton. After restarting the Jenkins instance, class *A* singleton is listed properly. h1. Prior/related work * * JENKINS-19508 is proposing to eliminate this use case altogether * JENKINS-49026 is a consequence of this problem |
Link | New: This issue relates to JENKINS-19508 [ JENKINS-19508 ] |
Link |
New:
This issue relates to |
Link | New: This issue relates to JENKINS-49026 [ JENKINS-49026 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Assignee | New: Vincent Latombe [ vlatombe ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "Core PR #3370 (Web Link)" [ 20320 ] |
Remote Link | New: This issue links to "CloudBees Internal TIGER-4517 (Web Link)" [ 20556 ] |