-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Refactor connector opsdroid pointer #749
Conversation
Codecov Report
@@ Coverage Diff @@
## master #749 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 28 28
Lines 1856 1850 -6
=====================================
- Hits 1856 1850 -6
Continue to review full report at Codecov.
|
I've created a PR in your fork with the changes that I tried to push 👍 |
@FabioRosado I'm sorry I didn't see that before, last week was pretty busy with work and the holiday. Do I still need to merge that PR, or is there anything else I need to do now? |
Hello @zonagilreath my apologies for not replying yesterday. Yeah that PR still needs to be merged into your opsdroid fork - for what tox told me everything should pass once that PR is merged and I'm sure this one will be updated as soon as you merge my PR into yours then we can see if we can get this merged without any issues 😄 👍 |
Update opsdroid pointer
Okay, done. But there's a conflict on the listen method of each of the connectors, and in a few of the tests and I'm not sure how they should be resolved. |
Yeah this week we changed a few things related to the logging and connectors, I have fixed the conflicts for you 😄 👍 |
Great, hope everything is resolved now |
Hmmm this is odd everything is broken now but my tox was showing green o.O |
Yeah, it looks like one issue is that the connector.listen() is still getting a None argument, which I thought I had fixed. Should I get that fixed? |
I didn't have time to check exactly what was wrong here but if you have the time that would be great 👍 |
I'm about to test the rest, but there's one error I don't understand:
|
That Usually we either call opsdroid with |
Oh okay. I was wrong earlier about having fixed the arguments for listen() in all the tests. I hadn't changed the signature of listen() in the first place, I think that came in when I merged your PR. |
Now everything is passing but this:
|
Yeah I changed the listen method since opsdroid was being passed as an argument for the class, I thought I had changed all the listen texts since tox didn't complain on my end but I'm not sure now |
Yeah that's weird that they weren't caught by the tests before. Got them fixed now, but I don't understand what's supposed to be happening with the above test well enough to debug. I'll go ahead and push what I have, but if you see what needs to be fixed I'm happy to do it. |
Just to let you know that I'm off today and I plan to spend some time with this PR to see why that test is now failing, will let you know if I can fix or offer any sort of solution for it 👍 |
@jacobtomlinson perhaps you could give us a hand here, I am trying to figure out why the Should web_app be mocked in order to get this test passing or is there another way to do this? |
I would check the Facebook connector tests to see what we did there, as they are both adding routes to the web server. Otherwise I'll try and take a look soon. |
I got it, I think. |
Still failing on docker commands, but everything else is working now. |
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.
Thanks for working on this. I have noticed that you commited files within .vs
folder, I am going to assume that we don't really need these and should be removed?
_LOGGER.debug("Starting Websocket connector") | ||
self.name = "websocket" | ||
self.config = config | ||
self.opsdroid = None |
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.
Do you know this is the reason why we are getting the NoneType
issue within docker?
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.
I bet that wherever ConnectorWebsocket
is being initialized it's not being given the opsdroid argument that it needs now, so it's defaulting to None.
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.
I think I found it in core
I checked docker when you changed the core. It only showed an issue with the listen method perhaps because we need to update the code further down? Also the only reason why the other tests were failing was due the tests in core not being updated with that change 👍 |
Ah, I thought it was |
…atch original refactoring
Woo! |
This is an amazing work! Congratulations 🎉 I am going to merge this now! We also give stickers to contributors so if you would like them DM your home address to opsdroid twitter account and Jacob will send them to you 👍 |
Description
Slight update to previous request
Fixes #725
Status
READY
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Tox tests passing
Checklist: