Skip to content

Notify KAS on git push events

Tiger Watson requested to merge notify-kas-on-git-push into master

What does this MR do and why?

Notifies KAS (via gRPC) whenever a git push is executed.

Part of Hook into GitLab's internal/post_receive notifi... (gitlab-org/cluster-integration/gitlab-agent#43 - closed)

Screenshots or screen recordings

2023-05-01_02:26:07.00118 gitlab-k8s-agent      : {"level":"debug","time":"2023-05-01T12:26:07.001+1000","msg":"received git push notifications event for project id:20  full_path:\"root/agent-project\"","grpc_service":"gitlab.agent.notifications.rpc.Notifications","grpc_method":"GitPushEvent"}

How to set up and validate locally

In a GDK with gitlab_k8s_agent enabled:

  1. In a Rails console, enable the feature flag - Feature.enable :notify_kas_on_git_push
  2. Push a commit to any branch (via the web UI is easiest)
  3. Observe an entry similar to the example above in the GDK logs

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tiger Watson

Merge request reports