Upgrade `kas-grpc` gem for git push events
What does this MR do and why?
This change set upgrades kas-grpc
gem to 0.1.0
and implements the git_push_event
gRPC client method in Kas::Client
.
Which in a follow-up will be used to send git push events to Kas.
The kas-grpc
upgrade is backwards compatible and contains the following changes: https://my.diffend.io/gems/kas-grpc/0.0.2/0.1.0
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Use latest
gitlab-agent
(KAS) frommaster
in GDK - Configure a project with an agent and configure the gitops module for that project and agent
- In
gdk rails console
you can initialize the client and send the request.
[1] pry(main)> client = Gitlab::Kas::Client.new()
=> #<Gitlab::Kas::Client:0x000000012c246b98>
[2] pry(main)> client.send_git_push_event(project: Project.find(20))
Project Load (1.9ms) SELECT "projects".* FROM "projects" WHERE "projects"."id" = 20 LIMIT 1 /*application:console,db_config_name:main,console_hostname:tuxmac.local,console_username:timo,line:(pry):2:in `__pry__'*/
Route Load (2.2ms) SELECT "routes".* FROM "routes" WHERE "routes"."source_id" = 20 AND "routes"."source_type" = 'Project' LIMIT 1 /*application:console,db_config_name:main,console_hostname:tuxmac.local,console_username:timo,line:/app/models/concerns/routable.rb:141:in `block in full_attribute'*/
=> <Gitlab::Agent::Notifications::Rpc::GitPushEventResponse: >
[3] pry(main)>
- You'll see a log that the event has been received.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Timo Furrer