Skip to content

Commit 42ff23d

Browse files
committed
Revert of fix for RHOAIENG-24545
Together with the revert, there were added two workarounds for the relevant tests so that we have them green for now. These workarounds need to be removed together with the proper fix of the issue.
1 parent 24d1e27 commit 42ff23d

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

components/odh-notebook-controller/controllers/notebook_controller_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,16 @@ var _ = Describe("The Openshift Notebook controller", func() {
12251225
return cli.Get(ctx, types.NamespacedName{Name: dsSecretName, Namespace: Namespace}, &corev1.Secret{})
12261226
}, 30*time.Second, 2*time.Second).Should(Succeed())
12271227

1228+
// ----------------------------------------------------------------
1229+
// Test workaround for the RHOAIENG-24545 - we need to manually modify
1230+
// the workbench so that the expected resource is mounted properly
1231+
// kubeflow-resource-stopped: '2025-06-25T13:53:46Z'
1232+
By("Running the workaround for RHOAIENG-24545")
1233+
notebook.Spec.Template.Spec.ServiceAccountName = "foo"
1234+
Expect(cli.Update(ctx, notebook)).Should(Succeed())
1235+
// end of workaround
1236+
// ----------------------------------------------------------------
1237+
12281238
By("Waiting and validating for volumeMount 'elyra-dsp-details' to be injected into the Notebook")
12291239
Eventually(func() bool {
12301240
var refreshed nbv1.Notebook

components/odh-notebook-controller/controllers/notebook_runtime_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,16 @@ var _ = Describe("Runtime images ConfigMap should be mounted", func() {
363363
Expect(configMap.GetName()).To(Equal(RuntimeImagesCMName))
364364
Expect(configMap.Data).To(Equal(testCase.expectedConfigMapData))
365365

366+
// ----------------------------------------------------------------
367+
// Test workaround for the RHOAIENG-24545 - we need to manually modify
368+
// the workbench so that the expected resource is mounted properly
369+
// kubeflow-resource-stopped: '2025-06-25T13:53:46Z'
370+
By("Running the workaround for RHOAIENG-24545")
371+
notebook.Spec.Template.Spec.ServiceAccountName = "foo"
372+
Expect(cli.Update(ctx, notebook)).Should(Succeed())
373+
// end of workaround
374+
// ----------------------------------------------------------------
375+
366376
// Check volumeMounts
367377
By("Fetching the created Notebook CR as typed object and volumeMounts check")
368378
typedNotebook := &nbv1.Notebook{}

components/odh-notebook-controller/controllers/notebook_webhook.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,6 @@ func (w *NotebookWebhook) maybeRestartRunningNotebook(ctx context.Context, req a
490490
return mutatedNotebook, NoPendingUpdates, nil
491491
}
492492

493-
// If generation is 1, allow updates on initial generation of the notebook CR
494-
if updatedNotebook.GetGeneration() == 1 {
495-
log.Info("Not blocking update, this is the initial generation of the Notebook")
496-
return mutatedNotebook, NoPendingUpdates, nil
497-
}
498-
499493
// Now we know we have to block the update
500494
// Keep the old values and mark the Notebook as UpdatesPending
501495
diff := getStructDiff(ctx, mutatedNotebook.Spec.Template.Spec, updatedNotebook.Spec.Template.Spec)

0 commit comments

Comments
 (0)