Skip to content

Commit

Permalink
Be more helpful when there is no image build for prebuilds (#20048)
Browse files Browse the repository at this point in the history
* Be more helpful when there is no image build for prebuilds

* Increase gap between text and spinner
  • Loading branch information
filiptronicek authored Jul 19, 2024
1 parent 99d1c5d commit 71ab59d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/dashboard/src/prebuilds/detail/PrebuildTaskTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { TabsContent } from "@podkit/tabs/Tabs";
import { PrebuildTaskErrorTab } from "./PrebuildTaskErrorTab";
import type { PlainMessage } from "@bufbuild/protobuf";
import { useHistory } from "react-router";
import { LoadingState } from "@podkit/loading/LoadingState";

const WorkspaceLogs = React.lazy(() => import("../../components/WorkspaceLogs"));

Expand Down Expand Up @@ -74,6 +75,16 @@ export const PrebuildTaskTab = memo(({ taskId, prebuild }: Props) => {
}, []);

if (error) {
if (error.code === ErrorCodes.NOT_FOUND && taskId === "image-build") {
return (
<PrebuildTaskErrorTab taskId={taskId}>
<span className="flex justify-center items-center gap-2">
Pulling container image <LoadingState delay={false} size={16} />
</span>
</PrebuildTaskErrorTab>
);
}

return (
<PrebuildTaskErrorTab taskId={taskId}>
Logs of this prebuild task are inaccessible. Use <code>gp validate --prebuild --headless</code> in a
Expand Down

0 comments on commit 71ab59d

Please sign in to comment.