Skip to content
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

bot going beserk, reacting multiple times to same event #274

Open
boegel opened this issue Jul 4, 2024 · 7 comments
Open

bot going beserk, reacting multiple times to same event #274

boegel opened this issue Jul 4, 2024 · 7 comments

Comments

@boegel
Copy link
Contributor

boegel commented Jul 4, 2024

Recently (on 3 July 2024), the bot I had running on Deucalion was reacting multiple times to the same event, resulting in a series of identical comments, see for example EESSI/software-layer#630 (comment).

@Neves-P mentioned that he saw a similar problem with a test instance of the bot he was playing with, in a totally different context (at RUG), so it seems like a general problem, not specific to the setup I did on Deucalion (which had been working fine for days already before this happened).

To me, it seems that smee.io is actually the culprit here, and that it was echo'ing events coming from GitHub multiple times to the smee channel used by the bot.
That would also explain why the production bots running in AWS & Azure were not affected, because they're using a custom smee instance (smee.nessi.no).

We should:

  • try to figure out exactly what happened;
  • see if we can somehow make the bot robust against this, for example by letting it refuse to re-process an event that has already been processed (but that means keeping some state, I guess keeping the last 100 event IDs would be sufficient in practice);
@boegel
Copy link
Contributor Author

boegel commented Jul 4, 2024

It actually happened a first time on 2 July 2024 (~10:32 UTC), see the reactions to EESSI/software-layer#630 (comment) .
There, my bot on Deucalion reacted 7 times to the same event (@laraPPr's comment).

On July 3rd 2024 (~10:12 UTC), it happened again in reaction to EESSI/software-layer#630 (comment), but the bot was replying dozens of times to the same event (I count 48 in total).

I killed my bot instance shortly after to prevent it from causing more trouble.

@Neves-P
Copy link
Member

Neves-P commented Jul 4, 2024

I encountered the same issue (or something very similar) on July 3rd 2024 (~07:47 UTC) on a local instance of the bot on the HPC system at RUG: Neves-Bot/software-layer#40 (comment)

Here, the bot was stuck on a build command and started a bunch of jobs, most of which failed (checksums failed most likely due to stressed I/O).

Abridged `event_handler.sh` log
[20240703-T09:47:23] [start]: EESSI bot for software layer started! [20240703-T09:47:23] [start]: app is listening on port 3000 [20240703-T09:47:23] [start]: logging in to /home1/f115372/bot/eessi_bot_event_handler.log [20240703-T09:47:37] [handle_issue_comment_event]: Comment in https://api.github.com/repos/Neves-Bot/software-layer/issues/40 (owned by @Neves-P) created by @Neves-P [20240703-T09:47:37] [handle_issue_comment_event]: Comment in https://api.github.com/repos/Neves-Bot/software-layer/issues/40 (owned by @Neves-P) created by @Neves-P [20240703-T09:47:37] [handle_issue_comment_event]: comment action 'created' is handled [20240703-T09:47:37] [handle_issue_comment_event]: comment action 'created' is handled [20240703-T09:47:37] [handle_issue_comment_event]: Comment in https://api.github.com/repos/Neves-Bot/software-layer/issues/40 (owned by @Neves-P) created by @Neves-P [20240703-T09:47:37] [handle_issue_comment_event]: Comment in https://api.github.com/repos/Neves-Bot/software-layer/issues/40 (owned by @Neves-P) created by @Neves-P [20240703-T09:47:37] [handle_issue_comment_event]: comment action 'created' is handled [20240703-T09:47:37] [handle_issue_comment_event]: comment action 'created' is handled [20240703-T09:47:37] [handle_issue_comment_event]: account `Neves-P` has permission to send commands to bot [20240703-T09:47:37] [handle_issue_comment_event]: account `Neves-P` has permission to send commands to bot [20240703-T09:47:37] [handle_issue_comment_event]: account `Neves-P` has permission to send commands to bot [20240703-T09:47:37] [handle_issue_comment_event]: account `Neves-P` has permission to send commands to bot [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/intel/icelake' [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/intel/icelake' [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/intel/icelake' [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/intel/icelake' [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/amd/zen3' [20240703-T09:47:37] [handle_issue_comment_event]: comment response: ' - received bot command `build repo:hpc.rug.nl arch:x86_64/intel/icelake` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/intel/icelake` - received bot command `build repo:hpc.rug.nl arch:x86_64/amd/zen3` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/amd/zen3`' [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/amd/zen3' [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/amd/zen3' [20240703-T09:47:37] [handle_issue_comment_event]: comment response: ' - received bot command `build repo:hpc.rug.nl arch:x86_64/intel/icelake` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/intel/icelake` - received bot command `build repo:hpc.rug.nl arch:x86_64/amd/zen3` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/amd/zen3`' [20240703-T09:47:37] [handle_issue_comment_event]: comment response: ' - received bot command `build repo:hpc.rug.nl arch:x86_64/intel/icelake` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/intel/icelake` - received bot command `build repo:hpc.rug.nl arch:x86_64/amd/zen3` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/amd/zen3`' [20240703-T09:47:37] [handle_issue_comment_event]: found bot command: 'build repo:hpc.rug.nl arch:x86_64/amd/zen3' [20240703-T09:47:37] [handle_issue_comment_event]: comment response: ' - received bot command `build repo:hpc.rug.nl arch:x86_64/intel/icelake` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/intel/icelake` - received bot command `build repo:hpc.rug.nl arch:x86_64/amd/zen3` from `Neves-P` - expanded format: `build repository:hpc.rug.nl architecture:x86_64/amd/zen3`' [20240703-T09:47:39] [handle_bot_command]: Handling bot command build [20240703-T09:47:39] [handle_bot_command_build]: repository: 'Neves-Bot/software-layer' [20240703-T09:47:39] [handle_bot_command]: Handling bot command build [20240703-T09:47:39] [handle_bot_command_build]: repository: 'Neves-Bot/software-layer' [20240703-T09:47:39] [handle_bot_command]: Handling bot command build [20240703-T09:47:39] [handle_bot_command_build]: repository: 'Neves-Bot/software-layer' [20240703-T09:47:39] [handle_bot_command]: Handling bot command build [20240703-T09:47:39] [handle_bot_command_build]: repository: 'Neves-Bot/software-layer' [20240703-T09:47:44] [handle_issue_comment_event]: handling command 'build repository:hpc.rug.nl architecture:x86_64/intel/icelake' resulted in ' - submitted job `11142535`, for details & status see https://github.com/Neves-Bot/software-layer/pull/40#issuecomment-2205322614'

Will edit this comment with mode details ASAP

Edit: correction, this started earlier, with only one repetition at Neves-Bot/software-layer#40 (comment) On the pyghee.log from this comment on I start to see the same event id repeat, which did not happen before.

For reference, a day earlier on a previous PR, I commented with the same command Neves-Bot/software-layer#38 (comment) which resulted in in pyghee.log:

[20240702-T10:32:29] Event received (id: 9dff3480-384d-11ef-9868-b10d4cb43b4b, type: issue_comment, action: created), event data logged at /home1/f115372/bot/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T08-32-29_9dff3480-384d-11ef-9868-b10d4cb43b4b
[20240702-T10:32:29] Request verified: signature OK!
[20240702-T10:32:29] [event id 9dff3480-384d-11ef-9868-b10d4cb43b4b] Handler found for event type 'issue_comment' (action: created)

The event id 9dff3480-384d-11ef-9868-b10d4cb43b4b does not show up in the log again after these two references, which is the expected behaviour. On the PR a day later when the bot repeats itself, I see the type: issue_comment, action: created event id corresponding to my build comment appear multiple times:

[20240703-T09:40:31] Event received (id: 863a11e0-390f-11ef-896c-dff593bc5b54, type: issue_comment, action: created), event data logged at /home1/f115372/bot/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T07-40-31_863a11e0-390f-11ef-896c-dff593bc5b54
[20240703-T09:40:31] Request verified: signature OK!
[20240703-T09:40:31] Event received (id: 863a11e0-390f-11ef-896c-dff593bc5b54, type: issue_comment, action: created), event data logged at /home1/f115372/bot/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T07-40-31_863a11e0-390f-11ef-896c-dff593bc5b54
[...]

This goes on for a few lines. I've checked the event .json that is read and it seems normal to me. This confirms that the event_handler was receiving the same event multiple times. It doesn't conclusively prove that smee.io was the issue, but it is still the most likely cause in my opinion.... 🤔

@boegel
Copy link
Contributor Author

boegel commented Jul 4, 2024

From pyghee.log, I can see that the event on 2 July was indeed received 7 times:

$ grep 620dfd60-385e-11ef-8e5b-0e61e1cf93aa pyghee.log
[20240702-T11:32:30] Event received (id: 620dfd60-385e-11ef-8e5b-0e61e1cf93aa, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T10-32-30_620dfd60-385e-11ef-8e5b-0e61e1cf93aa
[20240702-T11:32:30] Event received (id: 620dfd60-385e-11ef-8e5b-0e61e1cf93aa, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T10-32-30_620dfd60-385e-11ef-8e5b-0e61e1cf93aa
[20240702-T11:32:30] [event id 620dfd60-385e-11ef-8e5b-0e61e1cf93aa] Handler found for event type 'issue_comment' (action: created)
[20240702-T11:32:30] Event received (id: 620dfd60-385e-11ef-8e5b-0e61e1cf93aa, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T10-32-30_620dfd60-385e-11ef-8e5b-0e61e1cf93aa
[20240702-T11:32:30] Event received (id: 620dfd60-385e-11ef-8e5b-0e61e1cf93aa, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T10-32-30_620dfd60-385e-11ef-8e5b-0e61e1cf93aa
[20240702-T11:32:30] [event id 620dfd60-385e-11ef-8e5b-0e61e1cf93aa] Handler found for event type 'issue_comment' (action: created)
[20240702-T11:32:30] [event id 620dfd60-385e-11ef-8e5b-0e61e1cf93aa] Handler found for event type 'issue_comment' (action: created)
[20240702-T11:32:30] [event id 620dfd60-385e-11ef-8e5b-0e61e1cf93aa] Handler found for event type 'issue_comment' (action: created)
[20240702-T11:32:32] Event received (id: 620dfd60-385e-11ef-8e5b-0e61e1cf93aa, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T10-32-30_620dfd60-385e-11ef-8e5b-0e61e1cf93aa
[20240702-T11:32:32] [event id 620dfd60-385e-11ef-8e5b-0e61e1cf93aa] Handler found for event type 'issue_comment' (action: created)
[20240702-T11:32:32] Event received (id: 620dfd60-385e-11ef-8e5b-0e61e1cf93aa, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T10-32-30_620dfd60-385e-11ef-8e5b-0e61e1cf93aa
[20240702-T11:32:32] [event id 620dfd60-385e-11ef-8e5b-0e61e1cf93aa] Handler found for event type 'issue_comment' (action: created)
[20240702-T11:32:32] Event received (id: 620dfd60-385e-11ef-8e5b-0e61e1cf93aa, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-02/2024-07-02T10-32-30_620dfd60-385e-11ef-8e5b-0e61e1cf93aa
[20240702-T11:32:32] [event id 620dfd60-385e-11ef-8e5b-0e61e1cf93aa] Handler found for event type 'issue_comment' (action: created)

Likewise, the event that corresponds to the comment on 3 July was received multiple times:

[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:14] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f

The good news is that we should be able to make the bot robust against "echoes" of events relatively easily: it should just keep track of the N last events it received, and refuse to react multiple times to the same event?

This should probably be fixed in PyGHee rather than in the EESSI bot implementation though; see PyGHee.process_event in https://github.com/boegel/PyGHee/blob/main/pyghee/lib.py.

I'm not sure how easy it is to implement though, since those echo events seem to be coming in all at the same time, and incoming events are not processed serially, see also partial log below

[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Request verified: signature OK!
[20240703-T10:12:13] [event id 553970b0-391c-11ef-8d4f-eecde4b8278f] Handler found for event type 'issue_comment' (action: created)
[20240703-T10:12:13] get_bot_command(): searching for bot command in 'To me, the main issue is that some installations break because the installation path as we have it now is too long.^M'
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] get_bot_command(): searching for bot command in '^M'
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Event received (id: 553970b0-391c-11ef-8d4f-eecde4b8278f, type: issue_comment, action: created), event data logged at /home/kehoste/EESSI/eessi-bot-software-layer/events_log/issue_comment/created/2024-07-03/2024-07-03T09-12-13_553970b0-391c-11ef-8d4f-eecde4b8278f
[20240703-T10:12:13] Request verified: signature OK!
[20240703-T10:12:13] get_bot_command(): searching for bot command in 'Retaining some level of readability for humans as opposed to using slightly shorter but cryptic paths is important imho, it's going to save lots of brain cycles going forward.^M'
[20240703-T10:12:13] Request verified: signature OK!
[20240703-T10:12:13] Request verified: signature OK!
[20240703-T10:12:13] [event id 553970b0-391c-11ef-8d4f-eecde4b8278f] Handler found for event type 'issue_comment' (action: created)
[20240703-T10:12:13] get_bot_command(): searching for bot command in '^M'
[20240703-T10:12:13] [event id 553970b0-391c-11ef-8d4f-eecde4b8278f] Handler found for event type 'issue_comment' (action: created)
[20240703-T10:12:13] [event id 553970b0-391c-11ef-8d4f-eecde4b8278f] Handler found for event type 'issue_comment' (action: created)

@boegel
Copy link
Contributor Author

boegel commented Jul 4, 2024

@Neves-P I think the changes in boegel/PyGHee#7 will do the trick...

If that looks good to you, we can merge it, and test it in our own bot deployments before updating to PyGHee 0.0.4 in the production bots we have running for EESSI (which are currently unaffected because they're not using smee.io.

The latter is know to be far from perfect, so we may need to figure out another solution there anyway, see also probot/smee.io#137

@boegel
Copy link
Contributor Author

boegel commented Jul 4, 2024

I've resumed by bot on Deucalion, it's running on top of the changes in boegel/PyGHee#7, to test...

@Neves-P
Copy link
Member

Neves-P commented Jul 5, 2024

Looks cool! I'll try it out on Hábrók too

@Neves-P
Copy link
Member

Neves-P commented Jul 5, 2024

Resumed bot on Hábrók with PyGHee installed from boegel/PyGHee#7 and so far so good: Neves-Bot/software-layer#42.

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

No branches or pull requests

2 participants