question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DependencyResolver lost dependent info after plugin stop

See original GitHub issue

Have two plugins A and B, B depends on A.

Step to reproduce:

  1. Resolve and start A/B
  2. Stop A, A/B will be both STOPPED, which is expected.
  3. Start A.
  4. Start B,
  5. Stop A again, A is STOPPED but B remains STARTED, which expected to be both STOPPED.

Possible cause

in AbstractPluginManager.stopPlugin(plugin, stopDependents) methods, the following line

String dependent = dependents.remove(0);

also change the dependencyResolver, the dependent info is dropped with plugin stopping, unless we resolve everything again.

a reproducible repo should be found here. The pf4j version it’s using is v3.1.0, and same behavior under v3.4.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
decebalscommented, Jan 16, 2021

The fix is available in version 3.6.0 (released today).

0reactions
j-baratacommented, Jan 11, 2021

Hi @hank-cp and @decebals Thank you both for your involvement in this issue resolution. As for me, this issue is resolved (I tested it with locally built pf4j and sbp for the moment, but the plugins activation/deactivation is ok now)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - DependencyResolver lost dependent info after plugin ...
Have two plugins A and B, B depends on A. Step to reproduce: Resolve and start A/B; Stop A, A/B will be both...
Read more >
pf4j/CHANGELOG.md at master - GitHub
Plugin Framework for Java (PF4J). Contribute to pf4j/pf4j ... 3.6.0 - 2021-01-16. Fixed. #394: DependencyResolver lost dependent info after plugin stop ...
Read more >
Lost scope using DependencyResolver in another class ...
I can see several problems with the code above: 1) You are registering IStrategy,MyStrategy with a per WcfOperation lifestyle.
Read more >
Much needed dependency management between jobs
So far as I can tell there is no way to prevent dependent projects from building when their upstreams are broken - via...
Read more >
Announcing Poetry 1.2.0 | Blog
Since there are many changes in Poetry 1.2.0, this post details the ... plugin support and alternative install methods, Poetry lost the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found