From 3510318f4c44bb832739721eb94c1e585ee3847a Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Thu, 19 Jun 2025 12:17:46 +0300 Subject: [PATCH 1/6] Fix broken tests --- .github/workflows/compatibility-tests.yaml | 28 ++++++++++---------- controllers/coherence_controller.go | 14 +++++----- controllers/common.go | 2 +- controllers/status/status_manager.go | 30 ++++++++++++++-------- 4 files changed, 42 insertions(+), 32 deletions(-) diff --git a/.github/workflows/compatibility-tests.yaml b/.github/workflows/compatibility-tests.yaml index e60b682d..921b79d1 100644 --- a/.github/workflows/compatibility-tests.yaml +++ b/.github/workflows/compatibility-tests.yaml @@ -37,6 +37,7 @@ jobs: fail-fast: false matrix: compatibilityVersion: + - 3.5.1 - 3.5.0 - 3.4.3 - 3.4.2 @@ -45,42 +46,41 @@ jobs: - 3.3.5 - 3.3.4 - 3.3.3 - - 3.3.2 include: + - compatibilityVersion: 3.5.1 + coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-2" + compatibilitySelector: control-plane=coherence + k8s: kindest/node:v1.33.1@sha256:050072256b9a903bd914c0b2866828150cb229cea0efe5892e2b644d5dd3b34f - compatibilityVersion: 3.5.0 - coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-1" + coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-2" compatibilitySelector: control-plane=coherence - k8s: kindest/node:v1.33.0@sha256:91e9ed777db80279c22d1d1068c091b899b2078506e4a0f797fbf6e397c0b0b2 + k8s: kindest/node:v1.33.1@sha256:050072256b9a903bd914c0b2866828150cb229cea0efe5892e2b644d5dd3b34f - compatibilityVersion: 3.4.3 - coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-1" + coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-2" compatibilitySelector: control-plane=coherence k8s: kindest/node:v1.32.2@sha256:f226345927d7e348497136874b6d207e0b32cc52154ad8323129352923a3142f - compatibilityVersion: 3.4.2 - coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-1" + coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-2" compatibilitySelector: control-plane=coherence k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 - compatibilityVersion: 3.4.1 - coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-1" + coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-2" compatibilitySelector: control-plane=coherence k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 - compatibilityVersion: 3.4.0 - coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10" + coherence-image: "ghcr.io/oracle/coherence-ce:22.06.12" compatibilitySelector: control-plane=coherence k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 - compatibilityVersion: 3.3.5 - coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10" + coherence-image: "ghcr.io/oracle/coherence-ce:22.06.12" compatibilitySelector: control-plane=coherence k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 - compatibilityVersion: 3.3.4 - coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10" + coherence-image: "ghcr.io/oracle/coherence-ce:22.06.12" compatibilitySelector: control-plane=coherence k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 - compatibilityVersion: 3.3.3 - coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10" - compatibilitySelector: control-plane=coherence - k8s: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 - - compatibilityVersion: 3.3.2 - coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10" + coherence-image: "ghcr.io/oracle/coherence-ce:22.06.12" compatibilitySelector: control-plane=coherence k8s: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 diff --git a/controllers/coherence_controller.go b/controllers/coherence_controller.go index ebee2779..7e5eff4c 100644 --- a/controllers/coherence_controller.go +++ b/controllers/coherence_controller.go @@ -96,7 +96,7 @@ func (in *CoherenceReconciler) Reconcile(ctx context.Context, request ctrl.Reque // request for the same resource is already in progress so requeue this one. if ok := in.Lock(request); !ok { log.Info("Coherence resource " + request.Namespace + "/" + request.Name + " is already locked, requeue request") - return reconcile.Result{Requeue: true, RequeueAfter: 0}, nil + return reconcile.Result{RequeueAfter: time.Minute}, nil } // Make sure that the request is unlocked when this method exits defer in.Unlock(request) @@ -134,7 +134,7 @@ func (in *CoherenceReconciler) Reconcile(ctx context.Context, request ctrl.Reque msg := fmt.Sprintf("failed to finalize Coherence resource, %s", err.Error()) in.GetEventRecorder().Event(deployment, coreV1.EventTypeWarning, reconciler.EventReasonDeleted, msg) log.Error(err, "Failed to remove finalizer") - return ctrl.Result{Requeue: true}, nil + return ctrl.Result{RequeueAfter: time.Minute}, nil } // Remove the finalizer. Once all finalizers have been // removed, the object will be deleted. @@ -164,7 +164,7 @@ func (in *CoherenceReconciler) Reconcile(ctx context.Context, request ctrl.Reque if controllerutil.ContainsFinalizer(deployment, coh.CoherenceFinalizer) { err := in.finalizerManager.EnsureFinalizerRemoved(ctx, deployment) if err != nil && !apierrors.IsNotFound(err) { - return ctrl.Result{Requeue: true}, errorhandling.NewOperationError("remove_finalizer", err). + return ctrl.Result{}, errorhandling.NewOperationError("remove_finalizer", err). WithContext("resource", deployment.GetName()). WithContext("namespace", deployment.GetNamespace()). WithContext("reason", "allow_unsafe_delete") @@ -238,7 +238,7 @@ func (in *CoherenceReconciler) Reconcile(ctx context.Context, request ctrl.Reque } // create the result - result := ctrl.Result{Requeue: false} + result := ctrl.Result{} hash := deployment.GetGenerationString() storeHash, _ := storage.GetHash() @@ -253,6 +253,7 @@ func (in *CoherenceReconciler) Reconcile(ctx context.Context, request ctrl.Reque if err = in.statusManager.UpdateDeploymentStatusHash(ctx, request.NamespacedName, hashNew); err != nil { return result, errors.Wrap(err, "error updating deployment status hash") } + log.Info("Updated pre-3.5.0 Coherence resource status hash", "From", hash, "To", hashNew) return result, nil } @@ -369,8 +370,9 @@ func (in *CoherenceReconciler) SetupWithManager(mgr ctrl.Manager, cs clients.Cli } in.statusManager = &status.StatusManager{ - Client: mgr.GetClient(), - Log: in.Log.WithName("status"), + Client: mgr.GetClient(), + Log: in.Log.WithName("status"), + Patcher: in.GetPatcher(), } in.resourcesManager = &resources.OperatorSecretManager{ diff --git a/controllers/common.go b/controllers/common.go index bd5e6682..d4d34439 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -38,7 +38,7 @@ func checkHash(deployment coh.CoherenceResource, phase coh.ConditionType, storag if hashFound { // The "storeHash" is not "", so it must have been previously processed by the Operator (could have been a previous version). // The operator now uses the Coherence resource's generation instead of calculating a hash, so if the version is - // 3.4.3 or earlier and hash difference is ignored. + // 3.4.3 or earlier the hash difference is ignored. if deployment.IsBeforeOrSameVersion("3.4.3") { // There is an edge case where the Coherence resource could have legitimately been updated whilst // the Operator and web-hooks were uninstalled. In that case we would ignore the update until another diff --git a/controllers/status/status_manager.go b/controllers/status/status_manager.go index a48eb882..c148c189 100644 --- a/controllers/status/status_manager.go +++ b/controllers/status/status_manager.go @@ -11,6 +11,7 @@ import ( "github.com/go-logr/logr" coh "github.com/oracle/coherence-operator/api/v1" "github.com/oracle/coherence-operator/pkg/operator" + "github.com/oracle/coherence-operator/pkg/patching" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -18,8 +19,9 @@ import ( // StatusManager manages the status of Coherence resources type StatusManager struct { - Client client.Client - Log logr.Logger + Client client.Client + Log logr.Logger + Patcher patching.ResourcePatcher } // UpdateCoherenceStatusPhase updates the phase of a Coherence resource @@ -36,12 +38,7 @@ func (sm *StatusManager) UpdateCoherenceStatusPhase(ctx context.Context, namespa updated.Status.Phase = phase // Update the resource - err = sm.Client.Status().Patch(ctx, deployment, client.MergeFrom(updated)) - if err != nil { - return errors.Wrapf(err, "updating status phase for Coherence resource %s/%s", namespacedName.Namespace, namespacedName.Name) - } - - return nil + return sm.patchStatus(ctx, deployment, updated) } // UpdateDeploymentStatusHash updates the hash in the status of a Coherence resource @@ -59,10 +56,21 @@ func (sm *StatusManager) UpdateDeploymentStatusHash(ctx context.Context, namespa updated.Status.SetVersion(operator.GetVersion()) // Update the resource - err = sm.Client.Status().Patch(ctx, deployment, client.MergeFrom(updated)) + return sm.patchStatus(ctx, deployment, updated) +} + +func (sm *StatusManager) patchStatus(ctx context.Context, original, updated *coh.Coherence) error { + patch, err := sm.Patcher.CreateTwoWayPatchOfType(types.MergePatchType, original.Name, updated, original) if err != nil { - return errors.Wrapf(err, "updating status hash for Coherence resource %s/%s", namespacedName.Namespace, namespacedName.Name) + return errors.Wrapf(err, "creating status patch for Coherence resource %s/%s", original.Namespace, original.Name) + } + if patch != nil { + sm.Log.Info("Patching status", "Namespace", original.Namespace, "Name", original.Name, "Patch", patch) + err = sm.Client.Status().Patch(ctx, original, patch) + if err != nil { + return errors.Wrapf(err, "updating status for Coherence resource %s/%s", original.Namespace, original.Name) + } + sm.Log.Info("Patched status", "Namespace", original.Namespace, "Name", original.Name, "Patch", patch) } - return nil } From c5791ec06dbb7226e6a33cf11f74bcfc326a0c24 Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Thu, 19 Jun 2025 13:42:13 +0300 Subject: [PATCH 2/6] Fix broken tests --- .github/workflows/coherence-matrix.yaml | 6 ++++-- .github/workflows/compatibility-tests.yaml | 5 ----- hack/github/github-pages.sh | 16 +++++----------- .../com/oracle/coherence/k8s/testing/Setup.java | 4 +++- .../src/main/resources/Dockerfile | 6 ++++-- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/coherence-matrix.yaml b/.github/workflows/coherence-matrix.yaml index 8275ba0f..ff6fe7ba 100644 --- a/.github/workflows/coherence-matrix.yaml +++ b/.github/workflows/coherence-matrix.yaml @@ -220,8 +220,10 @@ jobs: echo "COHERENCE_IMAGE=${COHERENCE_IMAGE}" export BUILD_JAVA_VERSION=${{ matrix.javaVersion }} echo "BUILD_JAVA_VERSION=${BUILD_JAVA_VERSION}" - export COHERENCE_TEST_BASE_IMAGE=${{ matrix.baseImage }} - echo "COHERENCE_TEST_BASE_IMAGE=${COHERENCE_TEST_BASE_IMAGE}" + export COHERENCE_TEST_BASE_IMAGE_17=${{ matrix.baseImage }} + echo "COHERENCE_TEST_BASE_IMAGE_17=${COHERENCE_TEST_BASE_IMAGE_17}" + export COHERENCE_TEST_BASE_IMAGE_21=${{ matrix.baseImage }} + echo "COHERENCE_TEST_BASE_IMAGE_21=${COHERENCE_TEST_BASE_IMAGE_17}" export OPERATOR_COHERENCE_JAVA_8=${{ matrix.coherenceIsJava8 }} make clean echo "Building Operator Image" diff --git a/.github/workflows/compatibility-tests.yaml b/.github/workflows/compatibility-tests.yaml index 921b79d1..6849a7c7 100644 --- a/.github/workflows/compatibility-tests.yaml +++ b/.github/workflows/compatibility-tests.yaml @@ -37,7 +37,6 @@ jobs: fail-fast: false matrix: compatibilityVersion: - - 3.5.1 - 3.5.0 - 3.4.3 - 3.4.2 @@ -47,10 +46,6 @@ jobs: - 3.3.4 - 3.3.3 include: - - compatibilityVersion: 3.5.1 - coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-2" - compatibilitySelector: control-plane=coherence - k8s: kindest/node:v1.33.1@sha256:050072256b9a903bd914c0b2866828150cb229cea0efe5892e2b644d5dd3b34f - compatibilityVersion: 3.5.0 coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-2" compatibilitySelector: control-plane=coherence diff --git a/hack/github/github-pages.sh b/hack/github/github-pages.sh index 96c1ebe7..d341f0ab 100644 --- a/hack/github/github-pages.sh +++ b/hack/github/github-pages.sh @@ -14,7 +14,7 @@ fi if [ "${OPERATOR_VERSION}" == "" ] then - OPERATOR_VERSION=$(cat "${BUILD_OUTPUT}/OPERATOR_VERSION.txt") + OPERATOR_VERSION=$(make version) fi GITHUB_REPO=https://github.com/oracle/coherence-operator.git @@ -41,18 +41,12 @@ rm -rf ${BUILD_GH_PAGES}/dashboards/latest || true cp -R ${BUILD_GH_PAGES}/dashboards/${OPERATOR_VERSION} ${BUILD_GH_PAGES}/dashboards/latest git add -A dashboards/latest/* -mkdir ${BUILD_GH_PAGES}/docs/${OPERATOR_VERSION} || true -rm -rf ${BUILD_GH_PAGES}/docs/${OPERATOR_VERSION}/ || true -cp -R ${BUILD_OUTPUT}/docs ${BUILD_GH_PAGES}/docs/${OPERATOR_VERSION}/ -rm -rf ${BUILD_GH_PAGES}/docs/latest -cp -R ${BUILD_GH_PAGES}/docs/${OPERATOR_VERSION} ${BUILD_GH_PAGES}/docs/latest -git add -A docs/* - mkdir -p ${BUILD_GH_PAGES}/charts || true cp ${BUILD_OUTPUT}/helm-charts/coherence-operator-${OPERATOR_VERSION}.tgz ${BUILD_GH_PAGES}/charts/ -helm repo index charts --url https://oracle.github.io/coherence-operator/charts -git add charts/coherence-operator-${OPERATOR_VERSION}.tgz -git add charts/index.yaml +ls -al ${BUILD_GH_PAGES}/charts +helm repo index ${BUILD_GH_PAGES}/charts --url https://oracle.github.io/coherence-operator/charts +git add ${BUILD_GH_PAGES}/charts/coherence-operator-${OPERATOR_VERSION}.tgz +git add ${BUILD_GH_PAGES}/charts/index.yaml git clean -d -f diff --git a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java index 5d8c9593..85a4f5db 100644 --- a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java +++ b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Oracle and/or its affiliates. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ @@ -44,6 +44,8 @@ private static void copy(Path source, Path targetDir) throws Exception { if (source.toFile().exists()) { Path target = targetDir.resolve(source.getFileName()); Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); + } else { + throw new IllegalStateException("Source does not exist: " + source); } } } diff --git a/java/operator-compatibility/src/main/resources/Dockerfile b/java/operator-compatibility/src/main/resources/Dockerfile index a2265a3b..70118c85 100644 --- a/java/operator-compatibility/src/main/resources/Dockerfile +++ b/java/operator-compatibility/src/main/resources/Dockerfile @@ -1,12 +1,14 @@ -FROM ${coherence.compatibility.coherence.image} +FROM ${coherence.compatibility.coherence.image} AS builder USER root COPY target/classes/build.sh build.sh COPY target/operator-compatibility-*.jar /app/libs/operator-compatibility.jar RUN ["java", "-cp", "/app/libs/operator-compatibility.jar", "com.oracle.coherence.k8s.testing.Setup"] +RUN ["chmod", "-R", "+r", "/app/libs"] +RUN ["ls", "-al", "/app/libs"] FROM ${coherence.test.base.image} -COPY --from=0 /app/ /app/ +COPY --from=builder /app/ /app/ ENTRYPOINT ["java", "-XshowSettings:all", "-XX:+PrintCommandLineFlags", "-XX:+PrintFlagsFinal", "-Dcoherence.ttl=0", "-cp", "/coherence/ext/conf:/coherence/ext/lib/*:/app/resources:/app/classes:/app/libs/*", "com.oracle.coherence.k8s.testing.RestServer"] From 6c62af2cc392a2d1db7b32ed18d5d3ef3c8bed56 Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Thu, 19 Jun 2025 13:54:45 +0300 Subject: [PATCH 3/6] Fix broken tests --- .../src/main/java/com/oracle/coherence/k8s/testing/Setup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java index 85a4f5db..d19c754a 100644 --- a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java +++ b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java @@ -45,7 +45,7 @@ private static void copy(Path source, Path targetDir) throws Exception { Path target = targetDir.resolve(source.getFileName()); Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); } else { - throw new IllegalStateException("Source does not exist: " + source); + System.out.println("Nothing to copy, source does not exist: " + source); } } } From dc63a21ccd56ccd874e87466d69571a25ecb52c8 Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Thu, 19 Jun 2025 14:49:35 +0300 Subject: [PATCH 4/6] Fix broken tests --- java/operator-compatibility/src/main/resources/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/operator-compatibility/src/main/resources/Dockerfile b/java/operator-compatibility/src/main/resources/Dockerfile index 70118c85..2390232d 100644 --- a/java/operator-compatibility/src/main/resources/Dockerfile +++ b/java/operator-compatibility/src/main/resources/Dockerfile @@ -4,7 +4,7 @@ USER root COPY target/classes/build.sh build.sh COPY target/operator-compatibility-*.jar /app/libs/operator-compatibility.jar RUN ["java", "-cp", "/app/libs/operator-compatibility.jar", "com.oracle.coherence.k8s.testing.Setup"] -RUN ["chmod", "-R", "+r", "/app/libs"] +RUN ["chmod", "-R", "+r", "/app/libs/"] RUN ["ls", "-al", "/app/libs"] FROM ${coherence.test.base.image} From 34c20f9ee3d7467a36cabf8ddab0b6d5a5650048 Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Thu, 19 Jun 2025 15:15:59 +0300 Subject: [PATCH 5/6] Fix broken tests --- .../main/java/com/oracle/coherence/k8s/testing/Setup.java | 5 +++++ java/operator-compatibility/src/main/resources/Dockerfile | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java index d19c754a..7091019d 100644 --- a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java +++ b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java @@ -10,6 +10,10 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; +import java.nio.file.attribute.PosixFilePermission; +import java.nio.file.attribute.PosixFilePermissions; +import java.util.HashSet; +import java.util.Set; /** * Set-up class run by the compatibility image build. @@ -44,6 +48,7 @@ private static void copy(Path source, Path targetDir) throws Exception { if (source.toFile().exists()) { Path target = targetDir.resolve(source.getFileName()); Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); + Files.setPosixFilePermissions(target, PosixFilePermissions.fromString("rw-r--r--")); } else { System.out.println("Nothing to copy, source does not exist: " + source); } diff --git a/java/operator-compatibility/src/main/resources/Dockerfile b/java/operator-compatibility/src/main/resources/Dockerfile index 2390232d..3d9831ff 100644 --- a/java/operator-compatibility/src/main/resources/Dockerfile +++ b/java/operator-compatibility/src/main/resources/Dockerfile @@ -2,10 +2,8 @@ FROM ${coherence.compatibility.coherence.image} AS builder USER root COPY target/classes/build.sh build.sh -COPY target/operator-compatibility-*.jar /app/libs/operator-compatibility.jar +COPY --chmod=544 target/operator-compatibility-*.jar /app/libs/operator-compatibility.jar RUN ["java", "-cp", "/app/libs/operator-compatibility.jar", "com.oracle.coherence.k8s.testing.Setup"] -RUN ["chmod", "-R", "+r", "/app/libs/"] -RUN ["ls", "-al", "/app/libs"] FROM ${coherence.test.base.image} From 7e06af5f0568e955ec96e0c9670daa8aaff9dc35 Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Thu, 19 Jun 2025 15:51:08 +0300 Subject: [PATCH 6/6] Fix broken tests --- .../main/java/com/oracle/coherence/k8s/testing/Setup.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java index 7091019d..6df3fb6c 100644 --- a/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java +++ b/java/operator-compatibility/src/main/java/com/oracle/coherence/k8s/testing/Setup.java @@ -10,10 +10,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; -import java.nio.file.attribute.PosixFilePermission; import java.nio.file.attribute.PosixFilePermissions; -import java.util.HashSet; -import java.util.Set; /** * Set-up class run by the compatibility image build. @@ -49,7 +46,8 @@ private static void copy(Path source, Path targetDir) throws Exception { Path target = targetDir.resolve(source.getFileName()); Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING); Files.setPosixFilePermissions(target, PosixFilePermissions.fromString("rw-r--r--")); - } else { + } + else { System.out.println("Nothing to copy, source does not exist: " + source); } }