Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/operator-e2e-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.9
go-version: 1.24.12

- name: Create KIND cluster
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/operator_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.9
go-version: 1.24.12
- name: Operator tests
run: make -C infra/feast-operator test
- name: After code formatting, check for uncommitted differences
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_local_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.9
go-version: 1.24.12
- name: Operator Data Source types test
run: make -C infra/feast-operator test-datasources
- name: Minimize uv cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/registry-rest-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.9
go-version: 1.24.12

- name: Create KIND cluster
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.22.9
go-version: 1.24.12
- name: Build & version operator-specific release files
run: make -C infra/feast-operator build-installer bundle

Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.22.9
go-version: 1.24.12
- name: Compile Go Test Binaries
run: |
cd infra/feast-operator
Expand Down
55 changes: 55 additions & 0 deletions infra/feast-operator/.golangci.bck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
run:
timeout: 5m
allow-parallel-runners: true

issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
# restore some of the defaults
# (fill in the rest as needed)
exclude-rules:
- path: "api/*"
linters:
- lll
- path: "internal/*"
linters:
- dupl
- lll
- path: "test/*"
linters:
- lll
- path: "upgrade/*"
linters:
- lll
- path: "previous-version/*"
linters:
- lll
linters:
disable-all: true
enable:
- dupl
- errcheck
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- ginkgolinter
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
80 changes: 45 additions & 35 deletions infra/feast-operator/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,65 @@
version: "2"
run:
timeout: 5m
allow-parallel-runners: true

issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
# restore some of the defaults
# (fill in the rest as needed)
exclude-rules:
- path: "api/*"
linters:
- lll
- path: "internal/*"
linters:
- dupl
- lll
- path: "test/*"
linters:
- lll
- path: "upgrade/*"
linters:
- lll
- path: "previous-version/*"
linters:
- lll
linters:
disable-all: true
default: none
enable:
- dupl
- errcheck
- ginkgolinter
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- ginkgolinter
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
settings:
revive:
rules:
- name: comment-spacings
staticcheck:
checks:
- "all"
- "-QF*"
- "-ST*"
exclusions:
generated: lax
presets: []
rules:
- name: comment-spacings
- linters:
- lll
path: api/*
- linters:
- dupl
- lll
path: internal/*
- linters:
- lll
path: test/*
- linters:
- lll
path: upgrade/*
- linters:
- lll
path: previous-version/*
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
3 changes: 2 additions & 1 deletion infra/feast-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Build the manager binary
FROM registry.access.redhat.com/ubi9/go-toolset:1.22.9 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.24 AS builder
ARG TARGETOS
ARG TARGETARCH
ENV GOTOOLCHAIN=auto

# Copy the Go Modules manifests
COPY go.mod go.mod
Expand Down
20 changes: 10 additions & 10 deletions infra/feast-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ endif

# Set the Operator SDK version to use. By default, what is installed on the system is used.
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.38.0
OPERATOR_SDK_VERSION ?= v1.41.0
# Image URL to use all building/pushing image targets
# During development and testing, and before make deploy we need to export FS_IMG to point to
# the dev image generated using command `make build-feature-server-dev-docker`
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
FS_IMG ?= quay.io/feastdev/feature-server:$(VERSION)
CJ_IMG ?= quay.io/openshift/origin-cli:4.17
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.30.0
ENVTEST_K8S_VERSION = 1.31.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -116,7 +116,7 @@ vet: ## Run go vet against code.

.PHONY: test
test: build-installer vet lint envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path --use-deprecated-gcs=false)" go test $$(go list ./... | grep -v test/e2e | grep -v test/data-source-types | grep -v test/upgrade | grep -v test/previous-version) -coverprofile cover.out
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v test/e2e | grep -v test/data-source-types | grep -v test/upgrade | grep -v test/previous-version) -coverprofile cover.out

# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
.PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up.
Expand Down Expand Up @@ -239,11 +239,11 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
ENVSUBST = $(LOCALBIN)/envsubst

## Tool Versions
KUSTOMIZE_VERSION ?= v5.4.2
CONTROLLER_TOOLS_VERSION ?= v0.15.0
CRD_REF_DOCS_VERSION ?= v0.1.0
ENVTEST_VERSION ?= release-0.18
GOLANGCI_LINT_VERSION ?= v1.63.4
KUSTOMIZE_VERSION ?= v5.4.3
CONTROLLER_TOOLS_VERSION ?= v0.18.0
CRD_REF_DOCS_VERSION ?= v0.3.0
ENVTEST_VERSION ?= release-0.21
GOLANGCI_LINT_VERSION ?= v2.1.0
ENVSUBST_VERSION ?= v1.4.2

.PHONY: kustomize
Expand All @@ -264,7 +264,7 @@ $(ENVTEST): $(LOCALBIN)
.PHONY: golangci-lint
golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
$(GOLANGCI_LINT): $(LOCALBIN)
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))

.PHONY: envsubst
envsubst: $(ENVSUBST) ## Download envsubst locally if necessary.
Expand Down Expand Up @@ -338,7 +338,7 @@ ifeq (,$(shell which opm 2>/dev/null))
set -e ;\
mkdir -p $(dir $(OPM)) ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23.0/$${OS}-$${ARCH}-opm ;\
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.55.0/$${OS}-$${ARCH}-opm ;\
chmod +x $(OPM) ;\
}
else
Expand Down
4 changes: 2 additions & 2 deletions infra/feast-operator/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func main() {

// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.
// More info:
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/metrics/server
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.21.0/pkg/metrics/server
// - https://book.kubebuilder.io/reference/metrics.html
metricsServerOptions := metricsserver.Options{
BindAddress: metricsAddr,
Expand All @@ -123,7 +123,7 @@ func main() {
// FilterProvider is used to protect the metrics endpoint with authn/authz.
// These configurations ensure that only authorized users and service accounts
// can access the metrics endpoint. The RBAC are configured in 'config/rbac/kustomization.yaml'. More info:
// https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/metrics/filters#WithAuthenticationAndAuthorization
// https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.21.0/pkg/metrics/filters#WithAuthenticationAndAuthorization
metricsServerOptions.FilterProvider = filters.WithAuthenticationAndAuthorization
}

Expand Down
Loading
Loading