Skip to content

feat(dataset): link contributors to user accounts via placeholder accounts - #7280

Merged
xuang7 merged 5 commits into
apache:mainfrom
xuang7:feat/dataset-contributor-user-linking
Aug 3, 2026
Merged

xuang7 merged 5 commits into
apache:mainfrom
xuang7:feat/dataset-contributor-user-linking

Conversation

@xuang7

@xuang7 xuang7 commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

This PR links dataset contributors to user accounts by email, so a contributor can later own their contributions with a real account. Follow-up to #6952 (backend) and #6953 (frontend).

Changes:

  • When a contributor has an email, it is matched to a user account, ignoring case. If no account exists yet, a placeholder account is created for that email; saving the list again reuses it.
  • When someone later registers with that email (locally or via Google), they take over the placeholder. The account keeps its uid, so existing contributor links keep working. It still needs admin approval before it can log in and do anything, and an account that already has a password or Google login can never be taken over.
  • Placeholder accounts cannot be granted access to workflows, datasets, projects, or computing units.
  • The admin user list shows which accounts are placeholders.
  • A contributor email must be well-formed, and two contributors of the same dataset cannot use the same email.
  • The migration adds the new column, foreign key, and indexes, removes duplicate emails already in the data, and links existing contributors to registered users.

Design notes:

  • Emails are optional for contributors, so updates keep replacing the whole list.
  • Emails are stored as typed but always compared case-insensitively. Lower-casing them in storage, and reusing the new EmailUtil in the two older email checks, are left as follow-ups.

Demo

First, the dataset owner adds a contributor whose email is not associated with an existing user account.

add-contributor

A placeholder user account is then created and displayed on the admin user page.

place-holder

The contributor can claim the placeholder account by registering with the same email address through local or Google sign-in.

claim-account

After the account is claimed, the updated account information is shown on the admin user page.
account

after-claim

Any related issues, documentation, discussions?

Closes #6976
Related to #6926

How was this PR tested?

17 new ScalaTest cases covering linking (existing user, placeholder creation and reuse, no-email, invalid/duplicate email), claiming (uid preserved, INACTIVE kept, login after claim, credentialed accounts not claimable, taken username rejected, case-variant duplicate registration rejected), the placeholder grant guard in each of the four access resources, and the shared EmailUtil. The pre-existing AuthResource and access-resource tests still pass. Fresh-DDL and migrated schemas verified identical via pg_dump diff.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Fable 5)

@github-actions github-actions Bot added feature engine ddl-change Changes to the TexeraDB DDL common platform Non-amber Scala service paths labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @mengw15, @seongjinyoon, @PG1204
    You can notify them by mentioning @mengw15, @seongjinyoon, @PG1204 in a comment.

@codecov-commenter

codecov-commenter commented Aug 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.80328% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.90%. Comparing base (7f6402d) to head (7fd32d0).

Files with missing lines Patch % Lines
.../texera/web/resource/auth/GoogleAuthResource.scala 0.00% 3 Missing ⚠️
...dashboard/user/project/ProjectAccessResource.scala 75.00% 0 Missing and 1 partial ⚠️
...shboard/user/workflow/WorkflowAccessResource.scala 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7280      +/-   ##
============================================
- Coverage     83.03%   82.90%   -0.13%     
- Complexity     4107     4116       +9     
============================================
  Files          1165     1163       -2     
  Lines         46405    46327      -78     
  Branches       5171     5166       -5     
============================================
- Hits          38531    38408     -123     
- Misses         6171     6220      +49     
+ Partials       1703     1699       -4     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 83.65% <ø> (ø) Carriedforward from 8ad5f13
amber 80.03% <86.48%> (+0.03%) ⬆️
computing-unit-managing-service 43.60% <100.00%> (ø)
config-service 65.97% <ø> (ø)
file-service 69.05% <100.00%> (+1.31%) ⬆️
frontend 83.53% <ø> (-0.31%) ⬇️ Carriedforward from 8ad5f13
notebook-migration-service 78.89% <ø> (ø)
pyamber 97.31% <ø> (-0.02%) ⬇️ Carriedforward from 8ad5f13
workflow-compiling-service 26.31% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 0 better · 🔴 10 worse · ⚪ 5 noise (<±5%) · 0 without baseline

Compared against main 7f6402d benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 352 0.215 27,452/37,237/37,237 us 🔴 +21.5% / 🔴 +142.8%
🔴 bs=100 sw=10 sl=64 761 0.465 131,135/155,312/155,312 us 🔴 +15.1% / 🔴 +47.5%
⚪ bs=1000 sw=10 sl=64 898 0.548 1,110,757/1,209,020/1,209,020 us ⚪ within ±5% / 🔴 +20.6%
Baseline details

Latest main 7f6402d from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 352 tuples/sec 441 tuples/sec 791.9 tuples/sec -20.2% -55.5%
bs=10 sw=10 sl=64 MB/s 0.215 MB/s 0.269 MB/s 0.483 MB/s -20.1% -55.5%
bs=10 sw=10 sl=64 p50 27,452 us 22,589 us 12,391 us +21.5% +121.5%
bs=10 sw=10 sl=64 p95 37,237 us 34,537 us 15,336 us +7.8% +142.8%
bs=10 sw=10 sl=64 p99 37,237 us 34,537 us 18,924 us +7.8% +96.8%
bs=100 sw=10 sl=64 throughput 761 tuples/sec 819 tuples/sec 1,018 tuples/sec -7.1% -25.3%
bs=100 sw=10 sl=64 MB/s 0.465 MB/s 0.5 MB/s 0.622 MB/s -7.0% -25.2%
bs=100 sw=10 sl=64 p50 131,135 us 121,340 us 98,925 us +8.1% +32.6%
bs=100 sw=10 sl=64 p95 155,312 us 134,910 us 105,265 us +15.1% +47.5%
bs=100 sw=10 sl=64 p99 155,312 us 134,910 us 112,729 us +15.1% +37.8%
bs=1000 sw=10 sl=64 throughput 898 tuples/sec 925 tuples/sec 1,051 tuples/sec -2.9% -14.6%
bs=1000 sw=10 sl=64 MB/s 0.548 MB/s 0.564 MB/s 0.641 MB/s -2.8% -14.6%
bs=1000 sw=10 sl=64 p50 1,110,757 us 1,075,433 us 964,104 us +3.3% +15.2%
bs=1000 sw=10 sl=64 p95 1,209,020 us 1,152,145 us 1,002,343 us +4.9% +20.6%
bs=1000 sw=10 sl=64 p99 1,209,020 us 1,152,145 us 1,030,483 us +4.9% +17.3%
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,568.32,200,128000,352,0.215,27451.59,37237.29,37237.29
1,100,10,64,20,2626.58,2000,1280000,761,0.465,131135.35,155312.34,155312.34
2,1000,10,64,20,22272.69,20000,12800000,898,0.548,1110756.74,1209020.07,1209020.07

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

@aicam
aicam added this pull request to the merge queue Aug 3, 2026
@xuang7
xuang7 removed this pull request from the merge queue due to a manual request Aug 3, 2026
@xuang7
xuang7 added this pull request to the merge queue Aug 3, 2026
Merged via the queue into apache:main with commit 2a53535 Aug 3, 2026
59 of 61 checks passed
@xuang7
xuang7 deleted the feat/dataset-contributor-user-linking branch August 3, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common ddl-change Changes to the TexeraDB DDL engine feature platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link dataset contributors to user accounts (auto-create placeholder accounts)

3 participants