You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the /api/v1/jobs/completed endpoint returns detailed job results for completed jobs, including extensive error logs and metadata. This creates unnecessary overhead when listing or paginating through large numbers of completed jobs, particularly when dealing with jobs that have many errors or warnings.
For example, a large import job with errors generates a response like this:
{
"progress": 1.0,
"queueName": "importContentlets",
"result": {
"errorDetail": null,
"metadata": {
"errors": [
"Line #2 contains errors. URL is malformed or Response is not 200",
"Line #3 contains errors. URL is malformed or Response is not 200",
...
],
"warnings": [
"Header 'languageCode' doesn't match any Content Type field; this column of data will be ignored.",
...
],
...
}
},
...
}
it's extensively large like 800 lines
Acceptance Criteria
Proposed Enhancements:
1. Summarized Responses for Listing Endpoints:
Modify the /api/v1/jobs/completed (and similar endpoints for failed jobs) to return summary data only.
Include key attributes such as:
id
state
progress
queueName
startedAt
updatedAt
Omit detailed metadata, warnings, and errors to reduce response size.
2. Detailed Endpoint for Job Data:
Full info should only be returned through a dedicated job, e.g., /api/v1/jobs/{jobId}, to return the full details of a specific job.
This lets clients fetch detailed information on demand for a specific job without overloading listing endpoints.
3. Cleanup Endpoint for Old Jobs:
Add an endpoint to clean up old or failed jobs, e.g., /api/v1/jobs/cleanup, with parameters for filtering (e.g., state, date range).
This would help manage and maintain job history efficiently, avoiding performance issues caused by accumulating old data.
Benefits:
Improved Performance: Paginated endpoints will be faster and lighter by omitting unnecessary data.
Better Usability: Developers can focus on the summaries for listings and retrieve details only when needed.
Enhanced Maintenance: A cleanup endpoint helps avoid bloated job histories, ensuring the system remains performant over time.
Affected Endpoints:
• /api/v1/jobs/completed
• /api/v1/jobs/failed
Proposed Objective
Technical User Experience
Proposed Priority
Priority 3 - Average
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
The text was updated successfully, but these errors were encountered:
Parent Issue
#29498
User Story
The current implementation of the /api/v1/jobs/completed endpoint returns detailed job results for completed jobs, including extensive error logs and metadata. This creates unnecessary overhead when listing or paginating through large numbers of completed jobs, particularly when dealing with jobs that have many errors or warnings.
For example, a large import job with errors generates a response like this:
{
"progress": 1.0,
"queueName": "importContentlets",
"result": {
"errorDetail": null,
"metadata": {
"errors": [
"Line #2 contains errors. URL is malformed or Response is not 200",
"Line #3 contains errors. URL is malformed or Response is not 200",
...
],
"warnings": [
"Header 'languageCode' doesn't match any Content Type field; this column of data will be ignored.",
...
],
...
}
},
...
}
it's extensively large like 800 lines
Acceptance Criteria
Proposed Enhancements:
Benefits:
Affected Endpoints:
Proposed Objective
Technical User Experience
Proposed Priority
Priority 3 - Average
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
The text was updated successfully, but these errors were encountered: