Skip to content

Show build logs over 1 month old in the UI #9161

Closed
@bpmct

Description

@bpmct

Background

We didn't add a pagination support for the build logs on the /workspace/ page. At the time, we decided to only show 1 month of logs to avoid

Current behavior

We only show a month of build logs. If the workspace was last built over 1 month ago, there is no way to fetch those logs a month ago and Coder reports that the logs are empty, which is not true.

coder/site/src/api/api.ts

Lines 762 to 770 in 71d5882

export const getWorkspaceBuilds = async (
workspaceId: string,
since: Date,
): Promise<TypesGen.WorkspaceBuild[]> => {
const response = await axios.get<TypesGen.WorkspaceBuild[]>(
`/api/v2/workspaces/${workspaceId}/builds?since=${since.toISOString()}`,
)
return response.data
}

Proposed solution

Add pagination to build logs on workspaces page to show everything, OR only show the last n builds instead of doing it based off date. Pagination is preferred.

Metadata

Metadata

Assignees

Labels

siteArea: frontend dashboard

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions