From 9e795cbd8376ffe0d37f843ba9240a3ac470e73c Mon Sep 17 00:00:00 2001
From: Cahllagerfeld <43843195+Cahllagerfeld@users.noreply.github.com>
Date: Mon, 5 Aug 2024 12:04:27 +0200
Subject: [PATCH] feat: add code path (#642)
---
.../steps/step-sheet/DetailsTab.tsx | 33 ++++++++++++-------
src/types/core.ts | 13 +++++++-
2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/src/components/steps/step-sheet/DetailsTab.tsx b/src/components/steps/step-sheet/DetailsTab.tsx
index 0891c277..e6f6e91f 100644
--- a/src/components/steps/step-sheet/DetailsTab.tsx
+++ b/src/components/steps/step-sheet/DetailsTab.tsx
@@ -1,20 +1,21 @@
+import Github from "@/assets/icons/github.svg?react";
+import Pipelines from "@/assets/icons/pipeline.svg?react";
+import { CopyButton } from "@/components/CopyButton";
+import { InlineAvatar } from "@/components/InlineAvatar";
+import { useCodeRepository } from "@/data/code-repositories/code-repositories-detail-query";
import { usePipelineRun } from "@/data/pipeline-runs/pipeline-run-detail-query";
-import { KeyValue } from "../../KeyValue";
-import { Badge, Skeleton, Tag } from "@zenml-io/react-component-library";
-import { DisplayDate } from "../../DisplayDate";
-import { CollapsibleCard } from "../../CollapsibleCard";
-import { ExecutionStatusIcon, getExecutionStatusTagColor } from "../../ExecutionStatus";
import { useStepDetail } from "@/data/steps/step-detail-query";
-import Pipelines from "@/assets/icons/pipeline.svg?react";
import { calculateTimeDifference } from "@/lib/dates";
-import { ErrorFallback } from "../../Error";
-import Github from "@/assets/icons/github.svg?react";
-import { CopyButton } from "@/components/CopyButton";
import { transformToEllipsis } from "@/lib/strings";
-import { useCodeRepository } from "@/data/code-repositories/code-repositories-detail-query";
-import { InlineAvatar } from "@/components/InlineAvatar";
-import { Link } from "react-router-dom";
import { routes } from "@/router/routes";
+import { Badge, Skeleton, Tag } from "@zenml-io/react-component-library";
+import { Link } from "react-router-dom";
+import { Codesnippet } from "../../CodeSnippet";
+import { CollapsibleCard } from "../../CollapsibleCard";
+import { DisplayDate } from "../../DisplayDate";
+import { ErrorFallback } from "../../Error";
+import { ExecutionStatusIcon, getExecutionStatusTagColor } from "../../ExecutionStatus";
+import { Key, KeyValue, Value } from "../../KeyValue";
type Props = {
stepId: string;
@@ -211,6 +212,14 @@ export function StepDetailsTab({ stepId, runId }: Props) {
}
/>
)}
+ Code Path
+
+ {pipelineRunData.metadata?.code_path ? (
+
+ ) : (
+ "Not available"
+ )}
+
>
) : (
diff --git a/src/types/core.ts b/src/types/core.ts
index 0f99a98c..ca2a6af6 100644
--- a/src/types/core.ts
+++ b/src/types/core.ts
@@ -6186,6 +6186,8 @@ export type components = {
schedule?: string | null;
/** The code reference associated with the deployment. */
code_reference?: components["schemas"]["CodeReferenceRequest"] | null;
+ /** Optional path where the code is stored in the artifact store. */
+ code_path?: string | null;
/**
* Template
* @description Template used for the deployment.
@@ -6265,6 +6267,8 @@ export type components = {
pipeline_version_hash?: string | null;
/** The pipeline spec of the deployment. */
pipeline_spec?: components["schemas"]["PipelineSpec-Output"] | null;
+ /** Optional path where the code is stored in the artifact store. */
+ code_path?: string | null;
/** The pipeline associated with the deployment. */
pipeline?: components["schemas"]["PipelineResponse"] | null;
/** The stack associated with the deployment. */
@@ -6365,6 +6369,8 @@ export type components = {
PipelineResponseMetadata: {
/** The workspace of this resource. */
workspace: components["schemas"]["WorkspaceResponse"];
+ /** The description of the pipeline. */
+ description?: string | null;
};
/**
* PipelineResponseResources
@@ -6527,6 +6533,8 @@ export type components = {
};
/** The orchestrator run ID. */
orchestrator_run_id?: string | null;
+ /** Optional path where the code is stored in the artifact store. */
+ code_path?: string | null;
/**
* Template Id
* @description Template used for the pipeline run.
@@ -8064,6 +8072,7 @@ export type components = {
| "internal"
| "distribution_package"
| "code_repository"
+ | "notebook"
| "unknown";
/**
* StackComponentType
@@ -8093,7 +8102,9 @@ export type components = {
/** A textual description for the cloud provider console URL. */
deployment_url_text: string;
/** Configuration for the stack deployment that the user must manually configure into the cloud provider console. */
- configuration: string | null;
+ configuration?: string | null;
+ /** Instructions for deploying the stack. */
+ instructions?: string | null;
};
/**
* StackDeploymentInfo