From 781a3f117a54d960e1cfdda2331dcdd6cd322743 Mon Sep 17 00:00:00 2001 From: "Jonathan A. Sternberg" Date: Thu, 22 May 2025 14:59:42 -0500 Subject: [PATCH] hack: remove code generation related to generated files With the removal of the protobuf for the controller, there are no longer any generated files. Remove the makefile targets and the associated dockerfiles and bake targets. This wasn't being included in CI because it wasn't part of the `validate` target. Signed-off-by: Jonathan A. Sternberg --- Makefile | 8 +- docker-bake.hcl | 14 --- hack/dockerfiles/generated-files.Dockerfile | 98 --------------------- 3 files changed, 2 insertions(+), 118 deletions(-) delete mode 100644 hack/dockerfiles/generated-files.Dockerfile diff --git a/Makefile b/Makefile index f6e3d8bb8..686a27386 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ endif export BUILDX_CMD ?= docker buildx -BAKE_TARGETS := binaries binaries-cross lint lint-gopls validate-vendor validate-docs validate-authors validate-generated-files +BAKE_TARGETS := binaries binaries-cross lint lint-gopls validate-vendor validate-docs validate-authors .PHONY: all all: binaries @@ -35,7 +35,7 @@ release: ./hack/release .PHONY: validate-all -validate-all: lint test validate-vendor validate-docs validate-generated-files +validate-all: lint test validate-vendor validate-docs .PHONY: test test: @@ -68,7 +68,3 @@ authors: .PHONY: mod-outdated mod-outdated: $(BUILDX_CMD) bake mod-outdated - -.PHONY: generated-files -generated-files: - $(BUILDX_CMD) bake update-generated-files diff --git a/docker-bake.hcl b/docker-bake.hcl index a3576c73e..bfd962222 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -98,13 +98,6 @@ target "validate-authors" { output = ["type=cacheonly"] } -target "validate-generated-files" { - inherits = ["_common"] - dockerfile = "./hack/dockerfiles/generated-files.Dockerfile" - target = "validate" - output = ["type=cacheonly"] -} - target "update-vendor" { inherits = ["_common"] dockerfile = "./hack/dockerfiles/vendor.Dockerfile" @@ -130,13 +123,6 @@ target "update-authors" { output = ["."] } -target "update-generated-files" { - inherits = ["_common"] - dockerfile = "./hack/dockerfiles/generated-files.Dockerfile" - target = "update" - output = ["."] -} - target "mod-outdated" { inherits = ["_common"] dockerfile = "./hack/dockerfiles/vendor.Dockerfile" diff --git a/hack/dockerfiles/generated-files.Dockerfile b/hack/dockerfiles/generated-files.Dockerfile deleted file mode 100644 index 99149bfff..000000000 --- a/hack/dockerfiles/generated-files.Dockerfile +++ /dev/null @@ -1,98 +0,0 @@ -# syntax=docker/dockerfile:1 - -# Forked from https://github.com/moby/buildkit/blob/e1b3b6c4abf7684f13e6391e5f7bc9210752687a/hack/dockerfiles/generated-files.Dockerfile -# Copyright The BuildKit Authors. -# Copyright The Buildx Authors. -# Licensed under the Apache License, Version 2.0 - -ARG GO_VERSION=1.24 -ARG PROTOC_VERSION=3.11.4 -ARG PROTOC_GOOGLEAPIS_VERSION=2af421884dd468d565137215c946ebe4e245ae26 - -# protoc is dynamically linked to glibc so can't use alpine base -FROM golang:${GO_VERSION}-bookworm AS base -RUN apt-get update && apt-get --no-install-recommends install -y git unzip - -FROM base AS protoc -ARG PROTOC_VERSION -ARG TARGETOS -ARG TARGETARCH -RUN <&2 'ERROR: The result of "go generate" differs. Please update with "make generated-files"' - echo "$diff" - exit 1 - fi -EOT