From 529c33215969416245d64b8b11c10da433667feb Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Wed, 13 May 2026 11:20:42 -0400 Subject: [PATCH] Merge pull request #33658 from overleaf/em-fix-docker-tag-length build: truncate branch names to 96 chars for Docker image tags GitOrigin-RevId: 9db313244e78a6d4e0aa5d8c08d25f1aac83318b --- services/chat/Makefile | 2 +- services/clsi/Makefile | 2 +- services/contacts/Makefile | 2 +- services/docstore/Makefile | 2 +- services/document-updater/Makefile | 2 +- services/filestore/Makefile | 2 +- services/git-bridge/Makefile | 2 +- services/history-v1/Makefile | 2 +- services/notifications/Makefile | 2 +- services/project-history/Makefile | 2 +- services/real-time/Makefile | 2 +- services/web/Makefile | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/services/chat/Makefile b/services/chat/Makefile index e75044b1dc..28b0b3f2a9 100644 --- a/services/chat/Makefile +++ b/services/chat/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = chat BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/clsi/Makefile b/services/clsi/Makefile index 0c2c223296..0535ca7da1 100644 --- a/services/clsi/Makefile +++ b/services/clsi/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = clsi BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/contacts/Makefile b/services/contacts/Makefile index f8faa2eaf8..a1db029092 100644 --- a/services/contacts/Makefile +++ b/services/contacts/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = contacts BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/docstore/Makefile b/services/docstore/Makefile index d4ec573276..a3f0cd3f99 100644 --- a/services/docstore/Makefile +++ b/services/docstore/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = docstore BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/document-updater/Makefile b/services/document-updater/Makefile index 9be0d90a6b..37e62a03a6 100644 --- a/services/document-updater/Makefile +++ b/services/document-updater/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = document-updater BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/filestore/Makefile b/services/filestore/Makefile index cb070dce7e..e901361cd4 100644 --- a/services/filestore/Makefile +++ b/services/filestore/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = filestore BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/git-bridge/Makefile b/services/git-bridge/Makefile index 3e489866c5..9e8a7e4a79 100644 --- a/services/git-bridge/Makefile +++ b/services/git-bridge/Makefile @@ -5,7 +5,7 @@ MVN_TARGET := target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.ja export BUILD_NUMBER ?= local export BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) export COMMIT_SHA ?= $(shell git rev-parse HEAD) PROJECT_NAME = git-bridge diff --git a/services/history-v1/Makefile b/services/history-v1/Makefile index 4ed19efc4c..b6c73d6ff0 100644 --- a/services/history-v1/Makefile +++ b/services/history-v1/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = history-v1 BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/notifications/Makefile b/services/notifications/Makefile index c5f309a812..c88e7d68b2 100644 --- a/services/notifications/Makefile +++ b/services/notifications/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = notifications BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/project-history/Makefile b/services/project-history/Makefile index 03ae8aa410..6248b8858f 100644 --- a/services/project-history/Makefile +++ b/services/project-history/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = project-history BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/real-time/Makefile b/services/real-time/Makefile index 96db30e3f8..3712af39ac 100644 --- a/services/real-time/Makefile +++ b/services/real-time/Makefile @@ -4,7 +4,7 @@ BUILD_NUMBER ?= local BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) -BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g') +BRANCH_NAME_TAG_SAFE = $(shell echo $(BRANCH_NAME) | sed 's/\//\-\-/g' | cut -c1-96) PROJECT_NAME = real-time BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]') HERE=$(shell pwd) diff --git a/services/web/Makefile b/services/web/Makefile index 64c5cf2ecd..1e180eed5f 100644 --- a/services/web/Makefile +++ b/services/web/Makefile @@ -5,7 +5,7 @@ BUILD_NUMBER ?= local ifeq ($(BRANCH_NAME),) export BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD) endif -BRANCH_NAME_TAG_SAFE := $(subst /,--,$(BRANCH_NAME)) +BRANCH_NAME_TAG_SAFE := $(shell echo "$(BRANCH_NAME)" | sed 's/\//\-\-/g' | cut -c1-96) ifeq ($(COMMIT_SHA),) export COMMIT_SHA := $(shell git rev-parse HEAD) endif