Serve every kind's reads through the unified resource endpoints

Aperta
#9,489 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
scala
Ambito
api, backend, databases

Direzione di ricerca

Start by reading the generated interfaces from #9485 and the shared resource code under common/resource, then trace the agent service client calls and access check from #9488. The task spans several services, generated endpoints, paging, search, and compatibility with existing reads. It is done when all six kinds serve the specified reads through generated interfaces with one access check and the agent service can list a user's datasets.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Task Summary

Reading a resource takes a different endpoint for each kind, and two kinds cannot be read one at a time at all: there are GET /workflow/{wid}, GET /dataset/{did}, GET /model/{mid} and GET /computing-unit/{cuid}, but nothing for environments and warehouses. Lists differ in the same way, from GET /workflow/list to GET /pve/db and GET /warehouse/status. So a feature that works across kinds, such as letting the agent list the datasets a user can read (#9377) or a list page in the React frontend (#9387), needs a client for every kind.

This task serves the reads of every kind through the endpoints of #9395, from the shared code, before any write moves:

Operation Endpoint Kinds
List GET /{kind} all six
Read GET /{kind}/{rid} all six
List versions GET /{kind}/{rid}/versions workflows, datasets, models
Read a version GET /{kind}/{rid}/versions/{vno} workflows, datasets, models

Because these endpoints only read through the views of #9487, they cannot break anything that works today, and the old read endpoints stay until #9492.

Before
flowchart LR
  c["Client"]
  ds["Dashboard Service"]
  fs["File Service"]
  cs["Computing Unit<br/>Managing Service"]
  ew["Environments,<br/>warehouses"]
  c -- "GET /workflow/{wid}" --> ds
  c -- "GET /dataset/{did}<br/>GET /model/{mid}" --> fs
  c -- "GET /computing-unit/{cuid}" --> cs
  c -. "no read endpoint" .-> ew
After
flowchart LR
  c["Generated client"]
  ifc["Generated interface<br/>in each kind's service"]
  sh["Shared read code<br/>common/resource"]
  chk["One access check"]
  v[("resource,<br/>resource_version<br/>views")]
  c -- "GET /{kind}<br/>GET /{kind}/{rid}<br/>and their versions" --> ifc
  ifc --> sh
  sh --> chk
  sh --> v
Scope
  1. The reads above. Served from the generated interfaces of #9485, with paging and a text query, and filtered by the check of #9488.
  2. One shape. A read returns the common fields of resource, and the kind's own fields as spec. What only one kind has, such as the files of a dataset version, stays an operation of that kind.
  3. The agent service first. The agent service calls these reads through the client of #9485. When the frontend moves is a question for #9492.

This task changes no write, which is #9490.

Discussion Points
  1. Where the reads run. Each kind's service serves its own kind, so the gateway would route /api/datasets to file-service and /api/computing-units to the Computing Unit Managing Service. Workflows and warehouses are served by the Dashboard Service and environments by the computing unit, both on Dropwizard 1.3, so they need a Dropwizard 4 host first, as discussion point 3 of the parent issue says.
  2. Search. The dashboard search maps the columns of each kind by hand into one schema of 28 columns. It can become a text query on these lists, with its full-text indexes on resource, or stay a separate endpoint over the same views.

Done when every kind answers the reads above through generated interfaces and one access check, and the agent service lists a user's datasets with the generated client.

Task Type
  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other
Lingua principale
Scala
Stelle
333
Fork
202
Merge medio
3g 11h
PR unite (30g)
185

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/texera

Tutte le issue di apache/texera

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.