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

   ### What changes were proposed in this PR?
   
   The leading segment of a versioned-resource logical path was plural while 
every name it refers to is singular — the backing tables (`dataset`, `model`), 
the dashboard search's resource type, and the hub's entity type. This makes the
   prefix match them.
   
   ```
   Before:  /datasets/[email protected]/twitter/v1/f.csv     table: dataset
            /models/[email protected]/resnet/v1/w.pt         table: model
   After:   /dataset/[email protected]/twitter/v1/f.csv      table: dataset
            /model/[email protected]/resnet/v1/w.pt          table: model
   ```
   
   | Layer | Change |
   | --- | --- |
   | Enums | `ResourceType` in Scala (`Datasets`/`Models` → `Dataset`/`Model`), 
TypeScript (`Datasets` → `Dataset`), Python (`DATASETS` → `DATASET`) |
   | Call sites | `FileResolver`, `FileListerSourceOpExec`, `DatasetResource`, 
`DatasetFileNode`, `dataset-selection-modal`, `dataset_file_document` |
   | Migration | `36.sql`, edited in place |
   | Examples | the two shipped `bin/single-node/examples/workflows/*.json` 
carried the plural prefix |
   
   
   
   **On editing `36.sql` in place.** That migration introduced the prefix and 
is not in any released version, so it is corrected rather than followed by a 
second migration. It now normalizes two cases instead of one:
   
   | Stored value | Action |
   | --- | --- |
   | `/[email protected]/ds/v1/f.csv` (unprefixed legacy) | prepend `dataset`, when 
the first two segments match a real `(user.email, dataset.name)` pair |
   | `/datasets/...`, `/models/...` (plural prefix) | rewrite the leading 
segment |
   | `/dataset/...`, `/model/...` | already current — untouched |
   
   
   
   ### Any related issues, documentation, discussions?
   
   Additional work on #6495, which introduced the resource-type prefix.
   
   ### How was this PR tested?
   
   Existing suites, updated where they pin the path form.
   
   ```bash
   sbt "WorkflowCore/testOnly org.apache.texera.amber.storage.FileResolverSpec" 
\
       "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.source.dataset.FileListerSourceOpExecSpec" \
       "FileService/testOnly 
org.apache.texera.service.type.DatasetFileNodeSpec" \
       "WorkflowExecutionService/testOnly 
org.apache.texera.web.resource.dashboard.DatasetSearchQueryBuilderSpec 
org.apache.texera.web.resource.dashboard.DashboardResourceSpec 
org.apache.texera.web.resource.dashboard.UnifiedResourceSchemaSpec 
org.apache.texera.web.resource.dashboard.hub.HubResourceSpec 
org.apache.texera.web.resource.dashboard.user.workflow.WorkflowExecutionsResourceSpec
 org.apache.texera.web.resource.dashboard.file.DatasetResourceSpec"
   ```
   
   ```bash
   pytest amber/src/test/python/pytexera/storage/test_dataset_file_document.py
   ```
   
   ```bash
   cd frontend && yarn ng test --watch=false 
--include='**/datasetVersionFileTree.spec.ts' 
--include='**/dataset-selection-modal.component.spec.ts' 
--include='**/user-dataset-version-filetree.component.spec.ts' 
--include='**/dataset-detail.component.spec.ts'
   ```
   
   175 Scala tests, 31 pytest, 224 frontend tests, all passing.
   
   `sbt scalafmtCheckAll`, `ruff check`, `ruff format --check`, and `prettier 
--check`
   are clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to