feat(python-notebook-migration): add notebook-migration-service microservice in backend#5258
Draft
zyratlo wants to merge 7 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5258 +/- ##
============================================
- Coverage 52.95% 52.94% -0.01%
- Complexity 2627 2630 +3
============================================
Files 1090 1090
Lines 42210 42210
Branches 4534 4534
============================================
- Hits 22353 22350 -3
- Misses 18546 18548 +2
- Partials 1311 1312 +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:
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 405 | 0.247 | 23,413/36,190/36,190 us | 🔴 +9.3% / ⚪ within ±5% |
| 🔴 | bs=100 sw=10 sl=64 | 920 | 0.562 | 113,140/143,208/143,208 us | 🔴 +19.6% / ⚪ within ±5% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,099 | 0.671 | 909,583/949,827/949,827 us | ⚪ within ±5% / 🟢 -7.2% |
Baseline details
Latest main 891d2ad from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 405 tuples/sec | 434 tuples/sec | 410.82 tuples/sec | -6.7% | -1.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.247 MB/s | 0.265 MB/s | 0.251 MB/s | -6.8% | -1.5% |
| bs=10 sw=10 sl=64 | p50 | 23,413 us | 21,414 us | 23,785 us | +9.3% | -1.6% |
| bs=10 sw=10 sl=64 | p95 | 36,190 us | 33,824 us | 34,980 us | +7.0% | +3.5% |
| bs=10 sw=10 sl=64 | p99 | 36,190 us | 33,824 us | 34,980 us | +7.0% | +3.5% |
| bs=100 sw=10 sl=64 | throughput | 920 tuples/sec | 971 tuples/sec | 891.94 tuples/sec | -5.3% | +3.1% |
| bs=100 sw=10 sl=64 | MB/s | 0.562 MB/s | 0.593 MB/s | 0.544 MB/s | -5.2% | +3.2% |
| bs=100 sw=10 sl=64 | p50 | 113,140 us | 102,487 us | 112,277 us | +10.4% | +0.8% |
| bs=100 sw=10 sl=64 | p95 | 143,208 us | 119,696 us | 139,802 us | +19.6% | +2.4% |
| bs=100 sw=10 sl=64 | p99 | 143,208 us | 119,696 us | 139,802 us | +19.6% | +2.4% |
| bs=1000 sw=10 sl=64 | throughput | 1,099 tuples/sec | 1,085 tuples/sec | 1,041 tuples/sec | +1.3% | +5.6% |
| bs=1000 sw=10 sl=64 | MB/s | 0.671 MB/s | 0.663 MB/s | 0.635 MB/s | +1.2% | +5.6% |
| bs=1000 sw=10 sl=64 | p50 | 909,583 us | 919,939 us | 972,714 us | -1.1% | -6.5% |
| bs=1000 sw=10 sl=64 | p95 | 949,827 us | 967,952 us | 1,023,057 us | -1.9% | -7.2% |
| bs=1000 sw=10 sl=64 | p99 | 949,827 us | 967,952 us | 1,023,057 us | -1.9% | -7.2% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,493.24,200,128000,405,0.247,23412.50,36190.37,36190.37
1,100,10,64,20,2173.26,2000,1280000,920,0.562,113139.63,143207.60,143207.60
2,1000,10,64,20,18194.27,20000,12800000,1099,0.671,909583.22,949827.03,949827.03
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?
Introduces the microservice that mediates between Texera and the JupyterLab docker stack landed in
migration-tool-jupyter-docker. Adds a new SBT subprojectnotebook-migration-serviceplus shared config and a frontend dev-proxy route.New SBT subproject
notebook-migration-service/:build.sbtandproject/build.properties— module SBT setup; module depends on the existingAuth,Config, andDAOprojectssrc/main/scala/.../NotebookMigrationService.scala— DropwizardApplicationentry point; sets Jersey URL pattern to/api/*, registers the resource class, initializes the shared SQL connection viaSqlServer.initConnection(StorageConfig.jdbcUrl, …), and wires inRequestLoggingFilter.src/main/scala/.../NotebookMigrationServiceConfiguration.scala— DropwizardConfigurationsubclass.src/main/scala/.../resource/NotebookMigrationResource.scala— five REST endpoints under/notebook-migration:GET /get-jupyter-url— health-checks the Jupyter container and returns its base URL.GET /get-jupyter-iframe-url— returns the iframe-ready URL fornotebook.ipynb.POST /set-notebook— receives a notebook JSON, PUTs it into JupyterLab via its/api/contents/work/{name}API.POST /store-notebook-and-mapping— persists a notebook + workflow-notebook mapping into Postgres in a single transaction (writes to thenotebookandworkflow_notebook_mappingtables added bymigration-tool-database-tables).POST /fetch-notebook-and-mapping— returns the most recent notebook + mapping for a given (wid, vid).src/main/resources/logback.xml— logging config.src/main/resources/notebook-migration-service-web-config.yaml— Dropwizard server config (HTTP port9098, DB connection refs).Root build wiring:
build.sbt— declares the newNotebookMigrationServiceSBT subproject and adds it to theTexeraProjectaggregation.Shared config:
common/config/src/main/resources/storage.conf— newjupyter { url = "http://localhost:9100" }block, overridable viaSTORAGE_JUPYTER_URL.common/config/src/main/scala/.../StorageConfig.scala— adds thejupyterURLaccessor.Frontend dev proxy:
frontend/proxy.config.json— routes/api/notebook-migration/*tohttp://localhost:9098.Any related issues, documentation, discussions?
Closes #5257
Parent issue #4301
migration-tool-database-tablesfeat(python-notebook-migration): add database tables for Notebook Migration tool #5055 — the resource imports jOOQ-generatedNotebook/WorkflowNotebookMappingclasses that only exist once the schema PR is merged.migration-tool-jupyter-dockeris whatStorageConfig.jupyterURLpoints to. Without it running, the Jupyter-related endpoints return a 500 with"Cannot connect to Jupyter server". Service still starts and the DB-persistence endpoints work in isolation.How was this PR tested?
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)