Command bot has migrated to GitHub actions

Hello everyone, I’m Javier :cow2: and today I will be your assistant in this Polkadot Library :books:

Today, I’m writing with exciting changes! We have migrated the command bot to be github actions :fast_forward:.

But let’s start with the basics:

Why did this change happen?

Command bot’s current implementation depends on GitLab and we are in the process of migrating out of GitLab, so this was a required change. This will also allow anyone in the ecosystem to use the commands.

What changed?

The new implementation of Command Bot (now called Command Actions) works as a workflow dispatch event. This means that you don’t use the cli anymore, but instead you use a dropdown with preexisting options.

For example, if you want to trigger the bench-all command, you have the following dropdown with all the available options:

This change was necessary for forks. With this implementation, anyone who forks the repository can simply trigger the actions that they need.

Before, by having the command-bot parse comments, it was limited only to a whitelist, and if someone external wanted to trigger those actions, they would have to implement their own command bot, add themselves to the whitelist, and trigger it.

Now, they can simply fork the repo and run the action.

How can I use the new command actions?

There is a README with instructions. If you comment "bot " in a PR (with the space) it will also send you a link to this same README.

But, to summarise it, you have to go to the actions tab in Polkadot-SDK, then select the action you want to run (they all start with command), click on Run workflow and, after setting the correct values, click on the green button that says Run workflow.

Current available commands

We are currently working on migrating the last remaining command: Command sync.

How to use the commands in a fork

If you check the commands, they all run in specific machines:

All the command bench-* works on arc-runners-polkadot-sdk-benchmark and command update ui runs on arc-runners-polkadot-sdk-beefy.

These are self hosted runners. If you want to run them in your own fork, you will have to set them up by yourself (as the default github action runners and large runners do not have enough power).

If you want to learn how to set up a self-hosted runner, please refer to the documentation: Adding self-hosted runners.

5 Likes

Command Sync has been added!

Find the update readme here.

1 Like

Hey, I think it is great that you are documenting the process, ans sharing it publicly here.

Suggestions

  1. This README file in polkadot-sdk/.github/commands-readme.md at a23abb17232107275089040a33ff38e6a801e648 · paritytech/polkadot-sdk · GitHub is IMO near impossible to find. Can you please reference this from our main CONTRIBUTION.md? And based on the next suggestion, remove any reference to the old bot if it is no longer needed.
  2. is the old bench bot now deprecated and should not be used? Then all of the commands that you run with it should return a disclaimer appended that “hey, this bot is soon to be deprecated, please read this README for more”.
2 Likes