From cb65b13413ac96241b0d4d38405141de838eebf7 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Tue, 8 Oct 2024 17:40:11 +0530 Subject: [PATCH 01/15] feat: add flag for cd mandatory plugin --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 57d0183d5..e90d35e6f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,6 +76,7 @@ export interface customEnv { SYSTEM_CONTROLLER_LISTING_TIMEOUT?: number FEATURE_STEP_WISE_LOGS_ENABLE?: boolean FEATURE_IMAGE_PROMOTION_ENABLE?: boolean + FEATURE_CD_MANDATORY_PLUGINS_ENABLE?: boolean } declare global { interface Window { From bbc63db159a743277aebcb423e1fb07b4996ec95 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Mon, 14 Oct 2024 17:15:22 +0530 Subject: [PATCH 02/15] feat: update DefinitionSourceType for v2 --- src/Common/Policy.Types.ts | 16 ++++++---------- src/Shared/types.ts | 1 + 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Common/Policy.Types.ts b/src/Common/Policy.Types.ts index f99dcfb45..b54bcc16b 100644 --- a/src/Common/Policy.Types.ts +++ b/src/Common/Policy.Types.ts @@ -23,6 +23,8 @@ export enum ApplyPolicyToStage { PRE_CI = 'PRE_CI', POST_CI = 'POST_CI', PRE_OR_POST_CI = 'PRE_OR_POST_CI', + POST_CD = 'POST_CD', + PRE_CD = 'PRE_CD', } export enum PluginRequiredStage { @@ -32,16 +34,10 @@ export enum PluginRequiredStage { } export interface DefinitionSourceType { - projectName: string - isDueToProductionEnvironment: boolean - isDueToLinkedPipeline: boolean - policyName: string - appName?: string - clusterName?: string - environmentName?: string - branchNames?: string[] - ciPipelineName?: string + policyNames: string[] + linkedCIPipelineNames?: string[] } + export interface MandatoryPluginDetailType { id: number parentPluginId: number @@ -52,7 +48,7 @@ export interface MandatoryPluginDetailType { applied?: boolean inputVariables?: VariableType[] outputVariables?: VariableType[] - definitionSources?: DefinitionSourceType[] + definitionSources?: DefinitionSourceType } export interface MandatoryPluginDataType { pluginData: MandatoryPluginDetailType[] diff --git a/src/Shared/types.ts b/src/Shared/types.ts index e04329092..69ec7a669 100644 --- a/src/Shared/types.ts +++ b/src/Shared/types.ts @@ -439,6 +439,7 @@ export enum ResourceKindType { installation = 'installation', environment = 'environment', cdPipeline = 'cd-pipeline', + ciPipeline = 'ci-pipeline', project = 'project', } From 64d65f859185cc50d76b74db88df8bfa0b9861ec Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Mon, 14 Oct 2024 17:39:58 +0530 Subject: [PATCH 03/15] feat: Add ProcessPluginDataParamsType for CI and CD pipelines --- src/Common/Policy.Types.ts | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/Common/Policy.Types.ts b/src/Common/Policy.Types.ts index b54bcc16b..3fdeb3fa3 100644 --- a/src/Common/Policy.Types.ts +++ b/src/Common/Policy.Types.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { PluginDataStoreType } from '../Shared' -import { VariableType } from './CIPipeline.Types' +import { PluginDataStoreType, PluginDetailPayloadType } from '../Shared' +import { FormType, VariableType } from './CIPipeline.Types' import { ServerErrors } from './ServerError' import { ResponseType } from './Types' @@ -62,6 +62,36 @@ export interface ProcessPluginDataReturnType { mandatoryPluginsError?: ServerErrors } +export type ProcessPluginDataCIParamsType = { + ciPipelineId: number + /** + * Comma separated branch names used for v1 api + * For v2 format is [branchName1],[branchName2] + */ + branchName?: string + + cdPipelineId?: never + envName?: never +} + +export type ProcessPluginDataCDParamsType = { + cdPipelineId: number + envName?: string + + ciPipelineId?: never + branchName?: never +} + +export type ProcessPluginDataParamsType = { + formData: FormType + pluginDataStoreState: PluginDataStoreType + appId: number + /** + * Would be sent in case we have to get data for steps + */ + requiredPluginIds: PluginDetailPayloadType['pluginId'] +} & (ProcessPluginDataCIParamsType | ProcessPluginDataCDParamsType) + export enum ConsequenceAction { BLOCK = 'BLOCK', ALLOW_UNTIL_TIME = 'ALLOW_UNTIL_TIME', From 2994ec0ba742090d2fb7efd485a37437696d2595 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Tue, 15 Oct 2024 18:36:33 +0530 Subject: [PATCH 04/15] chore: Remove isMandatory property from StepType interface --- src/Common/CIPipeline.Types.ts | 1 - src/Common/Policy.Types.ts | 11 +++++++---- src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Common/CIPipeline.Types.ts b/src/Common/CIPipeline.Types.ts index 86418dfde..ea92fb660 100644 --- a/src/Common/CIPipeline.Types.ts +++ b/src/Common/CIPipeline.Types.ts @@ -170,7 +170,6 @@ export interface StepType { inlineStepDetail?: InlineStepDetailType pluginRefStepDetail?: PluginRefStepDetailType triggerIfParentStageFail: boolean - isMandatory?: boolean } export interface BuildStageType { diff --git a/src/Common/Policy.Types.ts b/src/Common/Policy.Types.ts index 3fdeb3fa3..0a9764117 100644 --- a/src/Common/Policy.Types.ts +++ b/src/Common/Policy.Types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { PluginDataStoreType, PluginDetailPayloadType } from '../Shared' +import { PluginDataStoreType, PluginDetailPayloadType, ResourceKindType } from '../Shared' import { FormType, VariableType } from './CIPipeline.Types' import { ServerErrors } from './ServerError' import { ResponseType } from './Types' @@ -27,10 +27,11 @@ export enum ApplyPolicyToStage { PRE_CD = 'PRE_CD', } +// This enum is mapping values from BuildStageVariable export enum PluginRequiredStage { - PRE_CI = 'preBuildStage', - POST_CI = 'postBuildStage', - PRE_OR_POST_CI = 'PRE_OR_POST_CI', + PRE_STAGE = 'preBuildStage', + POST_STAGE = 'postBuildStage', + PRE_OR_POST_STAGE = 'PRE_OR_POST_CI', } export interface DefinitionSourceType { @@ -63,6 +64,7 @@ export interface ProcessPluginDataReturnType { } export type ProcessPluginDataCIParamsType = { + resourceKind: ResourceKindType.ciPipeline ciPipelineId: number /** * Comma separated branch names used for v1 api @@ -75,6 +77,7 @@ export type ProcessPluginDataCIParamsType = { } export type ProcessPluginDataCDParamsType = { + resourceKind: ResourceKindType.cdPipeline cdPipelineId: number envName?: string diff --git a/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx b/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx index 729ddae89..62f5107b8 100644 --- a/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx +++ b/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx @@ -30,9 +30,11 @@ const InfoIconTippy = ({ placement = 'bottom', dataTestid = 'info-tippy-button', children, + headingInfo, }: InfoIconTippyProps) => ( Date: Wed, 16 Oct 2024 02:58:53 +0530 Subject: [PATCH 05/15] feat: Add TaskActionModalType and TaskActionModalStateType interfaces --- src/Shared/Components/Plugin/types.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Shared/Components/Plugin/types.ts b/src/Shared/Components/Plugin/types.ts index 3b4dea25c..d05130cc2 100644 --- a/src/Shared/Components/Plugin/types.ts +++ b/src/Shared/Components/Plugin/types.ts @@ -250,3 +250,14 @@ export interface PluginTagsContainerProps { export interface PluginImageContainerProps extends Pick { fallbackImageClassName?: string } + +export enum TaskActionModalType { + DELETE = 'DELETE', + MOVE_PLUGIN = 'MOVE_PLUGIN', +} + +export interface TaskActionModalStateType { + type: TaskActionModalType + pluginId: PluginDetailType['id'] + taskIndex: number +} From d2ac10c3b7cd28bdd8e7911bb0085c0d206f2dc0 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Wed, 16 Oct 2024 14:56:19 +0530 Subject: [PATCH 06/15] feat: add types related to mandatory plugin consequences --- src/Common/Types.ts | 15 ++++++--------- src/Shared/Components/Plugin/types.ts | 8 +++++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Common/Types.ts b/src/Common/Types.ts index 690b9ac2d..ce48fecaa 100644 --- a/src/Common/Types.ts +++ b/src/Common/Types.ts @@ -19,7 +19,7 @@ import { Placement } from 'tippy.js' import { UserGroupDTO } from '@Pages/GlobalConfigurations' import { ImageComment, ReleaseTag } from './ImageTags.Types' import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.' -import { RegistryType, RuntimeParamsListItemType, Severity } from '../Shared' +import { MandatoryPluginNodeType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared' /** * Generic response type object with support for overriding the result type @@ -552,7 +552,7 @@ export interface DownstreamNodesEnvironmentsType { environmentName: string } -export interface CommonNodeAttr { +export interface CommonNodeAttr extends Pick { connectingCiPipelineId?: number parents: string | number[] | string[] x: number @@ -602,15 +602,10 @@ export interface CommonNodeAttr { approvalUsers?: string[] userApprovalConfig?: UserApprovalConfigType requestedUserId?: number - showPluginWarning?: boolean + showPluginWarning: boolean helmPackageName?: string isVirtualEnvironment?: boolean deploymentAppType?: DeploymentAppTypes - isCITriggerBlocked?: boolean - ciBlockState?: { - action: any - metadataField: string - } appReleaseTagNames?: string[] tagsEditable?: boolean isGitOpsRepoNotConfigured?: boolean @@ -791,7 +786,7 @@ export interface CDStageConfigMapSecretNames { secrets: any[] } -export interface PrePostDeployStageType { +export interface PrePostDeployStageType extends MandatoryPluginNodeType { isValid: boolean steps: TaskErrorObj[] triggerType: string @@ -829,6 +824,8 @@ export interface CdPipeline { preDeployStage?: PrePostDeployStageType postDeployStage?: PrePostDeployStageType isProdEnv?: boolean + isGitOpsRepoNotConfigured?: boolean + isDeploymentBlocked?: boolean } export interface ExternalCiConfig { diff --git a/src/Shared/Components/Plugin/types.ts b/src/Shared/Components/Plugin/types.ts index d05130cc2..14a1d81b1 100644 --- a/src/Shared/Components/Plugin/types.ts +++ b/src/Shared/Components/Plugin/types.ts @@ -15,7 +15,7 @@ */ import { MutableRefObject } from 'react' -import { VariableType } from '../../../Common' +import { ConsequenceType, VariableType } from '../../../Common' import { BaseFilterQueryParams } from '../../types' import { ImageWithFallbackProps } from '../ImageWithFallback' import { getPluginStoreData } from './service' @@ -261,3 +261,9 @@ export interface TaskActionModalStateType { pluginId: PluginDetailType['id'] taskIndex: number } + +export interface MandatoryPluginNodeType { + isOffendingMandatoryPlugin: boolean + isTriggerBlocked: boolean + pluginBlockState: ConsequenceType +} From 47c151fb81c52eb1addb4b6f3f974c9c6a21290c Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Wed, 16 Oct 2024 17:13:42 +0530 Subject: [PATCH 07/15] chore: remove dead code --- src/Common/Policy.Types.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Common/Policy.Types.ts b/src/Common/Policy.Types.ts index 0a9764117..3e4d78c57 100644 --- a/src/Common/Policy.Types.ts +++ b/src/Common/Policy.Types.ts @@ -17,7 +17,6 @@ import { PluginDataStoreType, PluginDetailPayloadType, ResourceKindType } from '../Shared' import { FormType, VariableType } from './CIPipeline.Types' import { ServerErrors } from './ServerError' -import { ResponseType } from './Types' export enum ApplyPolicyToStage { PRE_CI = 'PRE_CI', @@ -111,7 +110,3 @@ export interface BlockedStateData { isCITriggerBlocked: boolean ciBlockState: ConsequenceType } - -export interface GetBlockedStateResponse extends ResponseType { - result?: BlockedStateData -} From 5e371887eb8b5911dd008da4dd59ec8e5f43d251 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Thu, 17 Oct 2024 23:52:48 +0530 Subject: [PATCH 08/15] fix: remove duplicated enums --- src/Common/Policy.Types.ts | 7 ++----- src/Shared/types.ts | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Common/Policy.Types.ts b/src/Common/Policy.Types.ts index f890f49df..fc108ecd4 100644 --- a/src/Common/Policy.Types.ts +++ b/src/Common/Policy.Types.ts @@ -21,14 +21,12 @@ import { ServerErrors } from './ServerError' export enum ApplyPolicyToStage { PRE_CI = 'PRE_CI', POST_CI = 'POST_CI', - PRE_CD = 'PRE_CD', - POST_CD = 'POST_CD', /** * @deprecated in mandatory plugin policy v2 */ PRE_OR_POST_CI = 'PRE_OR_POST_CI', - POST_CD = 'POST_CD', PRE_CD = 'PRE_CD', + POST_CD = 'POST_CD', } // This enum is mapping values from BuildStageVariable @@ -76,13 +74,11 @@ export type ProcessPluginDataCIParamsType = { */ branchName?: string - cdPipelineId?: never envName?: never } export type ProcessPluginDataCDParamsType = { resourceKind: ResourceKindType.cdPipeline - cdPipelineId: number envName?: string ciPipelineId?: never @@ -93,6 +89,7 @@ export type ProcessPluginDataParamsType = { formData: FormType pluginDataStoreState: PluginDataStoreType appId: number + appName: string /** * Would be sent in case we have to get data for steps */ diff --git a/src/Shared/types.ts b/src/Shared/types.ts index 8ec942258..e157ad107 100644 --- a/src/Shared/types.ts +++ b/src/Shared/types.ts @@ -438,7 +438,6 @@ export enum ResourceKindType { tenant = 'tenant', installation = 'installation', environment = 'environment', - ciPipeline = 'ci-pipeline', cdPipeline = 'cd-pipeline', ciPipeline = 'ci-pipeline', project = 'project', From 6d23d752544af8deedcea8ca9c29390a5f3e04e1 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Fri, 18 Oct 2024 13:47:01 +0530 Subject: [PATCH 09/15] Update package version to 0.5.2-beta-6 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e6b37136..25737f590 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.2-beta-5", + "version": "0.5.2-beta-6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.2-beta-5", + "version": "0.5.2-beta-6", "license": "ISC", "dependencies": { "@types/react-dates": "^21.8.6", diff --git a/package.json b/package.json index 5e16fa4cc..ec2424a41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.2-beta-5", + "version": "0.5.2-beta-6", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", From 176073f7e7849e129335e4289127388f77b84098 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Mon, 21 Oct 2024 00:20:41 +0530 Subject: [PATCH 10/15] chore: rename mandatory plugin types --- src/Common/Types.ts | 6 +++--- src/Shared/Components/Plugin/types.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Common/Types.ts b/src/Common/Types.ts index ce48fecaa..e194c174e 100644 --- a/src/Common/Types.ts +++ b/src/Common/Types.ts @@ -19,7 +19,7 @@ import { Placement } from 'tippy.js' import { UserGroupDTO } from '@Pages/GlobalConfigurations' import { ImageComment, ReleaseTag } from './ImageTags.Types' import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.' -import { MandatoryPluginNodeType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared' +import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared' /** * Generic response type object with support for overriding the result type @@ -552,7 +552,7 @@ export interface DownstreamNodesEnvironmentsType { environmentName: string } -export interface CommonNodeAttr extends Pick { +export interface CommonNodeAttr extends Pick { connectingCiPipelineId?: number parents: string | number[] | string[] x: number @@ -786,7 +786,7 @@ export interface CDStageConfigMapSecretNames { secrets: any[] } -export interface PrePostDeployStageType extends MandatoryPluginNodeType { +export interface PrePostDeployStageType extends MandatoryPluginBaseStateType { isValid: boolean steps: TaskErrorObj[] triggerType: string diff --git a/src/Shared/Components/Plugin/types.ts b/src/Shared/Components/Plugin/types.ts index 8bf65ce16..8c2c68c3d 100644 --- a/src/Shared/Components/Plugin/types.ts +++ b/src/Shared/Components/Plugin/types.ts @@ -254,18 +254,18 @@ export interface PluginImageContainerProps extends Pick Date: Mon, 21 Oct 2024 00:29:33 +0530 Subject: [PATCH 11/15] refactor: Update import statements in Policy.Types.ts --- src/Common/Policy.Types.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Common/Policy.Types.ts b/src/Common/Policy.Types.ts index fc108ecd4..41ac5405d 100644 --- a/src/Common/Policy.Types.ts +++ b/src/Common/Policy.Types.ts @@ -14,8 +14,9 @@ * limitations under the License. */ +import { PipelineFormType } from '@Pages/CDPipeline' import { PluginDataStoreType, PluginDetailPayloadType, ResourceKindType } from '../Shared' -import { FormType, VariableType } from './CIPipeline.Types' +import { VariableType } from './CIPipeline.Types' import { ServerErrors } from './ServerError' export enum ApplyPolicyToStage { @@ -86,14 +87,14 @@ export type ProcessPluginDataCDParamsType = { } export type ProcessPluginDataParamsType = { - formData: FormType + formData: PipelineFormType pluginDataStoreState: PluginDataStoreType appId: number appName: string /** * Would be sent in case we have to get data for steps */ - requiredPluginIds: PluginDetailPayloadType['pluginId'] + requiredPluginIds?: PluginDetailPayloadType['pluginId'] } & (ProcessPluginDataCIParamsType | ProcessPluginDataCDParamsType) export enum ConsequenceAction { From 2e4ccc50731113ec5dcfc0f725811b046c28c79e Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Mon, 21 Oct 2024 23:41:01 +0530 Subject: [PATCH 12/15] Update version in package-lock.json and package.json --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 25737f590..f08a30742 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.2-beta-6", + "version": "0.5.2-beta-9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.2-beta-6", + "version": "0.5.2-beta-9", "license": "ISC", "dependencies": { "@types/react-dates": "^21.8.6", diff --git a/package.json b/package.json index ec2424a41..e3d11be60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.2-beta-6", + "version": "0.5.2-beta-9", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", From 64f026bdba1982cbcc0dabf663d19a25358a1648 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Tue, 22 Oct 2024 11:55:37 +0530 Subject: [PATCH 13/15] Update version in package-lock.json and package.json --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a5841757..947e85d82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.8-beta-1", + "version": "0.5.8-beta-2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.8-beta-1", + "version": "0.5.8-beta-2", "license": "ISC", "dependencies": { "@types/react-dates": "^21.8.6", diff --git a/package.json b/package.json index 11a8b0bd6..6b90aa90c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "0.5.8-beta-1", + "version": "0.5.8-beta-2", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", From 89dc9f920e6bcd0aad96056efe51c4df897a9665 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Wed, 23 Oct 2024 10:37:20 +0530 Subject: [PATCH 14/15] chore: add a comment for CDPipeline build stage --- src/Common/Policy.Types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Common/Policy.Types.ts b/src/Common/Policy.Types.ts index 0ccb54a77..b18617026 100644 --- a/src/Common/Policy.Types.ts +++ b/src/Common/Policy.Types.ts @@ -30,6 +30,7 @@ export enum ApplyPolicyToStage { POST_CD = 'POST_CD', } +// FIXME: The name build is getting is used in CDPipeline. // This enum is mapping values from BuildStageVariable export enum PluginRequiredStage { PRE_STAGE = 'preBuildStage', From 840effffca45ee307f59011eb290e10ca9400999 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Wed, 23 Oct 2024 12:15:13 +0530 Subject: [PATCH 15/15] fix: remove isLatest from plugin info due to volatile nature --- src/Shared/Components/Plugin/types.ts | 7 ++----- src/Shared/Components/Plugin/utils.tsx | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Shared/Components/Plugin/types.ts b/src/Shared/Components/Plugin/types.ts index 8c2c68c3d..972c2f8d2 100644 --- a/src/Shared/Components/Plugin/types.ts +++ b/src/Shared/Components/Plugin/types.ts @@ -104,7 +104,7 @@ export interface PluginListFiltersType extends Pick { latestVersionId: MinimalPluginVersionDataDTO['id'] pluginVersions: MinimalPluginVersionDataDTO[] @@ -112,10 +112,7 @@ interface ParentPluginType interface DetailedPluginVersionType extends Pick, - Pick< - DetailedPluginVersionDTO, - 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink' - >, + Pick, Pick { parentPluginId: ParentPluginType['id'] } diff --git a/src/Shared/Components/Plugin/utils.tsx b/src/Shared/Components/Plugin/utils.tsx index e8b6c1b21..271939a7c 100644 --- a/src/Shared/Components/Plugin/utils.tsx +++ b/src/Shared/Components/Plugin/utils.tsx @@ -84,7 +84,6 @@ export const parsePluginDetailsDTOIntoPluginStore = (pluginData: ParentPluginDTO plugin.type === PluginCreationType.SHARED ? pluginVersionData.updatedBy : DEFAULT_PLUGIN_CREATED_BY, outputVariables: pluginVersionData.outputVariables || [], inputVariables: pluginVersionData.inputVariables || [], - isLatest: pluginVersionData.isLatest || false, tags: sortedUniqueTags, parentPluginId: plugin.id, icon: plugin.icon || '',