From 7c49d163e8a9fd6850561c7ead1e6d37c96c1c39 Mon Sep 17 00:00:00 2001 From: bdumpp Date: Fri, 13 Feb 2026 10:27:13 +0100 Subject: [PATCH] omit empty items in ocp sources Signed-off-by: bdumpp bump go version in pipeline since its not working Signed-off-by: bdumpp Go mod tidy Signed-off-by: bdumpp :arrow_up: Bump github.com/getsentry/sentry-go from 0.41.0 to 0.42.0 (#569) Bumps [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) from 0.41.0 to 0.42.0. - [Release notes](https://github.com/getsentry/sentry-go/releases) - [Changelog](https://github.com/getsentry/sentry-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-go/compare/v0.41.0...v0.42.0) --- updated-dependencies: - dependency-name: github.com/getsentry/sentry-go dependency-version: 0.42.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> update makefile to hopefully make tests work Signed-off-by: bdumpp --- .github/workflows/pr.yaml | 4 ++-- Makefile | 9 ++++----- go.mod | 4 ++-- go.sum | 4 ++-- pkg/ocp/sources.go | 6 +++--- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index d216d469..43dbe9ee 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '>=1.21.3' + go-version: '>=1.25.0' - name: build run: make build testing: @@ -49,7 +49,7 @@ jobs: key: ${{ runner.os }}-binaries-${{ hashFiles('**/go.sum') }} - uses: actions/setup-go@v4 with: - go-version: '>=1.21.3' + go-version: '>=1.25.0' - name: run tests run: make test diff --git a/Makefile b/Makefile index 60821102..aeef082e 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ IMG ?= controller:latest BUILDER_IMAGE ?= "" # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.26.0 +ENVTEST_K8S_VERSION = 1.29.0 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -77,7 +77,7 @@ lint: golangci-lint ## Run linters .PHONY: test test: ginkgo manifests generate lint envtest generate-mocks ## Run all tests. go test ./pkg/... - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --output-interceptor-mode=none + KUBEBUILDER_ASSETS="$$($(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --output-interceptor-mode=none .PHONY: test-unit test-unit: ginkgo manifests generate lint generate-mocks ## Run unit tests. @@ -86,7 +86,7 @@ test-unit: ginkgo manifests generate lint generate-mocks ## Run unit tests. .PHONY: test-integration ## Run integration tests. test-integration: ginkgo manifests generate lint envtest generate-mocks ## Run integration tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --label-filter "integration" --output-interceptor-mode=none + KUBEBUILDER_ASSETS="$$($(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r --label-filter "integration" --output-interceptor-mode=none .PHONY: kind-create kind-create: kind ## Create kind cluster @@ -214,11 +214,10 @@ gopls: # $(shell go version) GOBIN=$(LOCALBIN) go install golang.org/x/tools/gopls@latest - .PHONY: envtest envtest: $(ENVTEST) ## Download setup-envtest locally if necessary. $(ENVTEST): $(LOCALBIN) - test -s $(ENVTEST) || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest + test -s $(ENVTEST) || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest .PHONY: golangci-lint golangci-lint: ## Download golangci-lint locally if necessary. diff --git a/go.mod b/go.mod index 5bf8e051..73df9809 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.25.0 require ( github.com/ahmetb/gen-crd-api-reference-docs v0.3.0 - github.com/getsentry/sentry-go v0.41.0 + github.com/getsentry/sentry-go v0.42.0 github.com/go-logr/logr v1.4.3 github.com/golangci/golangci-lint v1.64.8 github.com/google/uuid v1.6.0 github.com/goreleaser/goreleaser v1.26.2 github.com/minio/madmin-go/v3 v3.0.110 - github.com/onsi/ginkgo/v2 v2.27.5 github.com/minio/minio-go/v7 v7.0.98 + github.com/onsi/ginkgo/v2 v2.27.5 github.com/onsi/gomega v1.39.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 7d7a9532..a2191342 100644 --- a/go.sum +++ b/go.sum @@ -418,8 +418,8 @@ github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/getsentry/sentry-go v0.41.0 h1:q/dQZOlEIb4lhxQSjJhQqtRr3vwrJ6Ahe1C9zv+ryRo= -github.com/getsentry/sentry-go v0.41.0/go.mod h1:eRXCoh3uvmjQLY6qu63BjUZnaBu5L5WhMV1RwYO8W5s= +github.com/getsentry/sentry-go v0.42.0 h1:eeFMACuZTbUQf90RE8dE4tXeSe4CZyfvR1MBL7RLEt8= +github.com/getsentry/sentry-go v0.42.0/go.mod h1:eRXCoh3uvmjQLY6qu63BjUZnaBu5L5WhMV1RwYO8W5s= github.com/ghostiam/protogetter v0.3.9 h1:j+zlLLWzqLay22Cz/aYwTHKQ88GE2DQ6GkWSYFOI4lQ= github.com/ghostiam/protogetter v0.3.9/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= github.com/github/smimesign v0.2.0 h1:Hho4YcX5N1I9XNqhq0fNx0Sts8MhLonHd+HRXVGNjvk= diff --git a/pkg/ocp/sources.go b/pkg/ocp/sources.go index 15296c4e..351cfcdc 100644 --- a/pkg/ocp/sources.go +++ b/pkg/ocp/sources.go @@ -78,9 +78,9 @@ type SourceConfig struct { // GitConfig represents the git source control configuration for a source. type GitConfig struct { Repo string `json:"repo"` - Reference string `json:"reference"` + Reference string `json:"reference,omitempty"` Commit string `json:"commit,omitempty"` - Path string `json:"path"` + Path string `json:"path,omitempty"` IncludedFiles []string `json:"included_files,omitempty"` ExcludedFiles []string `json:"excluded_files,omitempty"` CredentialID string `json:"credentials,omitempty"` @@ -89,7 +89,7 @@ type GitConfig struct { // Datasource represents a datasource for a source. type Datasource struct { Name string `json:"name" yaml:"name"` - Path string `json:"path" yaml:"path"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` Type string `json:"type" yaml:"type"` TransformQuery string `json:"transform_query,omitempty" yaml:"transform_query,omitempty"` Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`