Repository navigation
feat(dataset): allow datasets to have the same name across different users - #3715
Conversation
… UnifiedResourceSchema
… UnifiedResourceSchema
-updated queries in the UnifiedResourceSchema and DatasetSearchQueryBuilder - modified DatasetResource to handle the new repository_name field and adjusted LakeFS interactions accordingly. - changed dataset-related interfaces and components in the GUI to use datasetName instead of name for consistency. - updated SQL DDL scripts to rename the 'name' column to 'dataset_name' and added 'repository_name' to the dataset table. - created a migration script to update existing database entries to the new schema.
|
@AnzhiZhang Please summarize the final design (after our internal discussion) and give an overview of the changes. See if we can split the PR into smaller PRs. |
|
@chenlica Updated. Tests have not been added yet. Should I add some tests? |
|
The PR should include test cases. |
There was a problem hiding this comment.
Pull Request Overview
This PR implements support for datasets with identical names across different users by introducing repository-based storage. Each dataset now uses a unique repository name (dataset-{did}) for storage while maintaining user-visible names, allowing multiple users to have datasets with the same display name.
- Adds
repository_namecolumn to dataset table and uses formatdataset-{did}for unique identification - Updates LakeFS and S3 storage operations to use repository names instead of dataset names
- Modifies multipart upload API to include
ownerEmailparameter for dataset identification - Refactors
LakeFSStorageClientto expose repository name validation
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/k8s/texera-helmchart/files/texera_ddl.sql | Adds repository_name column to dataset table schema |
| core/scripts/sql/updates/13.sql | Database migration script to add repository_name column and populate from existing names |
| core/scripts/sql/texera_ddl.sql | Updates main DDL with repository_name column |
| core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/util/LakeFSStorageClient.scala | Extracts repository name validation into separate method |
| core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/model/OnDataset.scala | Changes interface method from getDatasetName() to getRepositoryName() |
| core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/model/DatasetFileDocument.scala | Updates to use repository names in LakeFS operations |
| core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/FileResolver.scala | Updates URI format comments and variable names |
| core/gui/src/app/dashboard/service/user/dataset/dataset.service.ts | Adds ownerEmail parameter to multipart upload methods |
| core/gui/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts | Updates component to pass owner email to upload services |
| core/file-service/src/main/scala/edu/uci/ics/texera/service/resource/DatasetResource.scala | Major refactoring to use repository names and owner-based dataset identification |
| core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/HubResource.scala | Updates to use repository names for storage operations |
| core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala | Adds repository_name and isDatasetDownloadable fields to unified schema |
| core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala | Updates to use repository names and improves error logging |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
bobbai00
left a comment
There was a problem hiding this comment.
Left some minor comments, generally looks very good
|
@AnzhiZhang It will be good to divide this PR to smaller PRs. I think it's doable. If needed, please schedule a call with me and @bobbai00 to discuss. |
# Conflicts: # core/gui/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts
bobbai00
left a comment
There was a problem hiding this comment.
Left some minor comments. overall it is in a good shape!
|
@AnzhiZhang After all comments by @bobbai00 and @aicam are taken care of, I will approve this PR. |
chenlica
left a comment
There was a problem hiding this comment.
LGTM after many iterations :-)
…users (apache#3715) resolves apache#3683 The detailed design is described here apache#3683 (comment) Changes of this PR: 1. Added a column `repository_name` in the dataset table. 2. Use the generated repository name to store datasets in LakeFS and S3, whose format is `dataset-{did}` 3. Apply relevant changes to the code to reflect the above changes. a. Use the repository name in LakeFS interfaces. b. Update web application service queries. c. Update `FileResolver`. 4. Update the interface `/multipart-upload` of the dataset resource. Add a new parameter `ownerEmail` since the dataset name is no longer globally unique. 5. Add related test cases for the new feature. --------- Co-authored-by: ali risheh <ali.risheh876@gmail.com>
…users (apache#3715) resolves apache#3683 The detailed design is described here apache#3683 (comment) Changes of this PR: 1. Added a column `repository_name` in the dataset table. 2. Use the generated repository name to store datasets in LakeFS and S3, whose format is `dataset-{did}` 3. Apply relevant changes to the code to reflect the above changes. a. Use the repository name in LakeFS interfaces. b. Update web application service queries. c. Update `FileResolver`. 4. Update the interface `/multipart-upload` of the dataset resource. Add a new parameter `ownerEmail` since the dataset name is no longer globally unique. 5. Add related test cases for the new feature. --------- Co-authored-by: ali risheh <ali.risheh876@gmail.com>
resolves #3683
The detailed design is described here #3683 (comment)
Changes of this PR:
repository_namein the dataset table.dataset-{did}a. Use the repository name in LakeFS interfaces.
b. Update web application service queries.
c. Update
FileResolver./multipart-uploadof the dataset resource. Add a new parameterownerEmailsince the dataset name is no longer globally unique.