-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: circular dependencies error when there are none #1505
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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:
chained1
depends onchained2
,chained3
chained2
depends onchained3
chained3
depends on nothingBut this worked fine, there was no problem. It looks like the problem depends on the plugin names, I can reproduce with:
chained3
depends onchained2
andchained1
chained2
depends onchained1
chained1
depends on nothingChecklist