Skip to content

[WIP] Revert "Removal of XMPP support due to instability"#743

Closed
amotl wants to merge 12 commits intomasterfrom
collab/bring-back-xmpp
Closed

[WIP] Revert "Removal of XMPP support due to instability"#743
amotl wants to merge 12 commits intomasterfrom
collab/bring-back-xmpp

Conversation

@amotl
Copy link
Collaborator

@amotl amotl commented Nov 3, 2022

Just some hacking. This reverts commit df15de1.

@caronc
Copy link
Owner

caronc commented Nov 3, 2022

Please don't spend too much time on this. I'm not really keen on reinstating slixxmpp. I don't want your efforts to be in vain. Or would you be experimenting with xmpppy after you restore this old shell?

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (0df6f08) compared to base (b64e1b7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##            master      #743    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          113       115     +2     
  Lines        14548     14712   +164     
  Branches      2964      2794   -170     
==========================================
+ Hits         14548     14712   +164     
Impacted Files Coverage Δ
apprise/py3compat/asyncio.py 100.00% <ø> (ø)
apprise/Apprise.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyEmail.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyXMPP/SliXmppAdapter.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyXMPP/__init__.py 100.00% <100.00%> (ø)
apprise/plugins/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@amotl
Copy link
Collaborator Author

amotl commented Nov 4, 2022

The test cases now work properly on my machine. Both when run on macOS (Python 3.10.8), or when run via Docker.

pytest test/test_plugin_xmpp.py
docker-compose run --rm test.py310 pytest test/test_plugin_xmpp.py

However, the outcome of the tests on CI is really weird.

It fails constantly on both Linux and macOS. Even more weird is that it apparently actually works on Windows? Do you have any clue, Chris?

Please don't spend too much time on this.

Is it this what you are warning me about?

amotl added 11 commits November 5, 2022 00:15
When addressing multiple recipients, use the same session to the SMTP
server as designated with the Apprise URL. In this way, subsequent full
roundtrips will be saved.

As many SMTP servers are employing connection rate limiting, as well as
connection accept delays, this will considerably improve both robustness
and performance.
@amotl amotl force-pushed the collab/bring-back-xmpp branch from 5720616 to 0df6f08 Compare November 4, 2022 23:15
@caronc
Copy link
Owner

caronc commented Nov 5, 2022

It's many things. If you try to connect to a host that isn't resolvable, it hangs indefinitely. There are just many, many issues. I applaud your efforts to reinstate this code, but unless we swap the backend for something else, your efforts were in vain.

@caronc
Copy link
Owner

caronc commented Nov 5, 2022

See #511 (comment) for some of the insight on the errors, but they were summarized more on the PR you're basing this one off of where i pulled everything out. The fix you pointed out did not seem (at the time) to solve the problem as providing an invalid host still caused an indefinite hang.

the other problem was that it very much takes over the async main loop and closes it at the end of it's call. This would bust apprise. I think Slixmpp is a great piece of development, but it's a full solution to XMPP where Apprise just needs to be able to connect, send a notification an disconnect. 90% of the supported xep features and code that goes with it pretty much becomes overhead. I pulled it out with the intention of just building the basic support later on.

I want to avoid adding dependencies in the requirements.txt as much as i can. Most imported libraries (Twitter, Amazon, Google, and may others i've been able to avoid) turn out to be just simple extractions. I feel XMPP should fall in this same category (but i could be wrong and will be the first to admit it if i am) :).

Chris

@amotl
Copy link
Collaborator Author

amotl commented Nov 5, 2022

I think Slixmpp is a great piece of development, but it's a full solution to XMPP where Apprise just needs to be able to connect, send a notification an disconnect.

I agree.

I want to avoid adding dependencies in the requirements.txt as much as i can.

I see your point. Still, if a library implements a protocol well, where a significant portion of getting it right is obliged to the client side, we should not rule out using corresponding libraries. This is in contrast to services "just" providing a HTTP API.

I feel XMPP should fall in this same category (but i could be wrong and will be the first to admit it if i am).

In the case of XMPP (and maybe others), I am not completely sure.

Let's close this PR, to avoid lingering. I may try an implementation based on xmpppy the other day, if you agree.

@Neustradamus
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants