[Detail Bug] Ontology bulk authoring UI hides background jobs beyond the 20 most recent (and stops polling for active jobs)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- java, typescript
- Ambito
- backend-api-design
Direzione di ricerca
Read useOntologyBulkJobs.ts, ontologyAPI.ts, and JobDAO.java, then trace how the jobs endpoint applies its limit and how the hook filters jobs and enables polling. Check the linked pull request #36043 for work already underway. Done means the selected glossary's jobs remain visible and active jobs continue to update even when they fall outside the initial list limit.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Detail Bug Report
Introduced in #28042 by @harshach on Aug 30, 2026
Summary
- Context: The Ontology bulk authoring UI shows a "Background jobs" panel (via
useOntologyBulkJobs) listing the bulk operations the current user has submitted for the selected glossary, polling for progress while jobs are queued/running. - Bug: The jobs list is fetched once with the default
limit=20over all glossaries of the calling user and then filtered client-side by glossary, so jobs of the selected glossary that fall outside the 20-most-recent window are silently dropped — and polling is gated on the filtered list, so a queued/running job outside the window never updates or reappears. - Actual vs. expected: The panel should show the selected glossary's jobs; instead it shows only those of the user's 20 most recent bulk jobs (across every glossary) that happen to belong to the selected glossary, and polling stops even when a job for that glossary is still queued/running.
- Impact: A user who runs 20+ bulk jobs across multiple glossaries silently loses visibility of jobs for the selected glossary — including an active background import whose progress, status, and result cannot be seen from the UI while it runs (it does not reappear even after manual refresh, and only resurfaces days later if newer terminal rows age out of the 7-day retention window), with no way to cancel or download its result.
Code with Bug
// openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/hooks/useOntologyBulkJobs.ts
const refreshJobs = useCallback(async () => {
setIsLoading(true);
setHasLoadError(false);
try {
const response = await listOntologyBulkJobs(); // <-- BUG 🔴 default limit=20, spans ALL glossaries
setJobs(response.jobs.filter((job) => job.glossary.id === glossaryId)); // <-- BUG 🔴 client-side filter after truncation
} catch {
setHasLoadError(true);
} finally {
setIsLoading(false);
}
}, [glossaryId]);
// ...
const hasActiveJobs = useMemo(
() => jobs.some(isActiveOntologyBulkJob), // <-- BUG 🔴 computed from the truncated+filtered list
[jobs]
);
usePollingEffect(refreshJobs, { enabled: hasActiveJobs }); // <-- BUG 🔴 polling never starts if the active job was dropped
// openmetadata-ui/src/main/resources/ui/src/rest/ontologyAPI.ts
export const listOntologyBulkJobs = async (limit = 20) => { // <-- BUG 🔴 hardcoded default
const response = await APIClient.get<OntologyBulkJobList>(
`${ONTOLOGY_BULK_PATH}/jobs`,
{ params: { limit } }
);
return response.data;
};
// openmetadata-service/src/main/java/org/openmetadata/service/jobs/JobDAO.java
@SqlQuery(
"SELECT id, jobType, methodName, jobArgs, status, createdAt, updatedAt, createdBy, runAt, "
+ "progress, total, NULL AS result, error, message, cancelRequested, completedAt "
+ "FROM background_jobs WHERE createdBy = :createdBy "
+ "AND jobType = 'ONTOLOGY_BULK' ORDER BY createdAt DESC LIMIT :limit") // <-- BUG 🔴 no glossary predicate, truncates before the client filters
List<BackgroundJob> listOntologyBulkJobsByUser(
@Bind("createdBy") String createdBy, @Bind("limit") int limit);
Explanation
- The backend list endpoint (
GET /v1/ontology/bulk/jobs) supports only alimit(default 20) and returns the user’s most recentONTOLOGY_BULKjobs across all glossaries (SQL filters bycreatedBy+jobTypeonly). There is no server-side glossary filter and no pagination. - The UI then filters the already-truncated response by
job.glossary.id === glossaryId, so any jobs for the selected glossary that are older than the user’s 20 most recent jobs become unretrievable for the panel. - Polling is enabled only when
hasActiveJobsis true, buthasActiveJobsis computed from the truncated+filteredjobsstate. If the selected glossary’s only queued/running job is outside the 20-job window, polling never runs (and manual refresh hits the same endpoint), so the job stays invisible and never updates in the UI while still running server-side.
Codebase Inconsistency
- The UI component using this hook expects a glossary-scoped background-jobs panel (
useOntologyBulkJobs(glossary?.id)feedingOntologyBulkJobsPanel), but the backend API only provides a user-scoped list. The hook compensates with client-side filtering, which fails once server-side truncation occurs.
Recommended Fix
Request the maximum the server allows (listOntologyBulkJobs(100)) and/or add a glossary filter server-side (e.g. a glossaryId query param resolved in listOntologyBulkJobsByUser) so the panel's list is complete for the selected glossary. For the polling gate, base enabled on information that is not destroyed by the truncation — e.g. keep polling while any submission for this glossary may still be in flight (the hook knows when submitOntologyBulkOperation returned ExecutionMode.Background), or have the list endpoint expose the caller's active-job count independent of the page window.
History
This bug was introduced in commit 7b1bc6b6a1 (feat(rdf): SPARQL playground, MCP knowledge-graph tools, insights endpoints (#28042), 2026-08-29). The commit created the entire Ontology bulk-authoring feature in one pass — useOntologyBulkJobs.ts, the listOntologyBulkJobs API in ontologyAPI.ts, OntologyBulkResource.java, and JobDAO.listOntologyBulkJobsByUser — and baked the faulty design in from day one: a hardcoded limit = 20 default on the client and a server SQL that filters only by createdBy and jobType = 'ONTOLOGY_BULK' with no glossary predicate, forcing the hook to filter client-side over an already-truncated, cross-glossary list and gating polling on that filtered result.
- Lingua principale
- TypeScript
- Stelle
- 15.4k
- Fork
- 2.4k
- Merge medio
- 1g 2h
- PR unite (30g)
- 693
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di open-metadata/OpenMetadata
-
Default Anthropic model in the LLM configuration is a retired model (claude-3-5-sonnet-20240620)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
open-metadata/OpenMetadata#36757 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
open-metadata/OpenMetadata#36739 ·
I maintainer di solito rispondono entro 1 giorno
-
[Detail Bug] Usage ingestion publishes table usage and join dates one day earlier on UTC-negative host timezonesForse già presa @detail-app l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
open-metadata/OpenMetadata#36604 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
open-metadata/OpenMetadata#36496 ·
I maintainer di solito rispondono entro 1 giorno
-
MCP find_context and company_context return no results on Elasticsearch (OpenSearchVectorService singleton is null)Forse già presa @zerafachris l’ha presa 5 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
open-metadata/OpenMetadata#36463 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di open-metadata/OpenMetadata
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
🔊 a11y
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
betagouv/mon-entreprise#4726 ·
I maintainer di solito rispondono entro 9 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Deltares/fews-pi-requests#357 ·
I maintainer di solito rispondono entro 1 giorno
-
bug confirmed js v6
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno