From 15bba6e9a206e85bf51e767ccb97ec6e8cdd4c5c Mon Sep 17 00:00:00 2001 From: Piotr Konopka Date: Fri, 3 Jul 2026 14:12:38 +0200 Subject: [PATCH 1/3] Run control-operator tests in CI --- .github/workflows/control.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/control.yml b/.github/workflows/control.yml index 5ad85275a..d838b61a4 100644 --- a/.github/workflows/control.yml +++ b/.github/workflows/control.yml @@ -23,3 +23,4 @@ jobs: - run: (make vendor) - run: (make) - run: (make test) + - run: (cd control-operator && make test) From 68424388d0c337ee1504b198120408c45042e9f3 Mon Sep 17 00:00:00 2001 From: Piotr Konopka Date: Fri, 3 Jul 2026 15:26:17 +0200 Subject: [PATCH 2/3] Update control.yml --- .github/workflows/control.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/control.yml b/.github/workflows/control.yml index d838b61a4..d9d83e888 100644 --- a/.github/workflows/control.yml +++ b/.github/workflows/control.yml @@ -23,4 +23,5 @@ jobs: - run: (make vendor) - run: (make) - run: (make test) - - run: (cd control-operator && make test) + - run: (cd control-operator && make) + - run: (make test) From 3df6c6ad676a3366cdc9665a291a00175f233f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Tich=C3=A1k?= Date: Mon, 27 Jul 2026 16:28:03 +0200 Subject: [PATCH 3/3] [github workflows] control-operator it's own workflow --- .github/workflows/control-operator.yml | 31 ++++++++++++++++++++++++++ .github/workflows/control.yml | 2 -- control-operator/Makefile | 20 +++++++++++++++-- 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/control-operator.yml diff --git a/.github/workflows/control-operator.yml b/.github/workflows/control-operator.yml new file mode 100644 index 000000000..de76438ad --- /dev/null +++ b/.github/workflows/control-operator.yml @@ -0,0 +1,31 @@ +name: AliECS Control Operator + +on: + pull_request: + push: + branches: + - 'master' + +jobs: + control-operator-basic-check: + name: Basic Make Check + runs-on: ${{ matrix.os }} + defaults: + run: + working-directory: control-operator + strategy: + fail-fast: false + matrix: + os: [macOS-latest, ubuntu-24.04] + go: [ '1.26.5' ] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{matrix.go}} + - uses: arduino/setup-protoc@v3 + with: + version: '35.1' + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: make + - run: make test diff --git a/.github/workflows/control.yml b/.github/workflows/control.yml index d9d83e888..5ad85275a 100644 --- a/.github/workflows/control.yml +++ b/.github/workflows/control.yml @@ -23,5 +23,3 @@ jobs: - run: (make vendor) - run: (make) - run: (make test) - - run: (cd control-operator && make) - - run: (make test) diff --git a/control-operator/Makefile b/control-operator/Makefile index 992fe1162..b0a1cb07e 100644 --- a/control-operator/Makefile +++ b/control-operator/Makefile @@ -127,9 +127,9 @@ test: manifests generate fmt vet envtest ## Run tests. ##@ Protobuf .PHONY: generate-proto -generate-proto: ## Generate protobuf and gRPC Go files from occ.proto. +generate-proto: protoc-gen-go protoc-gen-go-grpc ## Generate protobuf and gRPC Go files from occ.proto. mkdir -p internal/controller/protos/generated - protoc --go_out=internal/controller/protos/generated --go_opt=paths=source_relative --go-grpc_out=internal/controller/protos/generated --go-grpc_opt=paths=source_relative -I internal/controller/protos internal/controller/protos/occ.proto + PATH="$(LOCALBIN):$$PATH" protoc --go_out=internal/controller/protos/generated --go_opt=paths=source_relative --go-grpc_out=internal/controller/protos/generated --go-grpc_opt=paths=source_relative -I internal/controller/protos internal/controller/protos/occ.proto .PHONY: clean-proto clean-proto: ## Remove generated protobuf and gRPC Go files. @@ -242,10 +242,14 @@ KUBECTL ?= kubectl KUSTOMIZE ?= $(LOCALBIN)/kustomize CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen ENVTEST ?= $(LOCALBIN)/setup-envtest +PROTOC_GEN_GO ?= $(LOCALBIN)/protoc-gen-go +PROTOC_GEN_GO_GRPC ?= $(LOCALBIN)/protoc-gen-go-grpc ## Tool Versions KUSTOMIZE_VERSION ?= v5.0.1 CONTROLLER_TOOLS_VERSION ?= v0.16.5 +PROTOC_GEN_GO_VERSION ?= v1.36.11 +PROTOC_GEN_GO_GRPC_VERSION ?= v1.6.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading. @@ -267,6 +271,18 @@ envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest +.PHONY: protoc-gen-go +protoc-gen-go: $(PROTOC_GEN_GO) ## Download protoc-gen-go locally if necessary. If wrong version is installed, it will be overwritten. +$(PROTOC_GEN_GO): $(LOCALBIN) + test -s $(LOCALBIN)/protoc-gen-go && $(LOCALBIN)/protoc-gen-go --version | grep -q $(PROTOC_GEN_GO_VERSION) || \ + GOBIN=$(LOCALBIN) go install google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOC_GEN_GO_VERSION) + +.PHONY: protoc-gen-go-grpc +protoc-gen-go-grpc: $(PROTOC_GEN_GO_GRPC) ## Download protoc-gen-go-grpc locally if necessary. If wrong version is installed, it will be overwritten. +$(PROTOC_GEN_GO_GRPC): $(LOCALBIN) + test -s $(LOCALBIN)/protoc-gen-go-grpc && $(LOCALBIN)/protoc-gen-go-grpc --version | grep -q $(subst v,,$(PROTOC_GEN_GO_GRPC_VERSION)) || \ + GOBIN=$(LOCALBIN) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@$(PROTOC_GEN_GO_GRPC_VERSION) + .PHONY: operator-sdk OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk operator-sdk: ## Download operator-sdk locally if necessary.