paritytech / command-bot

Apache License 2.0
12 stars 5 forks source link

"bot fmt" + "bot clean" fails with HttpError because of removed comment #252

Closed ordian closed 4 days ago

ordian commented 8 months ago

https://github.com/paritytech/polkadot-sdk/pull/1841#issuecomment-1825380569

EDIT: but the command succeeded eventually.

{"issue_number":1841,"body":"@ordian https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4468802 was started for your command `\"$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh\"`. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently. \n\nComment `bot cancel 20-879efa0a-9e37-42d1-93b7-e400fda1bc7f` to cancel this command or `bot cancel` to cancel all commands in this pull request."}

looks like a race condition with bot clean which probably removed the initial comment which bot have left with promise to update 🙈

The reason is the sequence.. if you place bot clean after the other command - it will be executed after the first comment posted - so the posted comment will be treated as "outdated".

Solution would be - check only the comments which were left by bot BEFORE the current set of commands in any of the sequence

mordamax commented 8 months ago

thanks @ordian for reporting It's looks like a race condition with bot clean which probably removed the initial comment which bot have left with promise to update 🙈

mordamax commented 4 days ago

Won't fix, as we're planning to move to github actions https://forum.polkadot.network/t/command-bot-has-migrated-to-github-actions/8722