Skip to content

Commit

Permalink
fix(ci): revert changes in make verify-crd-compatibility to restore c…
Browse files Browse the repository at this point in the history
…atalogd test functionality and change the path

Reverting previous modifications to `make verify-crd-compatibility` that were made to accommodate catalogd tests before the release. Now that the release is complete, we should restore the original behavior to ensure this test functions as expected.
  • Loading branch information
camilamacedo86 committed Jan 30, 2025
1 parent 037b9e2 commit c134fc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/catalogd-crd-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: catalogd-crd-diff
on:
pull_request:
jobs:
crd-diff:
catalogd-crd-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -14,6 +14,5 @@ jobs:
go-version-file: go.mod

- name: Run make verify-crd-compatibility
working-directory: catalogd
run: make verify-crd-compatibility CRD_DIFF_ORIGINAL_REF=${{ github.event.pull_request.base.sha }} CRD_DIFF_UPDATED_SOURCE="git://${{ github.event.pull_request.head.sha }}?path=config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml"
run: make -C catalogd verify-crd-compatibility CRD_DIFF_ORIGINAL_REF=${{ github.event.pull_request.base.sha }} CRD_DIFF_UPDATED_SOURCE="git://${{ github.event.pull_request.head.sha }}?path=catalogd/config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml"

9 changes: 2 additions & 7 deletions catalogd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,10 @@ image-registry: ## Setup in-cluster image registry

.PHONY: verify-crd-compatibility
CRD_DIFF_ORIGINAL_REF := main
CRD_DIFF_UPDATED_SOURCE := file://config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml
CRD_DIFF_UPDATED_SOURCE := file://catalogd/config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml
CRD_DIFF_CONFIG := crd-diff-config.yaml
verify-crd-compatibility: $(CRD_DIFF)
@if git show ${CRD_DIFF_ORIGINAL_REF}:config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml > /dev/null 2>&1; then \
echo "Running CRD diff..."; \
$(CRD_DIFF) --config="${CRD_DIFF_CONFIG}" "git://${CRD_DIFF_ORIGINAL_REF}?path=config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml" ${CRD_DIFF_UPDATED_SOURCE}; \
else \
echo "Skipping CRD diff: CRD does not exist in ${CRD_DIFF_ORIGINAL_REF}"; \
fi
$(CRD_DIFF) --config="${CRD_DIFF_CONFIG}" "git://${CRD_DIFF_ORIGINAL_REF}?path=catalogd/config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml" ${CRD_DIFF_UPDATED_SOURCE}


## image-registry target has to come after run-latest-release,
Expand Down

0 comments on commit c134fc1

Please sign in to comment.