feat(frontend, amber): offer the owners of what each page actually shows - #8386
feat(frontend, amber): offer the owners of what each page actually shows#8386tanishqgandhi1908 wants to merge 1 commit into
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 567 | 0.346 | 18,211/21,418/21,418 us | 🔴 +27.0% / 🔴 +40.8% |
| 🔴 | bs=100 sw=10 sl=64 | 1,192 | 0.728 | 82,377/109,912/109,912 us | 🔴 +15.8% / 🟢 +22.2% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,476 | 0.901 | 680,025/740,716/740,716 us | ⚪ within ±5% / 🟢 +46.7% |
Baseline details
Latest main 905c17d from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 567 tuples/sec | 684 tuples/sec | 755.36 tuples/sec | -17.1% | -24.9% |
| bs=10 sw=10 sl=64 | MB/s | 0.346 MB/s | 0.417 MB/s | 0.461 MB/s | -17.0% | -25.0% |
| bs=10 sw=10 sl=64 | p50 | 18,211 us | 14,341 us | 12,938 us | +27.0% | +40.8% |
| bs=10 sw=10 sl=64 | p95 | 21,418 us | 17,970 us | 15,980 us | +19.2% | +34.0% |
| bs=10 sw=10 sl=64 | p99 | 21,418 us | 17,970 us | 19,233 us | +19.2% | +11.4% |
| bs=100 sw=10 sl=64 | throughput | 1,192 tuples/sec | 1,354 tuples/sec | 976.3 tuples/sec | -12.0% | +22.1% |
| bs=100 sw=10 sl=64 | MB/s | 0.728 MB/s | 0.827 MB/s | 0.596 MB/s | -12.0% | +22.2% |
| bs=100 sw=10 sl=64 | p50 | 82,377 us | 71,394 us | 102,340 us | +15.4% | -19.5% |
| bs=100 sw=10 sl=64 | p95 | 109,912 us | 94,935 us | 109,262 us | +15.8% | +0.6% |
| bs=100 sw=10 sl=64 | p99 | 109,912 us | 94,935 us | 118,827 us | +15.8% | -7.5% |
| bs=1000 sw=10 sl=64 | throughput | 1,476 tuples/sec | 1,489 tuples/sec | 1,006 tuples/sec | -0.9% | +46.7% |
| bs=1000 sw=10 sl=64 | MB/s | 0.901 MB/s | 0.909 MB/s | 0.614 MB/s | -0.9% | +46.7% |
| bs=1000 sw=10 sl=64 | p50 | 680,025 us | 665,988 us | 999,855 us | +2.1% | -32.0% |
| bs=1000 sw=10 sl=64 | p95 | 740,716 us | 753,622 us | 1,042,833 us | -1.7% | -29.0% |
| bs=1000 sw=10 sl=64 | p99 | 740,716 us | 753,622 us | 1,070,722 us | -1.7% | -30.8% |
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,352.43,200,128000,567,0.346,18210.62,21418.03,21418.03
1,100,10,64,20,1677.81,2000,1280000,1192,0.728,82377.39,109912.22,109912.22
2,1000,10,64,20,13551.35,20000,12800000,1476,0.901,680024.61,740715.69,740715.69
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8386 +/- ##
============================================
+ Coverage 94.03% 94.05% +0.01%
- Complexity 4771 4775 +4
============================================
Files 1196 1196
Lines 48757 48826 +69
Branches 5916 5928 +12
============================================
+ Hits 45850 45921 +71
+ Misses 1458 1457 -1
+ Partials 1449 1448 -1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2d58e5c to
3f0d925
Compare
The Owner dropdown should list the people who own the things on the page. On the unified search page and on the hub it did not. The search page rendered <texera-filters> with no [entityType], so the bar kept its EntityType.Workflow default on every tab: the Dataset, Model and All tabs all offered workflow owners, and ticking one emptied the tab. Separately, nothing could ask who owns the published entries -- all three *-owners endpoints filter on the caller's own access rows, which is right for the Your Work pages and wrong for the hub, where the dropdown offered people whose resources are not on the page and omitted the people whose resources are. Backend: one endpoint rather than three. HubResource.getCount already runs where(isPublicColumn.eq(true)) over a per-kind registry covering workflows, datasets and models, so GET /hub/owners is its sibling. BaseEntityTable gains joinWithOwner, implemented once in VersionedResourceTables for dataset and model. It is deliberately not joinWithAccessAndOwner(None), which left-joins the access table and fans out a row per grant. The existing *-owners endpoints are untouched. Frontend: FiltersComponent gains an ownerScope input and accepts a null entityType for a page listing every kind, and ResourceRegistryService.ownersFor resolves which lists to ask for -- the access-scoped endpoint for Your Work, the new one for the hub, and both merged for unified search, which lists both. The bar now implements OnChanges so switching tabs refetches, through a switchMap so a fast run of clicks cannot let a stale response land last. Signed-out visitors still get no Owner dropdown: the list is email addresses, so the new endpoint is @RolesAllowed like its siblings. Closes apache#8385.
3f0d925 to
146a350
Compare
What changes were proposed in this PR?
Every page has an Owner dropdown, and it should list the people who own the things on that page. On the unified search page and on the hub, it didn't.
Two causes:
search.component.htmlrendered<texera-filters>with no[entityType], so the bar kept itsEntityType.Workflowdefault on every tab.*-ownersendpoints filter on the caller's own access rows, which is right for Your Work and wrong for the hub.Reproduced before the fix, with
texeraowning 2 workflows / 3 datasets / 3 models,bobowning 1 workflow and 1 private dataset, andaliceowning 1 public model:texera,bob@test.com— bob owns no modeltexera,alice@test.com— the public model's ownerbob@test.com,texera— bob has nothing publictexera— exactly the owner on screenbobBackend — one endpoint, not three.
HubResource.getCountalready runswhere(isPublicColumn.eq(true))over a per-kind registry covering all three kinds, soGET /hub/owners?entityType=is its sibling.BaseEntityTablegains ajoinWithOwner, implemented once inVersionedResourceTablesfor dataset and model, and once for workflow. Deliberately notjoinWithAccessAndOwner(None), which left-joins the access table and fans out a row per grant. The three existing*-ownersendpoints are untouched.Frontend.
FiltersComponentgains anownerScopeinput, andentityTypeacceptsnullfor a page listing every kind.ResourceRegistryService.ownersFor(type, scope)resolves the rest:FiltersComponentnow implementsOnChanges, so switching tabs refetches; the reload runs through aswitchMap, or a fast run of tab clicks would let a stale response land last and repopulate the facet with the previous kind's owners.This is a
featrather than afix: it adds an endpoint and a new input, and it touches model and registry code thatrelease/v1.2does not have, so it should not be backported.Deliberately unchanged: signed-out visitors still get no Owner dropdown. The list is email addresses, and serving those to anonymous callers on a public hub is email harvesting — so the new endpoint is
@RolesAllowedlike its siblings.Behaviour worth calling out in review: switching tabs with an owner chip selected that the new kind has no owner for drops the chip and shows the existing "Invalid owner name" toast. Silently keeping it is what produced the mystery-empty page this PR is fixing.
Unified search, Model tab
In both shots the page lists one model,
empty-model, owned bytexera. Look at the Owner dropdownopen at the top right.
Before — it offers
texeraandbob@test.com. Those are the workflow owners:bobowns nomodel, and ticking him empties the tab.
After — it offers
texeraandalice@test.com. Those are the model owners:bobis gone, andaliceappears because she owns a public model, which this page lists.Hub → Datasets, signed in as
bobIn both shots the hub lists one dataset,
public-weather, which is public and owned bytexera.Before — the dropdown offers
bob@test.comandtexera.bobis offered because he owns aprivate dataset of his own, which cannot appear on this page; ticking him empties the hub.
After — the dropdown offers
texeraalone: exactly the owner of what is on screen.Any related issues, documentation, discussions?
Closes #8385.
How was this PR tested?
Backend — 6 new cases in
HubResourceSpec(82 passed):Frontend — 277 passed across the eight affected specs. New cases cover: per-scope routing
(asserting the other endpoint is not called), the union across kinds, a person owning several kinds
named once, a kind whose request fails contributing nothing rather than blanking the facet, reload on
kind change, exactly one load on first render, and both the dropped and the surviving owner chip.
End-to-end against a local stack: the table above is the actual before/after, and
GET /hub/ownersreturns["texera"]for datasets where the old access-scoped endpoint returned["bob@test.com","texera"].Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)