You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "zyratlo (via GitHub)" <gi...@apache.org> on 2026/08/19 22:38:40 UTC

[PR] refactor(python-notebook-migration): key the notebook mapping to the workflow's own version instead of a hardcoded vid=1 [texera]

zyratlo opened a new pull request, #7791:
URL: https://github.com/apache/texera/pull/7791

   ### What changes were proposed in this PR?
   This PR resolves the real version ID of a workflow instead of the constant, and makes the fetch version-agnostic so a mapping keeps reattaching after the workflow's version advances. `notebook.wid` is UNIQUE (one notebook per workflow) and the fetch join is on `wid + nid`, so keying on `wid` alone is sufficient and correct.
   
   **`NotebookMigrationResource` (store resolves the version, fetch drops the vid filter)**
   - Store no longer reads a vid from the request. It resolves the mapping's vid server-side as `MAX(workflow_version.vid)` for the wid, anchoring the mapping to the workflow's own latest version rather than a client-supplied value. If the workflow has no version to anchor to, it returns a 400 before any insert instead of a 500 from the FK.
   - Fetch no longer reads a vid or filters the query by it, so the stored mapping still resolves after the workflow advances to a newer version.
   - Adds a future-work note at the fetch query: supporting one notebook per workflow version would mean dropping the `notebook.wid` UNIQUE constraint and re-adding a vid filter (falling back to the latest), since without it a multi-notebook workflow would silently return only the newest.
   
   **`NotebookMigrationService` (frontend store)**
   - `storeNotebookAndMapping` drops its `vid` parameter and stops sending `vid` in the request body. The version is now resolved by the backend.
   
   **`JupyterPanelService` (frontend fetch)**
   - `fetchNotebookAndMapping` drops its `vId` parameter and the `vid` field from the request body, along with the stale "Future work: add dynamic fetching of current workflow vId" comment. The panel reattaches by wid.
   
   ### Any related issues, documentation, discussions?
   Closes #7636
   Parent issue #4301
   
   ### How was this PR tested?
   Added tests in 
   - `NotebookMigrationResourceSpec.scala`
   - `notebook-migration.service.spec.ts`
   - `jupyter-panel.service.spec.ts`
   
   Also manually verified on local development environment.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   Generated-by: Claude Code (Claude Opus 4.8)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(python-notebook-migration): key the notebook mapping to the workflow's own version instead of a hardcoded vid=1 [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #7791:
URL: https://github.com/apache/texera/pull/7791


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(python-notebook-migration): key the notebook mapping to the workflow's own version instead of a hardcoded vid=1 [texera]

Posted by "zyratlo (via GitHub)" <gi...@apache.org>.
zyratlo commented on PR #7791:
URL: https://github.com/apache/texera/pull/7791#issuecomment-5349106846

   This PR also folds in a small unrelated cleanup [effabc3](https://github.com/apache/texera/pull/7791/commits/effabc35574093474b113906d589d00145d9c67b): it removes the dead `JupyterPanelService.openPanel`. mengw15 flagged it (https://github.com/apache/texera/pull/7741#pullrequestreview-4977465264). The method lost its only production caller when #7571 removed the toolbar import branch, and its comment still described that flow, which no longer exists. Since this PR already touches `jupyter-panel.service.ts`, it was a convenient place to land the cleanup. The `jupyterNotebookExists` toolbar signal is still set on the normal path in `init()`, so no behavior is lost.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(python-notebook-migration): key the notebook mapping to the workflow's own version instead of a hardcoded vid=1 [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7791:
URL: https://github.com/apache/texera/pull/7791#issuecomment-5348869558

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7791?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 91.25%. Comparing base ([`c927890`](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`067d5cd`](https://app.codecov.io/gh/apache/texera/commit/067d5cd0dd45af2de564e320e71de49c7b52dfa4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :white_check_mark: All tests successful. No failed tests found.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #7791      +/-   ##
   ============================================
   - Coverage     91.25%   91.25%   -0.01%     
     Complexity     4471     4471              
   ============================================
     Files          1171     1171              
     Lines         47124    47118       -6     
     Branches       5286     5283       -3     
   ============================================
   - Hits          43003    42997       -6     
     Misses         2447     2447              
     Partials       1674     1674              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.62% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.02% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.67% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.73% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.90% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `92.63% <ø> (-0.01%)` | :arrow_down: | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.50% <ø> (-0.25%)` | :arrow_down: | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.57% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/7791/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/7791?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(python-notebook-migration): key the notebook mapping to the workflow's own version instead of a hardcoded vid=1 [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7791:
URL: https://github.com/apache/texera/pull/7791#issuecomment-5348843284

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - No candidates found from `git blame` history.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(python-notebook-migration): key the notebook mapping to the workflow's own version instead of a hardcoded vid=1 [texera]

Posted by "zyratlo (via GitHub)" <gi...@apache.org>.
zyratlo commented on PR #7791:
URL: https://github.com/apache/texera/pull/7791#issuecomment-5349212912

   /request-review @mengw15 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org