You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Neilk1021 (via GitHub)" <gi...@apache.org> on 2026/08/11 19:28:41 UTC
[PR] refactor(auth, frontend): store the identity provider's full avatar URL [texera]
Neilk1021 opened a new pull request, #7563:
URL: https://github.com/apache/texera/pull/7563
### What
`"user".avatar` holds only the last path segment of Google's `picture` claim, and the frontend
rebuilds `https://lh3.googleusercontent.com/a/<fragment>` around it. Migration 33 renamed the
column from `google_avatar` but deliberately kept every value as-is, so the *value* is still
Google-only: no other identity provider can be represented in it.
This stores the complete URL the provider supplied, and takes the Google-specific naming off the
wire along with it.
### Changes
**Avatar value**
- New `common/util/AvatarUtil`: keeps an avatar only when it is an `http(s)` URL on an allowlisted
host (`googleusercontent.com` today), and drops anything else rather than failing the login.
Storing a provider-chosen URL is what makes this necessary — the old fragment-plus-hardcoded-host
scheme gave that guarantee implicitly.
- `GoogleAuthResource.profileOf` keeps `picture` whole instead of `_.split("/").lastOption`.
- `ExternalProfile.avatar` becomes `Option[String]`, so "no avatar we would store" is one case that
leaves the column alone. Previously a payload without `picture` overwrote a stored avatar with
`""`.
- `sql/updates/35.sql` widens the column to `VARCHAR(512)`, normalizes `''` to `NULL`, and promotes
existing fragments to absolute URLs. Idempotent via a `NOT LIKE 'http%'` guard.
- The frontend fetches the stored URL verbatim; `getAvatar`'s argument and cache key are the URL.
**Naming**
- The JWT claim `googleAvatar` is now `avatar`. Tokens live for
`auth.jwt.expiration-in-minutes` (a week by default), so both `JwtParser` and `auth.service.ts`
read the new name and fall back to the old one — otherwise every already-signed-in user loses
their avatar until their token is reissued. Both fallbacks are commented as deletable once
pre-rename tokens have expired, and are pinned by tests.
- The same rename lands on the DTO fields that carry the value to the browser
(`UserInfo.avatar`, `WorkflowExecutionEntry.avatar`, `DashboardWorkflowComputingUnit.ownerAvatar`),
the matching TS types, and `UserAvatarComponent`'s `@Input`.
### Note for reviewers
The JSON keys on `/admin/user/list`, the dashboard user-info map, execution history, and the
computing-unit responses change name. Those are consumed only by this frontend, which moves in the
same commit — but if anything outside this repo reads those payloads, that rename is the breaking
part, not the JWT claim.
Adding a second provider now needs nothing here beyond its own `ExternalProfile` mapping and one
line in the host allowlist.
### Testing
- `sbt scalafmtCheckAll "scalafixAll --check" Test/compile Util/test Auth/test` — clean;
`Util/test` 24, `Auth/test` 99.
- `WorkflowExecutionService/testOnly *GoogleAuthResourceSpec *ExternalAuthProvisionerSpec
*AuthResourceSpec *AdminUserResourceSpec *WorkflowExecutionsResourceSpec *DashboardResourceSpec`
— 116 tests, 0 failures. `ComputingUnitManagingService/test` — 91, 0 failures.
- New coverage: `AvatarUtilSpec` (allowlist, subdomains, lookalike hosts, non-`http(s)` schemes,
blank/absent); avatar cases in `GoogleAuthResourceSpec` (full URL stored, rotation, absent
picture, keep-on-absent, disallowed host) and `ExternalAuthProvisionerSpec` (`None` leaves a
stored avatar alone); claim back-compat in `JwtParserSpec` and `auth.service.spec.ts`.
- Frontend: `yarn ng test` — 201 files / 4419 tests, 0 failures; `yarn format:ci` clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(auth, frontend): store the identity provider's full avatar URL [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7563:
URL: https://github.com/apache/texera/pull/7563#issuecomment-5257881863
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7563?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 87.89%. Comparing base ([`e878df3`](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1002e49`](https://app.codecov.io/gh/apache/texera/commit/1002e49c2692b089fe9ca62ed4f975238025857c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #7563 +/- ##
=========================================
Coverage 87.88% 87.89%
Complexity 4276 4276
=========================================
Files 1176 1176
Lines 47018 46977 -41
Branches 5245 5230 -15
=========================================
- Hits 41323 41289 -34
+ Misses 3972 3970 -2
+ Partials 1723 1718 -5
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.62% <ø> (ø)` | | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `82.88% <ø> (-0.01%)` | :arrow_down: | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `60.09% <ø> (-0.29%)` | :arrow_down: | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.97% <ø> (ø)` | | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.05% <ø> (ø)` | | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.95% <ø> (+0.01%)` | :arrow_up: | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.89% <ø> (ø)` | | |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.52% <ø> (ø)` | | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/7563/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.31% <ø> (ø)` | | Carriedforward from [e878df3](https://app.codecov.io/gh/apache/texera/commit/e878df3eee7ca3baee7b0c34eceb63548c59e68a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/7563?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(auth): store the identity provider's full avatar URL [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #7563:
URL: https://github.com/apache/texera/pull/7563
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(auth, frontend): store the identity provider's full avatar URL [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7563:
URL: https://github.com/apache/texera/pull/7563#issuecomment-5257856787
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@aglinxinyuan`, `@mengw15`, `@Mrudhulraj`
You can notify them by mentioning `@aglinxinyuan`, `@mengw15`, `@Mrudhulraj` in a comment.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(auth): store the identity provider's full avatar URL [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7563:
URL: https://github.com/apache/texera/pull/7563#issuecomment-5257920764
<!-- texera-benchmarks-comment -->
## ✅ No material benchmark regressions detected
🟢 7 better · 🔴 0 worse · ⚪ 8 noise (<±5%) · 0 without baseline
> Compared against main `e878df3` 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](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/31528049816)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🟢 | bs=10 sw=10 sl=64 | 380 | 0.232 | 25,898/31,566/31,566 us | 🟢 -10.4% / 🔴 +105.7% |
| 🟢 | bs=100 sw=10 sl=64 | 765 | 0.467 | 127,386/170,468/170,468 us | 🟢 -12.0% / 🔴 +57.7% |
| ⚪ | bs=1000 sw=10 sl=64 | 908 | 0.554 | 1,100,045/1,170,710/1,170,710 us | ⚪ within ±5% / 🔴 +12.7% |
<details><summary>Baseline details</summary>
Latest main `e878df3` from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---:|---:|---:|---:|---:|
| bs=10 sw=10 sl=64 | throughput | 380 tuples/sec | 369 tuples/sec | 784.3 tuples/sec | +3.0% | -51.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.232 MB/s | 0.225 MB/s | 0.479 MB/s | +3.1% | -51.5% |
| bs=10 sw=10 sl=64 | p50 | 25,898 us | 27,461 us | 12,590 us | -5.7% | +105.7% |
| bs=10 sw=10 sl=64 | p95 | 31,566 us | 35,218 us | 15,991 us | -10.4% | +97.4% |
| bs=10 sw=10 sl=64 | p99 | 31,566 us | 35,218 us | 18,694 us | -10.4% | +68.9% |
| bs=100 sw=10 sl=64 | throughput | 765 tuples/sec | 724 tuples/sec | 1,002 tuples/sec | +5.7% | -23.7% |
| bs=100 sw=10 sl=64 | MB/s | 0.467 MB/s | 0.442 MB/s | 0.612 MB/s | +5.7% | -23.6% |
| bs=100 sw=10 sl=64 | p50 | 127,386 us | 130,673 us | 101,285 us | -2.5% | +25.8% |
| bs=100 sw=10 sl=64 | p95 | 170,468 us | 193,650 us | 108,068 us | -12.0% | +57.7% |
| bs=100 sw=10 sl=64 | p99 | 170,468 us | 193,650 us | 118,235 us | -12.0% | +44.2% |
| bs=1000 sw=10 sl=64 | throughput | 908 tuples/sec | 907 tuples/sec | 1,030 tuples/sec | +0.1% | -11.8% |
| bs=1000 sw=10 sl=64 | MB/s | 0.554 MB/s | 0.553 MB/s | 0.629 MB/s | +0.2% | -11.9% |
| bs=1000 sw=10 sl=64 | p50 | 1,100,045 us | 1,105,850 us | 991,882 us | -0.5% | +10.9% |
| bs=1000 sw=10 sl=64 | p95 | 1,170,710 us | 1,145,242 us | 1,038,496 us | +2.2% | +12.7% |
| bs=1000 sw=10 sl=64 | p99 | 1,170,710 us | 1,145,242 us | 1,068,265 us | +2.2% | +9.6% |
</details>
<details><summary>Raw CSV</summary>
```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,525.94,200,128000,380,0.232,25897.51,31566.41,31566.41
1,100,10,64,20,2613.91,2000,1280000,765,0.467,127385.51,170467.60,170467.60
2,1000,10,64,20,22020.04,20000,12800000,908,0.554,1100045.45,1170709.62,1170709.62
```
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(auth): store the identity provider's full avatar URL [texera]
Posted by "Neilk1021 (via GitHub)" <gi...@apache.org>.
Neilk1021 commented on PR #7563:
URL: https://github.com/apache/texera/pull/7563#issuecomment-5257990214
/request-review @aglinxinyuan
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org