linear-b / gitstream

/:\ gitStream - Workflow automation for your git repo. Use YAML to auto-assign reviewers, auto-merge PRs, automatic PR labeler, and more.
https://gitstream.cm
Apache License 2.0
267 stars 32 forks source link

Automation rules are triggered multiple times in a single run #447

Closed raunakkathuria closed 9 months ago

raunakkathuria commented 9 months ago

Describe the bug The gitStream rule is adding multiple comments for the same rule in a single run

image

To Reproduce

Steps to reproduce the behavior:

  1. The .cm automation file is https://github.com/deriv-com/test-gitstream/blob/master/.cm/gitstream.cm

    Repo folder structure

image

  1. PR: https://github.com/deriv-com/test-gitstream/pull/2
  2. Just testing it to evaluate gitStream for our organization

Expected behavior

It should have commented once during a single run but every time it executes the rule and comments twice at the same time, expected it to comment only once

Screenshots

GitHub actions image image

Additional context

I have checked the previous issues raised and following the suggestions mentioned in those, for example https://github.com/linear-b/gitstream/issues/197

vim-zz commented 9 months ago

@raunakkathuria can you try to refresh the page and see if this is still the case?

raunakkathuria commented 9 months ago

@raunakkathuria can you try to refresh the page and see if this is still the case?

Yes, still the same image

raunakkathuria commented 9 months ago

Also, I made the repo public, you can check now https://github.com/deriv-com/test-gitstream/pull/2

vim-zz commented 9 months ago

Thank you @raunakkathuria for pointing this out. The issue likely stems from gitStream receiving closely timed events from the GitHub API, leading to multiple outputs. Rest assured, each output is still processed and validated by our rule engine. We're working on a fix to better handle such scenarios and improve gitStream's handling of sequential API events. Your feedback is greatly appreciated!

raunakkathuria commented 9 months ago

@vim-zz Thanks for the prompt response and for looking into it. Looking forward to a fix

vim-zz commented 9 months ago

Hi @raunakkathuria a fix was applied, can verify on your end?

[EDIT] You should test with a new PR, it won't fix existing PRs

vim-zz commented 9 months ago

@raunakkathuria I am closing this, if you see it happens again, please re-open