Skip to content

feat(amber): expose the warehouse owner in DashboardWarehouse - #7745

Open
mengw15 wants to merge 1 commit into
apache:mainfrom
mengw15:feat/7743-warehouse-owner-fields
Open

feat(amber): expose the warehouse owner in DashboardWarehouse#7745
mengw15 wants to merge 1 commit into
apache:mainfrom
mengw15:feat/7743-warehouse-owner-fields

Conversation

@mengw15

@mengw15 mengw15 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

GET /warehouse/status returns DashboardWarehouse(whid, name, warehouseName, flavor, createdAtMillis) with no owner information, so the warehouse dashboard tab and picker (#6933) can only render the owner avatar from the currently signed-in user. That is correct only while warehouses are strictly per-user, and would show the wrong person as soon as warehouses can be shared. Computing units already model this properly: DashboardWorkflowComputingUnit carries ownerName / ownerAvatar resolved per entry.

  • Add ownerName and ownerAvatar to DashboardWarehouse, mirroring the computing-unit semantics: resolved from the user table per entry, null when the user has no name or avatar set.
  • Resolution is batched over the distinct owner uids of a listing (one query per request) — today every entry belongs to the caller, but the shape is ready for shared warehouses, which is the point of the change.
  • Both mapping paths are wired: the status() listing and the create() response.
  • Frontend is deliberately untouched: the tab/picker PR (feat(gui): warehouse dashboard tab and per-execution warehouse picker #7536) is still open and can bind to the new fields directly.

Any related issues, documentation, discussions?

Closes #7743. Part of #6870, follow-up to #6932; mirrors DashboardWorkflowComputingUnit's owner fields.

How was this PR tested?

  • WarehouseResourceSpec (embedded Postgres + stubbed LakekeeperClient, no external infra) asserts the fields on both mapping paths: create returns the caller's ownerName with a null ownerAvatar for the avatar-less fixture user, and status resolves another user's name and avatar per entry.
  • Teeth verified: temporarily breaking the owner resolution turns exactly the two owner assertions red (both mapping paths), confirming the tests catch a regression rather than passing vacuously.
  • Full spec run locally: 11/11 passed; WorkflowExecutionService/scalafmtCheck (main + Test) passes.

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

Generated-by: Claude Code (claude-opus-4-8)

GET /warehouse/status returned DashboardWarehouse without owner
information, so the warehouse dashboard tab and picker could only render
the owner avatar from the currently signed-in user -- correct only while
warehouses are strictly per-user, and wrong as soon as they can be shared.

Mirror how computing units model this: add ownerName / ownerAvatar to
DashboardWarehouse, resolved per entry from the user table (null when the
user has no name or avatar set), batched over the distinct owner uids of a
listing. The UI can then bind each entry to its own owner instead of the
session user.

WarehouseResourceSpec asserts the fields on both mapping paths: create
returns the caller's name with a null avatar for the avatar-less fixture
user, and status resolves another user's name and avatar per entry.

Part of apache#6870, follow-up to apache#6932. Closes apache#7743.
@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:

  • No candidates found from git blame history.

@mengw15
mengw15 requested a balanced review from Copilot August 18, 2026 00:40
@mengw15
mengw15 requested a review from kunwp1 August 18, 2026 00:42

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

Adds per-warehouse owner metadata to dashboard API responses.

Changes:

  • Batches owner name/avatar resolution from the user table.
  • Populates owner fields for warehouse listing and creation responses.
  • Tests populated and null owner metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
WarehouseResource.scala Adds and resolves owner fields.
WarehouseResourceSpec.scala Verifies owner metadata mappings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 60300e3 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 534 0.326 18,296/23,675/23,675 us 🟢 -10.5% / 🔴 +48.1%
🔴 bs=100 sw=10 sl=64 1,220 0.745 81,308/102,079/102,079 us 🔴 +15.4% / 🟢 +20.7%
bs=1000 sw=10 sl=64 1,408 0.86 708,211/795,019/795,019 us ⚪ within ±5% / 🟢 +34.3%
Baseline details

Latest main 60300e3 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 534 tuples/sec 516 tuples/sec 779.07 tuples/sec +3.5% -31.5%
bs=10 sw=10 sl=64 MB/s 0.326 MB/s 0.315 MB/s 0.476 MB/s +3.5% -31.4%
bs=10 sw=10 sl=64 p50 18,296 us 17,346 us 12,818 us +5.5% +42.7%
bs=10 sw=10 sl=64 p95 23,675 us 26,465 us 15,986 us -10.5% +48.1%
bs=10 sw=10 sl=64 p99 23,675 us 26,465 us 19,339 us -10.5% +22.4%
bs=100 sw=10 sl=64 throughput 1,220 tuples/sec 1,262 tuples/sec 1,011 tuples/sec -3.3% +20.6%
bs=100 sw=10 sl=64 MB/s 0.745 MB/s 0.77 MB/s 0.617 MB/s -3.2% +20.7%
bs=100 sw=10 sl=64 p50 81,308 us 79,534 us 100,965 us +2.2% -19.5%
bs=100 sw=10 sl=64 p95 102,079 us 88,468 us 107,295 us +15.4% -4.9%
bs=100 sw=10 sl=64 p99 102,079 us 88,468 us 115,531 us +15.4% -11.6%
bs=1000 sw=10 sl=64 throughput 1,408 tuples/sec 1,404 tuples/sec 1,049 tuples/sec +0.3% +34.3%
bs=1000 sw=10 sl=64 MB/s 0.86 MB/s 0.857 MB/s 0.64 MB/s +0.4% +34.3%
bs=1000 sw=10 sl=64 p50 708,211 us 715,305 us 978,248 us -1.0% -27.6%
bs=1000 sw=10 sl=64 p95 795,019 us 797,301 us 1,021,881 us -0.3% -22.2%
bs=1000 sw=10 sl=64 p99 795,019 us 797,301 us 1,050,075 us -0.3% -24.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,374.45,200,128000,534,0.326,18295.94,23674.79,23674.79
1,100,10,64,20,1639.42,2000,1280000,1220,0.745,81307.90,102079.47,102079.47
2,1000,10,64,20,14201.99,20000,12800000,1408,0.860,708210.60,795019.22,795019.22

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.03%. Comparing base (60300e3) to head (6f77fcd).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7745   +/-   ##
=========================================
  Coverage     91.02%   91.03%           
- Complexity     4454     4455    +1     
=========================================
  Files          1174     1174           
  Lines         47146    47159   +13     
  Branches       5287     5288    +1     
=========================================
+ Hits          42916    42930   +14     
  Misses         2550     2550           
+ Partials       1680     1679    -1     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 60300e3
agent-service 98.62% <ø> (ø) Carriedforward from 60300e3
amber 87.47% <100.00%> (+0.01%) ⬆️
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 60300e3
config-service 86.73% <ø> (ø) Carriedforward from 60300e3
file-service 68.90% <ø> (ø) Carriedforward from 60300e3
frontend 92.59% <ø> (ø) Carriedforward from 60300e3
notebook-migration-service 83.74% <ø> (ø) Carriedforward from 60300e3
pyamber 97.57% <ø> (ø) Carriedforward from 60300e3
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 60300e3

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BYO-S3] Expose the warehouse owner in DashboardWarehouse

3 participants