Skip to content

feat(dataset): allow datasets to have the same name across different users - #3715

Merged
bobbai00 merged 32 commits into
apache:mainfrom
AnzhiZhang:3683
Oct 3, 2025
Merged

bobbai00 merged 32 commits into
apache:mainfrom
AnzhiZhang:3683

Conversation

@AnzhiZhang

@AnzhiZhang AnzhiZhang commented Sep 4, 2025 •

Copy link
Copy Markdown
Contributor

resolves #3683

The detailed design is described here #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.

-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.
@chenlica

chenlica commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

@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.

@AnzhiZhang

Copy link
Copy Markdown
Contributor Author

@chenlica Updated. Tests have not been added yet. Should I add some tests?

@chenlica

chenlica commented Sep 6, 2025

Copy link
Copy Markdown
Contributor

The PR should include test cases.

@AnzhiZhang
AnzhiZhang marked this pull request as ready for review September 8, 2025 18:36
Copilot AI review requested due to automatic review settings September 8, 2025 18:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_name column to dataset table and uses format dataset-{did} for unique identification
  • Updates LakeFS and S3 storage operations to use repository names instead of dataset names
  • Modifies multipart upload API to include ownerEmail parameter for dataset identification
  • Refactors LakeFSStorageClient to 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.

Comment thread core/scripts/sql/updates/13.sql Resolved
@AnzhiZhang

Copy link
Copy Markdown
Contributor Author

Parts of this PR are opened in #3723 and #3724. Once they are merged, these changes should disappear from here.

@bobbai00 bobbai00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments, generally looks very good

@chenlica

Copy link
Copy Markdown
Contributor

@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.

@AnzhiZhang
AnzhiZhang marked this pull request as draft September 13, 2025 00:50
# Conflicts:
#	core/gui/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.ts

@bobbai00 bobbai00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments. overall it is in a good shape!

@chenlica

chenlica commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

@AnzhiZhang After all comments by @bobbai00 and @aicam are taken care of, I will approve this PR.

@chenlica chenlica left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after many iterations :-)

@bobbai00 bobbai00 changed the title feat: allow datasets with the same name across different users feat(dataset): allow datasets with the same name across different users Oct 3, 2025
@bobbai00 bobbai00 changed the title feat(dataset): allow datasets with the same name across different users feat(dataset): allow datasets to have the same name across different users Oct 3, 2025
@bobbai00
bobbai00 merged commit 989e4d0 into apache:main Oct 3, 2025
@AnzhiZhang
AnzhiZhang deleted the 3683 branch October 3, 2025 08:05
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
…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>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dataset creation fails if the same name is already used by another dataset

5 participants