Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ interface WorkspaceResourcesProps {
}

export const WorkspaceResources: React.FC<WorkspaceResourcesProps> = ({ workspace }) => {
const workspaceDataVol = workspace.podTemplate.volumes.data;
// The generated type marks `data` as required, but the backend omits it when
// there's no data volume, so it can actually be undefined at runtime.
// TODO: This can be dropped once the frontend client is regenerated.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
const workspaceDataVol = workspace.podTemplate.volumes.data ?? [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is caused by a regression issue after PR #1119 was merged. This TypeScript failure is correct, due to the mismatching data contracts. The proper solution is re-generate the API client, fix and refactor any types to clear the issues. I have addressed this in #1272


const singleDataVolRenderer = (
data: {
Expand Down
Loading