From 591f6bf6a9941aa99908c08bf6a54607cb3fa2c6 Mon Sep 17 00:00:00 2001 From: Dmitrii Fedorov Date: Mon, 26 Oct 2026 13:41:27 -0700 Subject: [PATCH] ref(rollout): Switch gocd tracking logic to rollout in all regions snuba-api is an Argo Rollout (workloadRef) in every region. Deploy api with k8s-deploy --type=rollout everywhere so GoCD waits for the Rollout to become Healthy, and raise the deploy-primary timeout to fit canary steps and analyses. --- gocd/templates/bash/deploy-py.sh | 2 +- gocd/templates/pipelines/snuba.libsonnet | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/gocd/templates/bash/deploy-py.sh b/gocd/templates/bash/deploy-py.sh index 081aeda6a3..5fc5992a7a 100644 --- a/gocd/templates/bash/deploy-py.sh +++ b/gocd/templates/bash/deploy-py.sh @@ -49,5 +49,5 @@ IMAGE_TAG="${GO_REVISION_SNUBA_REPO}" && k8s-deploy \ --label-selector="${LABEL_SELECTOR}" \ --image="us-docker.pkg.dev/sentryio/snuba-mr/image:${IMAGE_TAG}" \ - --type="${SNUBA_API_DEPLOY_TYPE:-deployment}" \ + --type="rollout" \ --container-name="api" diff --git a/gocd/templates/pipelines/snuba.libsonnet b/gocd/templates/pipelines/snuba.libsonnet index cd8a9bca54..3a2284773e 100644 --- a/gocd/templates/pipelines/snuba.libsonnet +++ b/gocd/templates/pipelines/snuba.libsonnet @@ -40,12 +40,6 @@ local migrate_stage(stage_name, region) = [ }, ]; -// Regions where snuba-api is an Argo Rollout and k8s-deploy should track the -// Rollout instead of the (scaled to zero) Deployment it references. -local api_rollout_regions = ['s4s2']; - -local is_api_rollout(region) = std.member(api_rollout_regions, region); - local saas_datadog_monitor_ids = { us: '311884335 311884334', de: '311884404 311884405', @@ -223,11 +217,10 @@ function(region) { 'deploy-primary': { // Argo Rollout canary steps and analyses take longer than a // plain rolling update. - timeout: if is_api_rollout(region) then 2400 else 1200, + timeout: 2400, elastic_profile_id: 'snuba', environment_variables: { LABEL_SELECTOR: 'service=snuba', - [if is_api_rollout(region) then 'SNUBA_API_DEPLOY_TYPE' else null]: 'rollout', }, tasks: [ gocdtasks.script(importstr '../bash/deploy-py.sh'),