Skip to content

refactor(backend): Relocate User Login info from User table to AuthProvider table - #7055

Open
Neilk1021 wants to merge 20 commits into
apache:mainfrom
Neilk1021:task/migrateBackend
Open

refactor(backend): Relocate User Login info from User table to AuthProvider table#7055
Neilk1021 wants to merge 20 commits into
apache:mainfrom
Neilk1021:task/migrateBackend

Conversation

@Neilk1021

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

As discussed in #6716 we'd like to split authentication handling into its own table auth_providers. For future support of multiple sources of authentication (e.g. github, IEEE accounts, etc.). This PR migrate the Schema from the image on the left to the one on the right.

image image

This PR:

  1. Creates a new auth_providers table in texera_ddl.
  2. Providers a migration script 29.sql to migrate old account data to the new schema.
  3. Refactors backend to match new schema.
  4. Refactors portions of GoogleAuthService to a generic ExternalAuthProvisioner to be used in future PRs adding new external logins.

Any related issues, documentation, discussions?

Closes #7048

How was this PR tested?

Compiled and ran all tests as well as deployed locally to verify functionality.

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

Co-authored with Claude Opus 4.8

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

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: @Yicong-Huang, @Ma77Ball, @mengw15
    You can notify them by mentioning @Yicong-Huang, @Ma77Ball, @mengw15 in a comment.

@Neilk1021 Neilk1021 changed the title task(backend): Relocate User Login info from User table to AuthProvider table refactor(backend): Relocate User Login info from User table to AuthProvider table Jul 29, 2026
@Neilk1021
Neilk1021 marked this pull request as draft July 29, 2026 20:59
@codecov-commenter

codecov-commenter commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.78%. Comparing base (421e660) to head (0f5e89d).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7055      +/-   ##
============================================
+ Coverage     79.57%   79.78%   +0.21%     
- Complexity     3832     3839       +7     
============================================
  Files          1159     1159              
  Lines         46122    46041      -81     
  Branches       5127     5114      -13     
============================================
+ Hits          36700    36734      +34     
+ Misses         7790     7673     -117     
- Partials       1632     1634       +2     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 77.42% <ø> (ø) Carriedforward from 421e660
amber 73.38% <ø> (+0.31%) ⬆️ Carriedforward from 421e660
computing-unit-managing-service 31.57% <100.00%> (+11.08%) ⬆️
config-service 66.66% <ø> (ø)
file-service 67.21% <ø> (ø)
frontend 83.05% <ø> (ø) Carriedforward from 421e660
notebook-migration-service 78.94% <ø> (ø)
pyamber 97.36% <ø> (ø) Carriedforward from 421e660
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 Jul 30, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

CI benchmark results are noisy; treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 435 0.266 22,209/28,541/28,541 us 🔴 +86.2% / 🔴 +80.8%
🔴 bs=100 sw=10 sl=64 934 0.57 103,461/149,816/149,816 us 🔴 +28.1% / 🔴 +35.8%
🟢 bs=1000 sw=10 sl=64 1,100 0.671 903,964/1,021,984/1,021,984 us 🟢 +18.1% / 🟢 -10.4%
Baseline details

Latest main ebfd1db from 2026-07-30T14:07:03.708Z

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 435 tuples/sec 732.84 tuples/sec 771.62 tuples/sec -40.6% -43.6%
bs=10 sw=10 sl=64 MB/s 0.266 MB/s 0.447 MB/s 0.471 MB/s -40.5% -43.5%
bs=10 sw=10 sl=64 p50 22,209 us 13,439 us 12,626 us +65.3% +75.9%
bs=10 sw=10 sl=64 p95 28,541 us 15,329 us 15,786 us +86.2% +80.8%
bs=10 sw=10 sl=64 p99 28,541 us 19,526 us 19,344 us +46.2% +47.5%
bs=100 sw=10 sl=64 throughput 934 tuples/sec 897.82 tuples/sec 971.56 tuples/sec +4.0% -3.9%
bs=100 sw=10 sl=64 MB/s 0.57 MB/s 0.548 MB/s 0.593 MB/s +4.0% -3.9%
bs=100 sw=10 sl=64 p50 103,461 us 110,657 us 103,463 us -6.5% -0.0%
bs=100 sw=10 sl=64 p95 149,816 us 116,972 us 110,296 us +28.1% +35.8%
bs=100 sw=10 sl=64 p99 149,816 us 132,496 us 118,690 us +13.1% +26.2%
bs=1000 sw=10 sl=64 throughput 1,100 tuples/sec 931.46 tuples/sec 1,001 tuples/sec +18.1% +9.9%
bs=1000 sw=10 sl=64 MB/s 0.671 MB/s 0.569 MB/s 0.611 MB/s +18.0% +9.8%
bs=1000 sw=10 sl=64 p50 903,964 us 1,071,100 us 1,008,988 us -15.6% -10.4%
bs=1000 sw=10 sl=64 p95 1,021,984 us 1,109,394 us 1,055,260 us -7.9% -3.2%
bs=1000 sw=10 sl=64 p99 1,021,984 us 1,125,922 us 1,074,689 us -9.2% -4.9%
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,459.77,200,128000,435,0.266,22208.97,28541.10,28541.10
1,100,10,64,20,2141.91,2000,1280000,934,0.570,103461.27,149816.29,149816.29
2,1000,10,64,20,18181.88,20000,12800000,1100,0.671,903963.57,1021984.04,1021984.04

Neilk1021 and others added 6 commits July 30, 2026 12:46
# Conflicts:
#	access-control-service/src/test/scala/org/apache/texera/service/activity/UserActivityEventListenerSpec.scala
#	amber/src/main/scala/org/apache/texera/web/ServletAwareConfigurator.scala
#	amber/src/main/scala/org/apache/texera/web/auth/GuestAuthFilter.scala
#	common/auth/src/main/scala/org/apache/texera/auth/JwtParser.scala
@Neilk1021
Neilk1021 marked this pull request as ready for review July 30, 2026 21:58
@Neilk1021

Copy link
Copy Markdown
Contributor Author

@Yicong-Huang can you please look this over when you get the chance, thanks!

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 platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relocate User Login info from User table to AuthProvider table.

2 participants