Skip to content

Conversation

@henschwartz
Copy link

@henschwartz henschwartz commented Sep 29, 2025

migrate VWA test workflows from kubeflow/kubeflow to notebooks-v1

Copy link
Contributor

@andyatmiami andyatmiami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henschwartz - I would encourage you to reach out to @liavweiss and/or @yehudit1987 to get a better sense of expected changes for this work.

I'm not yet going to do a deep review on the code - as they should be able to help out to get this is better shape for an initial review.

In general - the following areas need improved:

  • ensure kubeflow/notebooks (not kubeflow/kubeflow listed as part of the container registry
  • ensure the branches: config lists the following:
    • main (not master)
    • notebooks-v1
    • 'v*-branch'
  • ensure files added to this PR have valid content
    • I'm seeing numerous "empty files" which I am guessing was unintentional

Getting clean GHA check results for these workloads on your fork would likely highlight these shortcomings - so I encourage you to look into that. I am happy to help if you want to talk about how to accomplish that.

@henschwartz henschwartz marked this pull request as draft September 30, 2025 08:25
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch 2 times, most recently from 1d54153 to c363d91 Compare September 30, 2025 10:28
@google-oss-prow google-oss-prow bot added size/XL and removed size/L labels Sep 30, 2025
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch from c363d91 to c0cf955 Compare September 30, 2025 12:44
@google-oss-prow google-oss-prow bot added size/L and removed size/XL labels Sep 30, 2025
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch 3 times, most recently from e5437dd to 2ac78c1 Compare September 30, 2025 14:22
@google-oss-prow google-oss-prow bot added area/backend area - related to backend components area/frontend area - related to frontend components area/v1 area - version - kubeflow notebooks v1 labels Sep 30, 2025
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch 3 times, most recently from 515fd68 to 93bccd1 Compare September 30, 2025 15:53
Copy link
Contributor

@andyatmiami andyatmiami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your continued work on this PR... getting closer to having something in desired shape to get this merged! 💯

In addition to the comments I have raised on specific lines throughout the PR - please rebase your changes off the latest notebooks-v1 branch so the testing/gh-actions files can be "picked up" from the notebooks-v1 branch now that they are available.

@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch from 93bccd1 to cdce3cc Compare October 16, 2025 12:13
@google-oss-prow google-oss-prow bot added area/controller area - related to controller components area/server-images area - related to the notebook server images labels Oct 16, 2025
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch from a8b02de to e4362e9 Compare October 19, 2025 09:32
@henschwartz
Copy link
Author

henschwartz commented Oct 19, 2025

Hi @andyatmiami, one issue that I saw during the tests was "Error: Cannot access 'CookieJar.SetCookieOptions' because 'CookieJar' is a type, but not a namespace", it caused by a third-party type definition package (@types/request version 2.48.12) that contains incorrect TypeScript definitions . This package is pulled in as a transitive dependency through our project's dependency chain, even though we don't directly use the request library. I tried also to downgrade to 2.48.5 version but the issue was still there... I added the "skipLibCheck" into tsconfig.json file that it will skip type checking in declaration files in node_modules which passes the issue from above... I am still trying to find an elegant way to handle this issue but i would love if you can assist as well...

@andyatmiami
Copy link
Contributor

/ok-to-test

"dom",
"es2019"
],
"skipLibCheck": true,
Copy link
Contributor

@andyatmiami andyatmiami Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, please keep in mind.. I am NOT any type of "Typescript expert" - so I can understand/appreciate why this "skipLibCheck": true was added to avoid the following error:

Cannot access 'CookieJar.SetCookieOptions' because 'CookieJar' is a type, but not a namespace. Did you mean to retrieve the type of the property 'SetCookieOptions' in 'CookieJar' with 'CookieJar["SetCookieOptions"]'?

The update to [email protected] seems to cause this deviant behavior - and I got intrigued to understand why the similar #627 PR did not encounter this issue.

As it turns out - for reasons unclear - at some point in the past - an explicit dependency was added to TWA frontend/package.json for tough-cookie: ~4.1.3... and it seems that bypasses the issue . So that could (maybe) be another alternative here (?)

Other options like upgrading "@kubernetes/client-node" to a later version concern me w.r.t. potentially dealing with myriad of other upgrade issues 😒

$ npm ls @types/request
[email protected] /Users/astonebe/Development/Code/GitHub/kubeflow-notebooks/components/crud-web-apps/volumes/frontend
└─┬ @kubernetes/[email protected]
  └── @types/[email protected]
  • latest version of @types/request is only 2.48.13 so unclear if it would make a difference.. but apparently requires TypeScript 5.1+ (we are using TS 4.7)

But the solution implemented here (based on my limited understanding) also seems reasonable to be clear!

@kimwnasptd - thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My Plan A would be to actually upgrade @kubernetes/client-node, as this package is only used for importing K8s type definitions:

cd components/crud-web-apps/volumes/frontend/src
grep -ri kubernetes/client-node
app/pages/volume-details-page/yaml/yaml.component.ts:import { V1PersistentVolumeClaim } from '@kubernetes/client-node';
app/pages/volume-details-page/events/events.component.ts:import { V1PersistentVolumeClaim } from '@kubernetes/client-node';
app/pages/volume-details-page/volume-details-page.component.ts:import { V1PersistentVolumeClaim } from '@kubernetes/client-node';
app/pages/volume-details-page/overview/pods-mock.ts:import { V1Pod } from '@kubernetes/client-node';
app/pages/volume-details-page/overview/overview.component.ts:import { V1PersistentVolumeClaim, V1Pod } from '@kubernetes/client-node';
app/pages/volume-details-page/pvc-mock.ts:import { V1PersistentVolumeClaim } from '@kubernetes/client-node';
app/types/backend.ts:import { V1PersistentVolumeClaim, V1Pod } from '@kubernetes/client-node';
app/types/event.ts:import { EventsV1Event } from '@kubernetes/client-node';
app/services/backend.service.ts:import { V1PersistentVolumeClaim, V1Pod } from '@kubernetes/client-node';

That being said, I've tried updating it to 0.17.0, 0.18.0 and 0.19.0 and it always complains for some declaration or another. Will try a bit more combinations and come back

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in the end I gave up with bumping the @kubernetes/client-node package as I was getting the above complaints.

The interesting part though is that afterwards I tried to add "tough-cookie": "~4.1.3", to VWA, but then I'm getting the same error with bumping the K8s package 🤔

 => [frontend 11/12] COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/                                     0.1s
 => ERROR [frontend 12/12] RUN npm run build -- --output-path=./dist/default --configuration=production                                22.4s
------
 > [frontend 12/12] RUN npm run build -- --output-path=./dist/default --configuration=production:
0.325
0.325 > [email protected] build
0.325 > npm run copyLibAssets && ng build --base-href /volumes/ --deploy-url static/ --output-path=./dist/default --configuration=production
0.325
0.463
0.463 > [email protected] copyLibAssets
0.463 > cp -r ./node_modules/kubeflow/assets/* ./src/assets/
0.463
1.247 Option "deployUrl" is deprecated: Use "baseHref" option, "APP_BASE_HREF" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url.
1.504 - Generating browser application bundles (phase: setup)...
20.90 ✔ Browser application bundle generation complete.
21.78 ✔ Browser application bundle generation complete.
21.78
21.78 Warning: '/src/node_modules/kubeflow/styles/styles.scss' imports '~material-icons/iconfont/material-icons.scss' with a tilde. Usage of '~' in imports is deprecated.
21.78
21.78
21.78
21.78 Error: node_modules/@types/ws/index.d.ts:334:18 - error TS2315: Type 'Server' is not generic.
21.78
21.78 334         server?: HTTPServer<V> | HTTPSServer<V> | undefined;
21.78                      ~~~~~~~~~~~~~
21.78
21.78
21.78 Error: node_modules/@types/ws/index.d.ts:334:34 - error TS2315: Type 'Server' is not generic.
21.78
21.78 334         server?: HTTPServer<V> | HTTPSServer<V> | undefined;
21.78                                      ~~~~~~~~~~~~~~
21.78
21.78
21.78
------

Copy link
Member

@kimwnasptd kimwnasptd Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I managed to update the version of the @kubernetes/client-node to v0.19.0 and also had to add "@types/ws": "8.5.4", to avoid the above error with the HTTPSServer<V>.

But then I hit again the issue of the CookieJar.SetCookieOptions.

So my proposal would be to:

  1. Pin "cypress": "14.1.0",
  2. Add "tough-cookie": "4.1.3",
  3. Not to mess with the skipLibCheck setting in tsconfig.json

In general I'm not much in favour of pinning packages, but for this one, considering that we need to do a bump in a lot of other dependencies (node, Angular) I'd be OK in pinning to ensure reproducible builds as much as possible.

Copy link
Contributor

@andyatmiami andyatmiami Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense @kimwnasptd ... the focus HERE with these PRs is just getting notebooks-v1 branch in a build-able state.

I would expect a FAST FOLLOW once we hit that milestone to then turn attention to getting up compliant and in good standing for CNCF graduation... and addressing outstanding CVEs in notebooks-v1 is unavoidably going to require I'm guessing SIGNIFICANT version upgrades - so your proposal here (which I agree with) then becomes only a transient state .

Signed-off-by: Hen Schwartz (EXT-Nokia) <[email protected]>
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch from e4362e9 to 91abd35 Compare October 26, 2025 16:55
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch 2 times, most recently from b42ddfd to abc7ead Compare October 26, 2025 17:20
@henschwartz henschwartz force-pushed the migrate-vwa-workflows-clean branch from abc7ead to 1f873eb Compare October 27, 2025 09:34
@henschwartz henschwartz marked this pull request as ready for review October 28, 2025 06:23
@google-oss-prow google-oss-prow bot requested a review from elenzio9 October 28, 2025 06:23
Copy link
Contributor

@andyatmiami andyatmiami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks for all this work @henschwartz - appreciate your responsiveness and diligence in working through issues in this PR as it was way more of a head-scratcher than originally intended/assumed!

I'm comfortable with the changes and have verified the workflows behave as expected.

Tested on my fork:

image

@google-oss-prow google-oss-prow bot added the lgtm label Oct 28, 2025
@kimwnasptd
Copy link
Member

I second every word from @andyatmiami above, thanks for the amazing work @henschwartz!

/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kimwnasptd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit b8e44ca into kubeflow:notebooks-v1 Oct 28, 2025
32 of 33 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Kubeflow Notebooks Oct 28, 2025
@henschwartz
Copy link
Author

thank you @andyatmiami @kimwnasptd !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved area/backend area - related to backend components area/ci area - related to ci area/controller area - related to controller components area/frontend area - related to frontend components area/server-images area - related to the notebook server images area/v1 area - version - kubeflow notebooks v1 lgtm ok-to-test size/XL

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants