diff --git a/.github/workflows/kind_e2e.yaml b/.github/workflows/kind_e2e.yaml index af559b29a..ca5a110e2 100644 --- a/.github/workflows/kind_e2e.yaml +++ b/.github/workflows/kind_e2e.yaml @@ -50,11 +50,10 @@ jobs: name: E2E tests for K8s (KinD) runs-on: ubuntu-latest env: - DAPR_RUNTIME_PINNED_VERSION: 1.13.0-rc.2 + DAPR_RUNTIME_PINNED_VERSION: 1.13.5 DAPR_DASHBOARD_PINNED_VERSION: 0.14.0 DAPR_RUNTIME_LATEST_STABLE_VERSION: DAPR_DASHBOARD_LATEST_STABLE_VERSION: - DAPR_TGZ: dapr-1.13.0-rc.2.tgz strategy: fail-fast: false # Keep running if one leg fails. matrix: diff --git a/.github/workflows/self_hosted_e2e.yaml b/.github/workflows/self_hosted_e2e.yaml index c8c0441ba..e8550ee4c 100644 --- a/.github/workflows/self_hosted_e2e.yaml +++ b/.github/workflows/self_hosted_e2e.yaml @@ -43,7 +43,7 @@ jobs: DAPR_RUNTIME_LATEST_STABLE_VERSION: "" DAPR_DASHBOARD_LATEST_STABLE_VERSION: "" GOLANG_PROTOBUF_REGISTRATION_CONFLICT: warn - PODMAN_VERSION: 4.4.4 + PODMAN_VERSION: 4.9.3 strategy: # TODO: Remove this when our E2E tests are stable for podman on MacOS. fail-fast: false # Keep running if one leg fails. diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go index bc7fba008..00bc6d100 100644 --- a/pkg/standalone/standalone.go +++ b/pkg/standalone/standalone.go @@ -673,7 +673,11 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn ) } - args = append(args, image, "--etcd-data-dir=/var/lock/dapr/scheduler") + if strings.EqualFold(info.imageVariant, "mariner") { + args = append(args, image, "--etcd-data-dir=/var/tmp/dapr/scheduler") + } else { + args = append(args, image, "--etcd-data-dir=/var/lock/dapr/scheduler") + } _, err = utils.RunCmdAndWait(runtimeCmd, args...) if err != nil { diff --git a/tests/e2e/standalone/init_test.go b/tests/e2e/standalone/init_test.go index e07b405a6..f7ff3066b 100644 --- a/tests/e2e/standalone/init_test.go +++ b/tests/e2e/standalone/init_test.go @@ -167,15 +167,17 @@ func TestStandaloneInit(t *testing.T) { placementPort = 6050 } - verifyTCPLocalhost(t, placementPort) + verifyTCPLocalhost(t, placementPort) }) t.Run("init version with scheduler", func(t *testing.T) { // Ensure a clean environment must(t, cmdUninstall, "failed to uninstall Dapr") + latestDaprRuntimeVersion, latestDaprDashboardVersion := common.GetVersionsFromEnv(t, true) + args := []string{ - "--runtime-version", "1.14.0-rc.3", + "--runtime-version", latestDaprRuntimeVersion, "--dev", } output, err := cmdInit(args...) @@ -189,9 +191,8 @@ func TestStandaloneInit(t *testing.T) { daprPath := filepath.Join(homeDir, ".dapr") require.DirExists(t, daprPath, "Directory %s does not exist", daprPath) - _, latestDaprDashboardVersion := common.GetVersionsFromEnv(t, true) - verifyContainers(t, "1.14.0-rc.3") - verifyBinaries(t, daprPath, "1.14.0-rc.3", latestDaprDashboardVersion) + verifyContainers(t, latestDaprRuntimeVersion) + verifyBinaries(t, daprPath, latestDaprRuntimeVersion, latestDaprDashboardVersion) verifyConfigs(t, daprPath) placementPort := 50005 @@ -201,8 +202,8 @@ func TestStandaloneInit(t *testing.T) { schedulerPort = 6060 } - verifyTCPLocalhost(t, placementPort) - verifyTCPLocalhost(t, schedulerPort) + verifyTCPLocalhost(t, placementPort) + verifyTCPLocalhost(t, schedulerPort) }) t.Run("init without runtime-version flag with mariner images", func(t *testing.T) { diff --git a/tests/e2e/standalone/list_test.go b/tests/e2e/standalone/list_test.go index a33345644..b3514710b 100644 --- a/tests/e2e/standalone/list_test.go +++ b/tests/e2e/standalone/list_test.go @@ -137,6 +137,13 @@ func TestStandaloneList(t *testing.T) { t.Log(output) require.NoError(t, err, "expected no error status on list") require.Equal(t, "No Dapr instances found.\n", output) + + // This test is skipped on Windows, but just in case, try to terminate dashboard process only on non-Windows OSs + // stopProcess uses kill command, won't work on windows + if runtime.GOOS != "windows" { + err = stopProcess("dashboard", "--port", "5555") + require.NoError(t, err, "failed to stop dashboard process") + } }) } diff --git a/tests/e2e/standalone/utils.go b/tests/e2e/standalone/utils.go index 87d2fa78c..9d80c4f4f 100644 --- a/tests/e2e/standalone/utils.go +++ b/tests/e2e/standalone/utils.go @@ -157,3 +157,35 @@ func containerRuntime() string { } return "" } + +func getRunningProcesses() []string { + cmd := exec.Command("ps", "-o", "pid,command") + output, err := cmd.Output() + if err != nil { + return nil + } + + processes := strings.Split(string(output), "\n") + + // clean the process output whitespace + for i, process := range processes { + processes[i] = strings.TrimSpace(process) + } + return processes +} + +func stopProcess(args ...string) error { + processCommand := strings.Join(args, " ") + processes := getRunningProcesses() + for _, process := range processes { + if strings.Contains(process, processCommand) { + processSplit := strings.SplitN(process, " ", 2) + cmd := exec.Command("kill", "-9", processSplit[0]) + err := cmd.Run() + if err != nil { + return err + } + } + } + return nil +}