From 23ab604b964a6ee8c07d56c2fced57bea621a643 Mon Sep 17 00:00:00 2001 From: Pavel Zeman Date: Thu, 16 Apr 2026 20:51:59 -0400 Subject: [PATCH] ci: pin enterprise repo to explicit commit hash (#35957) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: pin enterprise repo to explicit commit hash Introduces an enterprise.pin file that explicitly pins the enterprise commit the server is built and tested against. This replaces the implicit HEAD checkout, eliminating the CI race condition for all cross-repo changes. Changes: - enterprise.pin: pinned enterprise commit SHA - server/Makefile: new bump-enterprise target to update the pin Co-authored-by: Claude * ci: fix bump-enterprise error handling and path resolution - Add set -e so recipe fails fast if git rev-parse fails - Use $(ROOT)/../enterprise.pin instead of ../enterprise.pin to resolve path relative to Makefile location, not CWD Co-authored-by: Claude * fix: add missing 'all' to .PHONY declaration in Makefile Pre-existing issue flagged by CodeRabbit — the 'all' target (line 199) was never declared phony. Out of scope for the enterprise.pin change but trivial to fix. Co-authored-by: Claude * ci: trigger Enterprise CI re-run Co-authored-by: Claude --------- Co-authored-by: Claude --- enterprise.pin | 3 +++ server/Makefile | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 enterprise.pin diff --git a/enterprise.pin b/enterprise.pin new file mode 100644 index 00000000000..03f750130d1 --- /dev/null +++ b/enterprise.pin @@ -0,0 +1,3 @@ +# Enterprise commit this server branch is tested against. +# Updated via: make bump-enterprise +b03e11ccf5dca59cc3ffd2ed8c73604c5a5a48b8 diff --git a/server/Makefile b/server/Makefile index 615e59e17af..6400a346d63 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,4 +1,4 @@ -.PHONY: build package run stop run-client run-server run-node run-haserver stop-haserver stop-client stop-server restart restart-server restart-client restart-haserver start-docker update-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-freebsd build-windows package-prep package-linux package-osx package-windows internal-test-web-client vet run-server-for-web-client-tests diff-config prepackaged-plugins prepackaged-binaries test-server test-server-ee test-server-elasticsearch test-server-quick test-server-race test-mmctl-unit test-mmctl-e2e test-mmctl test-mmctl-coverage mmctl-build mmctl-docs new-migration migrations-extract test-public mocks-public run-server-faketime +.PHONY: all build package run stop run-client run-server run-node run-haserver stop-haserver stop-client stop-server restart restart-server restart-client restart-haserver start-docker update-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-freebsd build-windows package-prep package-linux package-osx package-windows internal-test-web-client vet run-server-for-web-client-tests diff-config prepackaged-plugins prepackaged-binaries test-server test-server-ee test-server-elasticsearch test-server-quick test-server-race test-mmctl-unit test-mmctl-e2e test-mmctl test-mmctl-coverage mmctl-build mmctl-docs new-migration migrations-extract test-public mocks-public run-server-faketime bump-enterprise ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) @@ -431,6 +431,19 @@ ifneq ($(SKIP_SETUP_GO_WORK),true) fi endif +bump-enterprise: ## Update enterprise.pin to the current enterprise HEAD + @if [ ! -d "$(BUILD_ENTERPRISE_DIR)" ]; then \ + echo "Enterprise directory not found at $(BUILD_ENTERPRISE_DIR)"; \ + exit 1; \ + fi + @set -e; \ + SHA=$$(cd "$(BUILD_ENTERPRISE_DIR)" && git rev-parse HEAD); \ + PIN_FILE="$(ROOT)/../enterprise.pin"; \ + echo "# Enterprise commit this server branch is tested against." > "$$PIN_FILE"; \ + echo "# Updated via: make bump-enterprise" >> "$$PIN_FILE"; \ + echo "$$SHA" >> "$$PIN_FILE"; \ + echo "Updated enterprise.pin to $$SHA" + check-style: plugin-checker vet golangci-lint ## Runs style/lint checks gotestsum: