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

up to date action got into an infinite loop commenting(flooding) the PR #18

Closed
mordamax opened this issue May 17, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@mordamax
Copy link
Contributor

polkadot-fellows/runtimes#290
The action was re-triggering and failing with error

Keep PRs up to date
HttpError: refusing to allow a GitHub App to create or update workflow `.github/workflows/clippy.yml` without `workflows` permission

Not sure if we can overcome that error, but certainly it must not re-trigger infinitelly

@Bullrich
Copy link
Collaborator

I found the issue.

Auto-Merge-Bot is being triggered every time a comment appears, even tho it is skipped because it doesn't start with /bot.

The Up-to-date.yml subscribed to the event being triggered

name: Keep PR up to date

on:
  push:
    branches:
      - main
  workflow_run:
    workflows: [Auto Merge Bot]
    types: [completed]

But it seems it can not distinct a skipped from completed.

There are only three events:

  • completed
  • requested
  • in progress

It seems that skipped was considered completed.

The problem in detail

  • up-to-date run and failed with action permissions (expected)
  • up-to-date commented on the failing PR
  • auto-merge-bot started because of a comment
  • auto-merge-bot skipped the job because it didn't start with /merge
  • auto-merge-bot gave completed signal
  • up-to-date bot got triggered
  • loop repeats ➿

Solutions

@Bullrich Bullrich self-assigned this May 21, 2024
@Bullrich Bullrich added the bug Something isn't working label May 21, 2024
Bullrich added a commit to Bullrich/polkadot-fellows-runtimes that referenced this issue May 21, 2024
As explained in paritytech/up-to-date-action#18, the issue is caused because the `skipped` event is treated as `completed`. Until a better solution is generated, let's remove this event and triggered it only in pushes.

This reverts polkadot-fellows#272
fellowship-merge-bot bot pushed a commit to polkadot-fellows/runtimes that referenced this issue May 22, 2024
As explained in
paritytech/up-to-date-action#18 (comment),
the issue is caused because the `skipped` event is treated as
`completed`. Until a better solution is generated, let's remove this
event and trigger it only in pushes.

This reverts #272

- [x] Does not require a CHANGELOG entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants