Repository navigation
Fixes #36030: Ontology bulk authoring jobs panel hides active jobs beyond the 20 most recent (backport 2.1 #36043) - #37410
Conversation
…yond the 20 most recent (#36043) * Fixes #36030: Ontology bulk authoring jobs panel hides active jobs beyond the 20 most recent * Fixes #36030 review: clear pending flag when job appears; rework background-submission test * Address review: bind glossaryId as UUID, keep job list limit at 20, drop pending-submission polling - OntologyBulkResource binds glossaryId as UUID so malformed or upper-case ids are rejected/normalised instead of silently returning an empty list; SDK overload takes UUID. - The server-side glossary filter fixes #36030 on its own, so the client limit stays at 20. - Remove noteBackgroundSubmission: schedule() inserts with autocommit and reads back the row before responding, so the post-submit refresh always sees the new job. --------- Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com> Co-authored-by: Anujkumar Yadav <[email protected]> (cherry picked from commit 8f684a0)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
| try { | ||
| const response = await listOntologyBulkJobs(); | ||
| setJobs(response.jobs.filter((job) => job.glossary.id === glossaryId)); | ||
| const response = await listOntologyBulkJobs(glossaryId); |
There was a problem hiding this comment.
⚠️ Bug: UI still fetches only 20 jobs; described 100-limit and poll-until-seen missing
The description says the UI "requests up to 100 jobs scoped to the selected glossary" and that the hook "keeps polling after a background submission until the job appears (60s safety valve)". Neither change is in this diff. listOntologyBulkJobs(glossaryId) still uses the default limit = 20, and polling still runs only when jobs.some(isActiveOntologyBulkJob). So a glossary with more than 20 recent jobs can still push an active job off the page. That is the bug #36030 describes, now limited to one glossary. Also, when a background job is submitted while no job is active, nothing polls until a manual refresh. Either bring over the missing hook and limit changes from #36043, or correct the description.
Request the server cap (100) for the glossary-scoped list:
const response = await listOntologyBulkJobs(glossaryId, MAXIMUM_ONTOLOGY_BULK_JOBS);
Was this helpful? React with 👍 / 👎
| @QueryParam("glossaryId") final UUID glossaryId, | ||
| @QueryParam("limit") @DefaultValue("20") final int limit) { | ||
| final String user = subject(securityContext).user().getName(); | ||
| return jobManager.list(user, boundedLimit(limit)); | ||
| return jobManager.list( | ||
| user, glossaryId == null ? null : glossaryId.toString(), boundedLimit(limit)); |
There was a problem hiding this comment.
⚠️ Quality: glossaryId filter contract on bulk jobs API is not recorded
This PR adds a REST contract: GET /v1/ontology/bulk/jobs?glossaryId=<uuid>, used by the UI and the SDK (listJobs(UUID, int)). It also makes the SQL depend on the persisted jobArgs shape at $.request.glossaryId. No record in docs/decisions/ covers this, and the description says it only in prose: "GET /v1/ontology/bulk/jobs takes an optional glossaryId, filtered in SQL before LIMIT". A record would say: "The Ontology bulk jobs list is filtered by the optional glossaryId in SQL before the caller-scoped LIMIT (max 100), matching jobArgs.request.glossaryId, so a renamed job-argument field must also update both the MySQL and PostgreSQL list queries."
Add a decision record:
docs/decisions/2026-11-xx-ontology-bulk-job-lists-filter-by-glossary-before-limit.md
Was this helpful? React with 👍 / 👎
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
|



Backport of #36043 to
2.1.Describe your changes:
Fixes #36030
Cherry-pick of 8f684a0. The Ontology bulk authoring "Background jobs" panel fetched the caller's 20 most recent
ONTOLOGY_BULKjobs across all glossaries and filtered by glossary on the client, so an active job outside that window never showed or polled.GET /v1/ontology/bulk/jobstakes an optionalglossaryId, filtered in SQL beforeLIMIT(MySQL and PostgreSQL).listJobs(String glossaryId, int limit);listJobs(int limit)is unchanged.The cherry-pick applied cleanly; its whitespace-normalized diff is identical to the original.
Type of change:
Tests:
2.1):JobDAOTest(14),OntologyBulkJobManagerTest(4),OntologyBulkServiceTest(3) pass.useOntologyBulkJobs.test.ts,ontologyAPI.test.ts,OntologyBulkAuthoring.test.tsx,OntologyBulkJobsPanel.test.tsxpass.OntologyExplorer.test.tsx› "explains the fetch empty state" fails locally on the untouched2.1baseline too, so it isn't caused by this backport.OntologyBulkIT.listJobsIsGlossaryScopednot run locally; left to CI.