Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
sijis
@sijis:matrix.org
[m]

Yes, as part of your build process you can clone the repo and put it in the plugins directory.

You could also setup the server to use a private key/token that accesses your repo too

javabipe
@javabipe
hi
how are you?
sijis
@sijis:matrix.org
[m]
Setuptools does a good enough job in doing dependencies for version. It's not done much at all either,so its a matter of remembering to build those out when cutting a release. It's really easy actually
@javabipe: hello. Welcome
Carlos
@nzlosh
Fair enough. It would be great if we could automate the build process with GitHub actions. It could be triggered to build all the python versions when a commit is tagged with a semver number.
sijis
@sijis:matrix.org
[m]
auto-builds docker images and pushes to latest -> errbotio/errbot#1577
Carlos
@nzlosh
Great work, thanks sijis.
sijis
@sijis:matrix.org
[m]
Cleaning up documentation warnings => errbotio/errbot#1582
Starting to remove built-in slack backend in favor for v3 -> errbotio/errbot#1581
Jothimani
@JothimaniRkrish_twitter
Hello All,
need some help here pls,
  • is there a health check param to monitor BOT's health apart from infra metrics
  • also instead of sentry can I use something else for exception monitoring. Dynatrace, Datadog etc.
sijis
@sijis:matrix.org
[m]

@JothimaniRkrish_twitter: you can create your own webhook for a healthcheck.

For exception handling, not at a core level. You can configure custom/internal plugins to use whatever apm system of your choice.

Jonathan Linenberg
@johnclark84
Hi guys,
I got an error trying to lunch an event from slack. I'm using slack backend v3 with socket mode:
errbot    | 2022-06-29 14:57:08,698 ERROR    slack_sdk.socket_mode.builtin.client Failed to run a request listener: 'event'
errbot    | Traceback (most recent call last):
errbot    |   File "/usr/local/lib/python3.8/site-packages/slack_sdk/socket_mode/client.py", line 143, in run_message_listeners
errbot    |     listener(self, request)  # type: ignore
errbot    |   File "/home/errbot/backends/slackv3/slackv3.py", line 377, in _sm_generic_event_handler
errbot    |     self._generic_wrapper(req.payload)
errbot    |   File "/home/errbot/backends/slackv3/slackv3.py", line 357, in _generic_wrapper
errbot    |     event = event_data["event"]
errbot    | KeyError: 'event'
Carlos
@nzlosh
What event was sent that triggered the error? Do you have an example of it that you can share?
Carlos
@nzlosh
I've responded in the github issue you created.
sijis
@sijis:matrix.org
[m]
I'm curious of exactly what are you trying to accomplish. What is the exact flow/step/process going on? Something like
  • I have bot command .command opt1
  • that's suppose to "do something"
  • its partially working / or getting an error
Jonathan Linenberg
@johnclark84
@nzlosh @sijis:matrix.org my objective is open a slack modal from slack shortcut, so basis in what I read, I need to reply this event with the view.opens payload so Slack can open it. I'm trying to deploy some modals for creating a incident and capture the inputs fields to I can pass them to Jira plugin and create an issue with the data
Matt McLane
@mmclane
Morning everyone.
I have been having issues with getting the poller to start for a couple days. Would anyone be able to help me with it?
Mark Sullivan
@marksull
@mmclane you will have to provide more details before we can offer any advice
Carlos
@nzlosh
@marksull Matt is referring to this issue errbotio/errbot#1586
I've not had time to dig into the details. It looks like there's double initialisation going on. My current guess is something to do with the use of super() but that's all I've got for now.
Mark Sullivan
@marksull
@mmclane you shouldn't be doing the super().activate in your pagerduty_activate() method because activate() would have already been called when the plugin loaded. The only time you would want to do the super().activate() is if you were overriding activate with your own implementation, for example, if you wanted to call your_method every 60 seconds and wanted to start this as soon as the plugin was started.
def activate(self):
         super().activate()
         self.start_poller(60, self.your_method, 1)
Carlos
@nzlosh
Nicely explained! Thanks @marksull :thumbsup:
Matt McLane
@mmclane
Thank you for the answer
Matt McLane
@mmclane
When I remove the statement super().activate(), my activate() function does run but I don't see the results of the scheduled function which leads me to think that the poller isn't running.
Matt McLane
@mmclane
I had tried to remove the super().activate() statement but I didn't see the start_poller() function working so I figured it was needed since it was in the documentation.
I updated my github issue with an example.
sijis
@sijis:matrix.org
[m]

I haven't looked at your example, but I can say the core plugin that checks for latest version uses a poller.

https://github.com/errbotio/errbot/blob/master/errbot/core_plugins/vcheck.py

Matt McLane
@mmclane
Thanks.. I think I am starting to figure out what the problem was. I think it didn't seem like it was running because I was using yield to send messages and instead I need to use send. That wasn't very clear.
Matt McLane
@mmclane
Thanks for the help. You can see my solution here: https://github.com/mmclane/gir/tree/main/plugins/pagerduty
Its not perfect but I think its working.
Matt McLane
@mmclane
So that is working... but now my bot is repeating itself. Its sending two messages every time I send something to slack. It doesn't do that when I test locally, and it wasn't always doing this.
Its duplicating yield messages, send() messages, and cards across any plugin. This includes things like !help.
Matt McLane
@mmclane
Ah.. I think I figured that out.
Matt McLane
@mmclane
I accidentally had two copies of my bot running.. lol
sijis
@sijis:matrix.org
[m]
Ohh. That happens :)
sijis
@sijis:matrix.org
[m]
@nzlosh: I put together a draft on being able to install plugins via pip for errbot. errbotio/errbot#1590
1 reply
I would appreciate feedback/comments and suggestions.
I will include documentation on this in the coming days.
Carlos
@nzlosh
OK, I'll take a look at it now @sijis:matrix.org Installing plugins via pip sounds aweseome!
sijis
@sijis:matrix.org
[m]
Yes. I think so. It should also handle plugin dependencies better too
The hack to read the requirements.txt file works but should be better.
Carlos
@nzlosh
Anything that helps with dependencies has got to be a good thing.
Quick question, why did you opt for pkg_resources over importlib.resources? I'm looking at the docs and came across a passage the talks about importlib.resources being added in py3.7 and how to migrate to it from pkg_resources.
sijis
@sijis:matrix.org
[m]
I was having a hard time trying to get the entrypoints directories where the plug files were located. Pkg_resoucrs make it easier
I don't pretend to understand the importlib module all that much easier. It's a little black magic for me
If there a better way, I'd love to know!
Carlos
@nzlosh
Fair enough. I don't know either module, but wondered if importlib was going to supersede the pkg_resource. I'd not heard of it until reading your PR. :wink: I'm RTFM right now