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

[EngAut] CommandBot: Create GHA version #113

Open
8 of 15 tasks
crystalin opened this issue Sep 30, 2022 · 18 comments
Open
8 of 15 tasks

[EngAut] CommandBot: Create GHA version #113

crystalin opened this issue Sep 30, 2022 · 18 comments
Assignees
Labels
action GitHub action related

Comments

@crystalin
Copy link

crystalin commented Sep 30, 2022

Background:

  • current command bot is fully dependent on GitLab, because it was designed to manage tasks queue via GitLab CI pipelines.
  • if any parachain team would want to re-use this bot for their benchmarks and other tasks - the GHA+self-hosted runner is much simpler to set up than deploying a runtime NodeJS app with DB + self-hosted runners

Stakeholders and Goals:

  • [Parity Internal]: unblock gitlab deprecation, as current implementation is locked-in for GitLab
  • [Ecosystem] setup and run benchmarks easier

Original request:
We've been using the benchbot and are thinking to move to the command-bot, however we don't rely on gitlab for our CI.
Our current setup is using Github Action but with self-hosted instances (dedicated to building/testing).

I like the idea of the command-bot allowing commands from different sources (matrix/github/...) but it seems to be quite customized to how parity work (using gitlab, helm,...).

Do you have any plan on making it more generic to allow non-gitlab service ?


GitHub action milestone

@mutantcornholio
Copy link
Contributor

Could you elaborate on what currently doesn't work, or how command-bot's way of spawning jobs contradicts your CI configuration?

@crystalin
Copy link
Author

I didn't go as far a trying to setup everything yet. The documentation contains many element but it is a bit hard to know how all of the elements are orchestrated overall.
But in the setup part it mentions:

Create a repository in GitLab and set up GITLAB_PUSH_NAMESPACE along with GITLAB_ACCESS_TOKEN to run the commands for the GitHub repository (Step 3).

That is why I supposed it required to do so, I'll try to set the bot up and see where I get stuck

@crystalin
Copy link
Author

Also, the first line of readme also mention:

command-bot executes arbitrary commands on GitLab CI

@mutantcornholio
Copy link
Contributor

You're going through deployment/development setup. Are you trying to host your own instance?

@crystalin
Copy link
Author

Ideally yes, but if you offer a service where we can plug our repo and our CI servers, I'm happy to try it (I don't think that would work in term of security however so we would end up hosting it)

@mutantcornholio
Copy link
Contributor

Okay, I think I've misread the situation. Let us think on it.
Currently, it'll basically mean replacing at least half of the code, and that raises a big question on the vision of the project.

@mordamax mordamax self-assigned this Apr 5, 2023
@mordamax mordamax changed the title Support for non-gitlab system ? [EngAut] Support for non-gitlab system Jun 5, 2023
@mordamax mordamax mentioned this issue Jun 1, 2023
8 tasks
@mordamax
Copy link
Contributor

@crystalin Currently, we defer the tasks to run and queue for the CI, in our case Gitlab. We are going to make it less opinionated and instead of creating a Gitlab CI job - create Kubernetes jobs.

What would be a desired infrastructure set up so you could deploy and use it on your side?

@crystalin
Copy link
Author

Thank you, I think plugin it with github and using their GHA (self-hosted runner) is preferred but we could probably combine it with our kubernetes cluster too

@mordamax mordamax changed the title [EngAut] Support for non-gitlab system [EngAut] CommandBot: Create GHA version Dec 14, 2023
@mordamax
Copy link
Contributor

Current plan is to move away from gitlab completely, so will be porting the exiting command bot to separate repo, the idea is to set this up as Github action, with decoupled repo for command scripts and interface.
https://github.com/paritytech/command-bot-scripts/tree/main/commands
This allows to avoid re-deploying/releasing the bot business logic from the commands implementation.

@Bullrich Bullrich self-assigned this Mar 15, 2024
@mordamax mordamax removed their assignment Mar 15, 2024
@Bullrich Bullrich added the action GitHub action related label Mar 18, 2024
@Bullrich
Copy link
Contributor

Bullrich commented Mar 18, 2024

I will be taking up this task.

I have created a milestone to track this:

GitHub action milestone

@Bullrich
Copy link
Contributor

The repository cmd-action has been created. The action will be developed there.

I ran two experiments to see if this is feasible, both of them were succesfull:

@Bullrich
Copy link
Contributor

Currently working on paritytech/cmd-action#1.

I'm making the system parse content from the comments and validating it with the commands.

@Bullrich
Copy link
Contributor

Bullrich commented Apr 8, 2024

Preparing schema handling.

I've been in contact with Oliver, our main stakeholder.

The logic of configuration handling will be similar to review-bot's: Easy to read and hosted in the target repository.

cmd-action will be mainly a tool to "parse" commands and pass it to a github action with a repo script.

@Bullrich
Copy link
Contributor

Currently working on paritytech/cmd-action#7

Configuration files will be moved to be in yaml (can also be toml) so it's easier to read.

I'm preparing this ticket in combination with paritytech/cmd-action#10 so we have a schema validator out of the box

@Bullrich
Copy link
Contributor

@Bullrich
Copy link
Contributor

Bullrich commented May 6, 2024

@Bullrich
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action GitHub action related
Projects
Status: Open
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants