Skip to content
Open
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -510,21 +510,26 @@ test-upgrade-st2st-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-st2st-e
test-upgrade-st2st-e2e: standard/install.sh kind-load-operator-controller-upgrade-st2st-e2e test-upgrade-e2e #HELP Run upgrade (standard -> standard) e2e tests on a local kind cluster
-$(KIND) delete cluster --name operator-controller-upgrade-st2st-e2e

# TODO(OPRUN-4810): Remove SKIP_HELM_MIGRATION_TESTS from the experimental upgrade
# targets below once Helm storage migration has been adapted to ClusterObjectDeployment.
.PHONY: test-upgrade-ex2ex-e2e
test-upgrade-ex2ex-e2e: export SKIP_HELM_MIGRATION_TESTS := true
test-upgrade-ex2ex-e2e: RELEASE_INSTALL := https://github.com/operator-framework/operator-controller/releases/latest/download/install-experimental.sh
test-upgrade-ex2ex-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-ex2ex-e2e
test-upgrade-ex2ex-e2e: RELEASE_UPGRADE := $(ROOT_DIR)/experimental-install.sh
test-upgrade-ex2ex-e2e: experimental/install.sh kind-load-operator-controller-upgrade-ex2ex-e2e test-upgrade-e2e #HELP Run upgrade (experimental -> experimental) e2e tests on a local kind cluster
-$(KIND) delete cluster --name operator-controller-upgrade-ex2ex-e2e

.PHONY: test-upgrade-st2ex-e2e
test-upgrade-st2ex-e2e: export SKIP_HELM_MIGRATION_TESTS := true
test-upgrade-st2ex-e2e: RELEASE_INSTALL := https://github.com/operator-framework/operator-controller/releases/latest/download/install.sh
test-upgrade-st2ex-e2e: RELEASE_UPGRADE := $(ROOT_DIR)/experimental-install.sh
test-upgrade-st2ex-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-st2ex-e2e
test-upgrade-st2ex-e2e: experimental/install.sh kind-load-operator-controller-upgrade-st2ex-e2e test-upgrade-e2e #HELP Run upgrade (standard -> experimental) e2e tests on a local kind cluster
-$(KIND) delete cluster --name operator-controller-upgrade-st2ex-e2e

.PHONY: test-st2ex-e2e
test-st2ex-e2e: export SKIP_HELM_MIGRATION_TESTS := true
test-st2ex-e2e: RELEASE_INSTALL := $(ROOT_DIR)/standard-install.sh
test-st2ex-e2e: RELEASE_UPGRADE := $(ROOT_DIR)/experimental-install.sh
test-st2ex-e2e: KIND_CLUSTER_NAME := operator-controller-st2ex-e2e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,16 @@ func (d *BoxcutterRevisionStatesGetter) GetRevisionStates(ctx context.Context, e
return rs, nil
}

// TODO(OPRUN-4810): Rework Helm storage migration for ClusterObjectDeployment
// before re-enabling it. Preserve the existing migration implementation for that work.
const helmStorageMigrationEnabled = false

func MigrateStorage(m StorageMigrator) ReconcileStepFunc {
return func(ctx context.Context, state *reconcileState, ext *ocv1.ClusterExtension) (*ctrl.Result, error) {
if !helmStorageMigrationEnabled {
return nil, nil
}

objLbls := map[string]string{
labels.OwnerKindKey: ocv1.ClusterExtensionKind,
labels.OwnerNameKey: ext.GetName(),
Expand Down
5 changes: 5 additions & 0 deletions test/upgrade-e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ The following Makefile targets run upgrade tests for different upgrade paths:
| `make test-upgrade-st2st-e2e` | Upgrade from the latest stable **standard** release to a locally built **standard** build |
| `make test-upgrade-st2ex-e2e` | Upgrade from the latest stable **standard** release to a locally built **experimental** build |
| `make test-st2ex-e2e` | Switchover from a locally built **standard** install to a locally built **experimental** install |
| `make test-upgrade-ex2ex-e2e` | Upgrade from the latest stable **experimental** release to a locally built **experimental** build |

Each target handles kind cluster creation, image building/loading, test execution, and cleanup.

Experimental upgrade suites are temporarily skipped via `SKIP_HELM_MIGRATION_TESTS=true`;
see [OPRUN-4810](https://redhat.atlassian.net/browse/OPRUN-4810).

## Environment Variables

| Variable | Description |
Expand All @@ -41,3 +45,4 @@ Each target handles kind cluster creation, image building/loading, test executio
| `ROOT_DIR` | Project root directory (working directory for install scripts) |
| `KIND_CLUSTER_NAME` | Name of the kind cluster to use |
| `KUBECONFIG` | Path to kubeconfig file (defaults to `~/.kube/config`) |
| `SKIP_HELM_MIGRATION_TESTS` | Set to `true` to skip upgrade tests; unset by default |
7 changes: 7 additions & 0 deletions test/upgrade-e2e/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ func TestMain(m *testing.M) {
pflag.Parse()
opts.Paths = pflag.Args()

// TODO(OPRUN-4810): Re-enable experimental upgrade coverage once Helm storage
// migration has been adapted to ClusterObjectDeployment.
if os.Getenv("SKIP_HELM_MIGRATION_TESTS") == "true" {
log.Print("Skipping upgrade E2E suite: Helm storage migration is temporarily disabled (OPRUN-4810)")
return
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

sc := godog.TestSuite{
ScenarioInitializer: func(sc *godog.ScenarioContext) {
sc.Before(steps.CreateScenarioContext)
Expand Down
Loading