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
12 changes: 7 additions & 5 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ 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:
- id: deploy-comment
uses: SwissDataScienceCenter/renku-actions/check-pr-description@v1.8.5
uses: SwissDataScienceCenter/renku-actions/check-pr-description@amalthea-deploy
with:
string: /deploy
pr_ref: ${{ github.event.number }}
Expand Down Expand Up @@ -65,7 +66,7 @@ jobs:
body: |
You can access the deployment of this PR at https://renku-ci-ui-${{ github.event.number }}.dev.renku.ch
- name: Build and deploy
uses: SwissDataScienceCenter/renku-actions/deploy-renku@v1.8.5
uses: SwissDataScienceCenter/renku-actions/deploy-renku@amalthea-deploy
env:
RANCHER_PROJECT_ID: ${{ secrets.CI_RANCHER_PROJECT }}
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
Expand All @@ -88,14 +89,15 @@ 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:
needs: [check-deploy, deploy-pr]
if: github.event.action != 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true' && needs.check-deploy.outputs.test-enabled == 'true'
runs-on: ubuntu-22.04
steps:
- uses: SwissDataScienceCenter/renku-actions/test-renku@v1.8.5
- uses: SwissDataScienceCenter/renku-actions/test-renku@amalthea-deploy
with:
kubeconfig: ${{ secrets.RENKUBOT_DEV_KUBECONFIG }}
renku-release: renku-ci-ui-${{ github.event.number }}
Expand Down Expand Up @@ -124,7 +126,7 @@ jobs:
steps:
- name: Extract Renku repository reference
run: echo "RENKU_REFERENCE=`echo '${{ needs.check-deploy.outputs.renku }}' | cut -d'@' -f2`" >> $GITHUB_ENV
- uses: SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.8.5
- uses: SwissDataScienceCenter/renku-actions/test-renku-cypress@amalthea-deploy
with:
e2e-target: ${{ matrix.tests }}
renku-reference: ${{ env.RENKU_REFERENCE }}
Expand Down Expand Up @@ -152,7 +154,7 @@ jobs:
body: |
Tearing down the temporary RenkuLab deplyoment for this PR.
- name: renku teardown
uses: SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@v1.8.5
uses: SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@amalthea-deploy
env:
HELM_RELEASE_REGEX: "^renku-ci-ui-${{ github.event.number }}$"
GITLAB_TOKEN: ${{ secrets.DEV_GITLAB_TOKEN }}
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