fix: circular dependencies error when there are none#1505
fix: circular dependencies error when there are none#1505sijis merged 8 commits intoerrbotio:masterfrom
Conversation
|
I really appreciate you putting this together. Could you elaborate what you mean by
Maybe its late but I'm missing but both scenarios looks similar if not identical to me. |
|
I agree, the 2 cases should be equivalent, but one passes the test I wrote while the other doesn't. Since the only difference is with the names I assumed that it's playing a role into the problem. I guess the plugin discovery system order plugins somehow related to their names. If the name ordering matches the dependency ordering, they can start, otherwise they can't. |
c81c78e to
36920ef
Compare
| assert ( | ||
| "Error: Broken failed to activate: " | ||
| "'NoneType' object has no attribute 'is_activated'" | ||
| ) in testbot.pop_message() |
There was a problem hiding this comment.
This new error happens because this line returns None:
Which cause an attribute error down here:
Open to suggestions on how to fix it better.
|
Hi @browniebroke any idea when this fix will be merged? |
|
No idea, no, it's not really up to me at this point. I think the next step would be for a maintainer to assess whether they are happy with my code of if they have any suggestions. This is probably not the only thing on their plate, though... In the meantime, if you want to help, I'm sure they would appreciate if you could try my version out and see if it maybe has a bug in it. You can install from source with pip:
You can put the part after |
36920ef to
2de920e
Compare
2de920e to
c9a6eb5
Compare
|
@browniebroke @tmcevoy14 Would you folks be able to see if this issue persist with the latest changes on |
3e7c4cb to
9b1486f
Compare
9b1486f to
6982692
Compare
6982692 to
404631a
Compare
Add a new test case reproducing the problem reported in errbotio#1397
61b32d6 to
228c737
Compare
* test: reproduce bug with wrong circular dependencies Add a new test case reproducing the problem reported in #1397 * chore: fix typos in comment and docstring * fix: activate plugins in deterministic order * test: update test case with latest changes * fix: set while at True * test: re-enable circular testing * fix: pin version * docs: add info to CHANGES Co-authored-by: Sijis Aviles <sijis.aviles+github@gmail.com>
I have the same issue as the one reported in #1397. I'm not sure I can fix it, but I thought it would be helpful to at least write a test reproducing the issue.
Fix #1397
Implementation note
I initially had:
chained1depends onchained2,chained3chained2depends onchained3chained3depends on nothingBut this worked fine, there was no problem. It looks like the problem depends on the plugin names, I can reproduce with:
chained3depends onchained2andchained1chained2depends onchained1chained1depends on nothingChecklist