Skip to content

Add gitaly gem bump danger check

Alessio Caiazza requested to merge danger-gitaly-bump into master

This is an alternative corrective action for gitlab-com/gl-infra/production#4903 (closed) that is less risky than gitlab-com/gl-infra/delivery#1821 (closed)

What does this MR do?

Since we now take 5% of traffic to the Canary stage, if there is new functionality deployed in Rails (like a new GRPC) that is not behind a feature flag, it is possible for errors to occur while Canary takes traffic.

The initial proposal was to enforce the following deployment order: gitaly -> praefect -> rails cny -> rails gprd.

This tells us that a couple of things:

  • rails is forward compatible, but not backward compatible (it can handle newer gitaly but not older ones)
  • gitaly is backward compatible, but not forward compatible (it can handle an older rails/prefect but not a newer one)
  • prefect has two interfaces:
    • with rails is backward compatible, but not forward compatible (it can handle an older rails but not a newer one)
    • with gitaly is forward compatible, but not backward compatible (it can handle newer gitaly but not older ones)

Can we safely identify when we are breaking the interface?

The gitaly/praefect interface is already safe (for now) by deploying gitaly first, then preafect. We are only left with the rails interface.

This interface only breaks when we bump the gitaly gem on rails. This is a clear breaking point and we can gate this during the merge request review.

This merge request implements a danger bot rule that informs us to the gitaly gem bumping MR cannot be merged before that gitaly interface is deployed in production.

Screenshots (strongly suggested)

From !65330 (closed)

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Alessio Caiazza

Merge request reports