Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ShapeUp] Enable RW and support multiple cloud storages #2915

Merged
merged 10 commits into from
Jan 15, 2024
Merged
2 changes: 2 additions & 0 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
renku-graph: ${{ steps.deploy-comment.outputs.renku-graph}}
renku-notebooks: ${{ steps.deploy-comment.outputs.renku-notebooks}}
renku-data-services: ${{ steps.deploy-comment.outputs.renku-data-services}}
amalthea: ${{ steps.deploy-comment.outputs.amalthea}}
test-enabled: ${{ steps.deploy-comment.outputs.test-enabled}}
extra-values: ${{ steps.deploy-comment.outputs.extra-values}}
steps:
Expand Down Expand Up @@ -88,6 +89,7 @@ jobs:
renku_graph: "${{ needs.check-deploy.outputs.renku-graph }}"
renku_notebooks: "${{ needs.check-deploy.outputs.renku-notebooks }}"
renku_data_services: "${{ needs.check-deploy.outputs.renku-data-services }}"
amalthea: "${{ needs.check-deploy.outputs.amalthea }}"
extra_values: "${{ needs.check-deploy.outputs.extra-values }}"

selenium-acceptance-tests:
Expand Down
36 changes: 33 additions & 3 deletions client/src/components/errors/RtkErrorAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
import { SerializedError } from "@reduxjs/toolkit";
import { FetchBaseQueryError } from "@reduxjs/toolkit/dist/query";

import { ErrorAlert } from "../Alert";
import { ErrorAlert, RenkuAlert } from "../Alert";
import { CoreErrorAlert } from "./CoreErrorAlert";
import { CoreErrorResponse } from "../../utils/types/coreService.types";
import { extractTextFromObject } from "../../utils/helpers/TextUtils";
import { UpdateProjectResponse } from "../../features/project/Project";
import { NotebooksErrorResponse } from "../../features/session/sessions.types";

export function extractRkErrorMessage(
error: FetchBaseQueryError | SerializedError,
Expand Down Expand Up @@ -93,7 +94,10 @@ export function RtkErrorAlert({
);
}

export function RtkOrCoreError({ error }: RtkErrorAlertProps) {
export function RtkOrCoreError({
error,
dismissible = true,
}: RtkErrorAlertProps) {
if (!error) return null;
return "status" in error &&
typeof error.status === "number" &&
Expand All @@ -104,6 +108,32 @@ export function RtkOrCoreError({ error }: RtkErrorAlertProps) {
(error.data as CoreErrorResponse).error ? (
<CoreErrorAlert error={(error.data as CoreErrorResponse).error} />
) : (
<RtkErrorAlert dismissible={true} error={error} />
<RtkErrorAlert dismissible={dismissible} error={error} />
);
}

export function RtkOrNotebooksError({
error,
dismissible = true,
}: RtkErrorAlertProps) {
if (!error) return null;
if (
"status" in error &&
typeof error.status === "number" &&
(error.status as number) >= 400 &&
typeof error.data === "object" &&
error.data &&
"error" in error.data &&
(error.data as NotebooksErrorResponse).error
) {
return (
<RenkuAlert color="danger" dismissible={dismissible} timeout={0}>
<h3>Error {(error.data as NotebooksErrorResponse).error.code}</h3>
<p className="mb-0">
{(error.data as NotebooksErrorResponse).error.message}
</p>
</RenkuAlert>
);
}
return <RtkErrorAlert dismissible={dismissible} error={error} />;
}

This file was deleted.

Loading
Loading