Repository navigation
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
Author
|
/request-review @mengw15 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9578 +/- ##
=========================================
Coverage 91.57% 91.57%
Complexity 5158 5158
=========================================
Files 1300 1300
Lines 58092 58131 +39
Branches 7615 7626 +11
=========================================
+ Hits 53195 53235 +40
Misses 2959 2959
+ Partials 1938 1937 -1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
The import modal decides which prompts a conversion uses from where the user uploads: the Python Notebook / R Notebook switch on the Jupyter Notebook tab, or the Python File, Python Folder, R File and R Folder tabs. Until now only one mismatch was checked, and its message could point users to the wrong place. An R notebook uploaded as a Python Notebook went through to the Python prompts and came back as a workflow of broken Python UDFs.
Mismatch checks. The dashboard now checks every upload against the selected language before any model call:
metadata.kernelspec.language, falling back tometadata.language_info.name, ignoring case and surrounding spaces. A notebook that declares neither is accepted as before.parseFolderand its existing checks.When the right place is an R option and R is not enabled on the deployment, the message says so instead of pointing at a disabled control, for example "This notebook uses an R kernel, and R is not enabled on this deployment." The checks are driven by the per language table the dispatch already used, now extended with each language's kernel name, notebook type and tab names, so a later language gets them without new branches.
Script read errors.
parseScriptFiletakes the language, so an empty or unreadable R file is reported as "The R file is empty." or "Failed to read the R file." rather than naming Python.Error duration. Migration errors now stay on screen for 8 seconds instead of ng-zorro's default 3, since most of them are two sentences of instructions. Errors elsewhere in the app keep the default.
Demo video
https://drive.google.com/file/d/1BkMJHuZqcvIPArxia73Dtqp3th-_y2kn/view?usp=sharing
Any related issues, documentation, discussions?
Closes #8929
Parent-issue #4301
How was this PR tested?
user-workflow.component.spec.ts, a new "language mismatches" block of 14 tests covering every row above: R and Python notebooks on the wrong type with R on and off, case and spacing in the declared language, thelanguage_infofallback, an unsupported kernel on both types with the right article, R and Python files on the wrong tab with R on and off, an unknown extension, folders in either direction with R on and off, and a mixed folder and a folder with no source both reachingparseFolder. Existing assertions were updated to the new wording and to expect the 8 second duration, and the R folder test from feat(notebook-migration): add r folders to the import modal #9427 now sends R files.notebook-migration.service.spec.ts: the exact Python and R messages fromparseScriptFile.The full frontend suite passes, and every new line and branch is covered.
Checked against a local stack by driving the modal's own upload and submit with files carrying the mock inputs' kernels, extensions and folder paths. With R off, the four R uploads on Python options each showed the R is not enabled message. With R on, all seven mismatches showed the messages above, and a matching R notebook passed the checks and went on to the model call. No mismatch made a model request. An error toast stayed visible for about 9 seconds, the 8 second duration plus its fade out.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)