Skip to content

Commit

Permalink
Remove ODH/RHOAI conditional in upgrade test; getNotebookImage is p…
Browse files Browse the repository at this point in the history
…erfectly sufficient

There is extra override for notebook image of not on ODH.
This should not be there, because the image selection above already considers ODH/RHOAI.

As a consequence, we use the huge pytorch image on RHOAI, which makes upgrade test run long and be unstable.
  • Loading branch information
jiridanek committed Apr 29, 2024
1 parent 3c3add7 commit 7cc8a0f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/md/io/odh/test/e2e/standard/NotebookST.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
| - | - | - |
| 1. | Create namespace for Notebook resources with proper name, labels and annotations | Namespace is created |
| 2. | Create PVC with proper labels and data for Notebook | PVC is created |
| 3. | Create Notebook resource with Pytorch image in pre-defined namespace | Notebook resource is created |
| 3. | Create Notebook resource with Jupyter Minimal image in pre-defined namespace | Notebook resource is created |
| 4. | Wait for Notebook pods readiness | Notebook pods are up and running, Notebook is in ready state |

2 changes: 1 addition & 1 deletion src/test/java/io/odh/test/e2e/standard/NotebookST.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class NotebookST extends StandardAbstract {
steps = {
@Step(value = "Create namespace for Notebook resources with proper name, labels and annotations", expected = "Namespace is created"),
@Step(value = "Create PVC with proper labels and data for Notebook", expected = "PVC is created"),
@Step(value = "Create Notebook resource with Pytorch image in pre-defined namespace", expected = "Notebook resource is created"),
@Step(value = "Create Notebook resource with Jupyter Minimal image in pre-defined namespace", expected = "Notebook resource is created"),
@Step(value = "Wait for Notebook pods readiness", expected = "Notebook pods are up and running, Notebook is in ready state")
}
)
Expand Down
16 changes: 0 additions & 16 deletions src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaimBuilder;
import io.fabric8.kubernetes.api.model.Quantity;
import io.odh.test.Environment;
import io.odh.test.OdhAnnotationsLabels;
import io.odh.test.TestSuite;
import io.odh.test.e2e.Abstract;
Expand Down Expand Up @@ -42,7 +41,6 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.kubeflow.v1.Notebook;
import org.kubeflow.v1.NotebookBuilder;
import org.kubeflow.v1.notebookspec.template.spec.containers.EnvBuilder;

import java.io.IOException;

Expand Down Expand Up @@ -121,20 +119,6 @@ public void deployNotebook(String namespace, String name) throws IOException {

String notebookImage = NotebookResource.getNotebookImage(NotebookResource.JUPYTER_MINIMAL_IMAGE, NotebookResource.JUPYTER_MINIMAL_2023_2_TAG);
Notebook notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name, notebookImage)).build();
if (!Environment.PRODUCT.equals(Environment.PRODUCT_ODH)) {
notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name, notebookImage))
.editSpec()
.editNotebookspecTemplate()
.editOrNewSpec()
.editContainer(0)
.withImage("image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/pytorch:2023.2")
.addToEnv(new EnvBuilder().withName("JUPYTER_IMAGE").withValue("image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/pytorch:2023.2").build())
.endSpecContainer()
.endTemplateSpec()
.endNotebookspecTemplate()
.endSpec()
.build();
}

ResourceManager.getInstance().createResourceWithoutWait(notebook);
}
Expand Down

0 comments on commit 7cc8a0f

Please sign in to comment.