Skip to content

Commit

Permalink
Unified go.mod to ensure that catalogd and operator-framework use the…
Browse files Browse the repository at this point in the history
… same go.mod and fix imports
  • Loading branch information
camilamacedo86 committed Jan 2, 2025
1 parent 40baf83 commit ba38627
Show file tree
Hide file tree
Showing 43 changed files with 66 additions and 728 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-crd-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: catalogd/go.mod
go-version-file: go.mod

- name: Run make verify-crd-compatibility
working-directory: catalogd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "catalogd/go.mod"
go-version-file: "go.mod"
- name: Run Demo Update
working-directory: catalogd
run: make demo-update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "catalogd/go.mod"
go-version-file: "go.mod"
- name: Run the upgrade e2e test
working-directory: catalogd
run: make test-upgrade-e2e
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-go-apidiff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "catalogd/go.mod"
go-version-file: "go.mod"
id: go
- name: Run go-apidiff
working-directory: catalogd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: "catalogd/go.mod"
go-version-file: "go.mod"

- name: Docker Login
if: ${{ github.event_name != 'pull_request' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "catalogd/go.mod"
go-version-file: "go.mod"
- name: Run lint checks
working-directory: catalogd
run: make lint GOLANGCI_LINT_ARGS="--out-format github-actions"
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-tilt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: catalogd/go.mod
go-version-file: go.mod
- name: Install Tilt
run: |
TILT_VERSION="0.33.3"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/catalogd-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "catalogd/go.mod"
go-version-file: "go.mod"

- name: Unit Test
working-directory: catalogd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tilt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: get-catalogd-version
run: |
cd operator-controller
echo "CATALOGD_VERSION=$(go list -mod=mod -m -f "{{.Version}}" github.com/operator-framework/catalogd)" >> "$GITHUB_OUTPUT"
echo "CATALOGD_VERSION=$(go list -mod=mod -m -f "{{.Version}}" github.com/operator-framework/operator-controller/catalogd)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: operator-framework/catalogd
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ IMG := $(IMAGE_REPO):$(IMAGE_TAG)

# Define dependency versions (use go.mod if we also use Go code from dependency)
export CERT_MGR_VERSION := v1.15.3
export CATALOGD_VERSION := $(shell go list -mod=mod -m -f "{{.Version}}" github.com/operator-framework/catalogd)
export CATALOGD_VERSION := $(shell git describe --tags --always --dirty)
export WAIT_TIMEOUT := 60s

# Install default ClusterCatalogs
Expand Down Expand Up @@ -334,7 +334,7 @@ crd-ref-docs: $(CRD_REF_DOCS) #EXHELP Generate the API Reference Documents.
--config=$(API_REFERENCE_DIR)/crd-ref-docs-gen-config.yaml \
--renderer=markdown --output-path=$(API_REFERENCE_DIR)/$(OPERATOR_CONTROLLER_API_REFERENCE_FILENAME);
rm -rf $(CATALOGD_TMP_DIR)
git clone --depth 1 --branch $(CATALOGD_VERSION) https://github.com/operator-framework/catalogd $(CATALOGD_TMP_DIR)
git clone --depth 1 --branch $(CATALOGD_VERSION) https://github.com/operator-framework/operator-controller/catalogd $(CATALOGD_TMP_DIR)
rm -f $(API_REFERENCE_DIR)/$(CATALOGD_API_REFERENCE_FILENAME)
$(CRD_REF_DOCS) --source-path=$(CATALOGD_TMP_DIR)/api \
--config=$(API_REFERENCE_DIR)/crd-ref-docs-gen-config.yaml \
Expand Down
20 changes: 10 additions & 10 deletions catalogd/cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
crwebhook "sigs.k8s.io/controller-runtime/pkg/webhook"

catalogdv1 "github.com/operator-framework/catalogd/api/v1"
corecontrollers "github.com/operator-framework/catalogd/internal/controllers/core"
"github.com/operator-framework/catalogd/internal/features"
"github.com/operator-framework/catalogd/internal/garbagecollection"
catalogdmetrics "github.com/operator-framework/catalogd/internal/metrics"
"github.com/operator-framework/catalogd/internal/serverutil"
"github.com/operator-framework/catalogd/internal/source"
"github.com/operator-framework/catalogd/internal/storage"
"github.com/operator-framework/catalogd/internal/version"
"github.com/operator-framework/catalogd/internal/webhook"
catalogdv1 "github.com/operator-framework/operator-controller/catalogd/api/v1"
corecontrollers "github.com/operator-framework/operator-controller/catalogd/internal/controllers/core"
"github.com/operator-framework/operator-controller/catalogd/internal/features"
"github.com/operator-framework/operator-controller/catalogd/internal/garbagecollection"
catalogdmetrics "github.com/operator-framework/operator-controller/catalogd/internal/metrics"
"github.com/operator-framework/operator-controller/catalogd/internal/serverutil"
"github.com/operator-framework/operator-controller/catalogd/internal/source"
"github.com/operator-framework/operator-controller/catalogd/internal/storage"
"github.com/operator-framework/operator-controller/catalogd/internal/version"
"github.com/operator-framework/operator-controller/catalogd/internal/webhook"
)

var (
Expand Down
175 changes: 0 additions & 175 deletions catalogd/go.mod

This file was deleted.

Loading

0 comments on commit ba38627

Please sign in to comment.