Skip to content

feat: add support for flux steps in deployment timeline #782

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

Merged
merged 21 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
42025a4
feat: add support for flux steps in deployment timeline
arunjaindev Jun 13, 2025
aa07a41
chore: update steps for flux
arunjaindev Jun 13, 2025
05a8262
feat: add deployment app type in history
arunjaindev Jun 13, 2025
01515bb
chore: version bump
arunjaindev Jun 13, 2025
fd2c4bb
fix: use deployment type from service and not app details
arunjaindev Jun 13, 2025
f100d3b
feat: undefined deploymentType in case of failed status
arunjaindev Jun 14, 2025
de1ba60
chore: version bump
arunjaindev Jun 14, 2025
e80662b
feat: rename deployment app type gitops to argo
arunjaindev Jun 18, 2025
bbcb6c7
chore: add feature flag
arunjaindev Jun 19, 2025
c669841
Merge branch 'main' of https://github.com/devtron-labs/devtron-fe-com…
arunjaindev Jun 23, 2025
526e6dc
Merge branch 'feat/flux-deployment' of https://github.com/devtron-lab…
arunjaindev Jun 23, 2025
09ba4eb
Merge pull request #790 from devtron-labs/feat/link-external-flux
arunjaindev Jun 26, 2025
49dd5f0
fix: add root margin of 1px and increase sentinel height by 1px to ov…
AbhishekA1509 Jun 26, 2025
4fa194c
chore(version): bump version to 1.16.1 in package.json and package-lo…
AbhishekA1509 Jun 26, 2025
8d581ff
refactor: replace hardcoded sentinel height with constant for better …
AbhishekA1509 Jun 26, 2025
faaa9f1
Merge pull request #801 from devtron-labs/fix/use-sticky-decimal-width
AbhishekA1509 Jun 26, 2025
8b85c0e
Merge branch 'main' of https://github.com/devtron-labs/devtron-fe-com…
arunjaindev Jul 1, 2025
0962489
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
arunjaindev Jul 1, 2025
5fd6de9
chore: update tippy for status
arunjaindev Jul 1, 2025
a8e5055
chore: add fallback for deployment app type
arunjaindev Jul 2, 2025
9f1e412
chore: make prop for deployment app type required in status breakdown…
arunjaindev Jul 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Common/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export enum DeploymentAppTypes {
GITOPS = 'argo_cd',
MANIFEST_DOWNLOAD = 'manifest_download',
MANIFEST_PUSH = 'manifest_push',
FLUX = 'flux',
FLUX = 'flux_cd',
}

export interface VulnerabilityType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const AppStatusModal = ({
}
: null,
isHelmApp: appDetails.appType === AppType.DEVTRON_HELM_CHART,
deploymentAppType: appDetails.deploymentAppType,
}),
deploymentStatusAbortControllerRef,
)
Expand Down
3 changes: 2 additions & 1 deletion src/Shared/Components/AppStatusModal/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const getDeploymentStatusWithTimeline = async ({
showTimeline,
virtualEnvironmentConfig,
isHelmApp,
deploymentAppType,
}: GetDeploymentStatusWithTimelineParamsType): Promise<DeploymentStatusDetailsBreakdownDataType> => {
const baseURL = isHelmApp ? ROUTES.HELM_DEPLOYMENT_STATUS_TIMELINE_INSTALLED_APP : ROUTES.DEPLOYMENT_STATUS

Expand All @@ -68,5 +69,5 @@ export const getDeploymentStatusWithTimeline = async ({

return virtualEnvironmentConfig
? virtualEnvironmentConfig.processVirtualEnvironmentDeploymentData(deploymentStatusDetailsResponse.result)
: processDeploymentStatusDetailsData(deploymentStatusDetailsResponse.result)
: processDeploymentStatusDetailsData(deploymentAppType, deploymentStatusDetailsResponse.result)
}
3 changes: 2 additions & 1 deletion src/Shared/Components/AppStatusModal/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FunctionComponent, PropsWithChildren, ReactNode } from 'react'

import { APIOptions } from '@Common/Types'
import { APIOptions, DeploymentAppTypes } from '@Common/Types'
import {
AppDetails,
ConfigDriftModalProps,
Expand Down Expand Up @@ -85,6 +85,7 @@ export type GetDeploymentStatusWithTimelineParamsType = Pick<APIOptions, 'abortC
wfrId: AppDetails['resourceTree']['wfrId']
}
isHelmApp?: boolean
deploymentAppType: DeploymentAppTypes
}

export interface AppStatusModalTabListProps extends Pick<AppStatusModalProps, 'appDetails' | 'type'> {
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/Components/CICDHistory/DeploymentDetailSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const DeploymentDetailSteps = ({
const processedData =
isVirtualEnv.current && processVirtualEnvironmentDeploymentData
? processVirtualEnvironmentDeploymentData()
: processDeploymentStatusDetailsData()
: processDeploymentStatusDetailsData(appDetails?.deploymentAppType)
const [deploymentStatusDetailsBreakdownData, setDeploymentStatusDetailsBreakdownData] =
useState<DeploymentStatusDetailsBreakdownDataType>(processedData)

Expand Down Expand Up @@ -115,7 +115,7 @@ const DeploymentDetailSteps = ({
const processedDeploymentStatusDetailsData =
isVirtualEnv.current && processVirtualEnvironmentDeploymentData
? processVirtualEnvironmentDeploymentData(deploymentStatusDetailRes)
: processDeploymentStatusDetailsData(deploymentStatusDetailRes)
: processDeploymentStatusDetailsData(appDetails?.deploymentAppType, deploymentStatusDetailRes)
clearDeploymentStatusTimer()
// If deployment status is in progress then fetch data in every 10 seconds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { Fragment } from 'react'

import { DeploymentAppTypes } from '@Common/Types'
import { TIMELINE_STATUS } from '@Shared/types'

import { InfoBlock } from '../InfoBlock'
Expand Down Expand Up @@ -58,8 +59,9 @@ const DeploymentStatusDetailBreakdown = ({
{(
[
TIMELINE_STATUS.GIT_COMMIT,
TIMELINE_STATUS.ARGOCD_SYNC,
TIMELINE_STATUS.KUBECTL_APPLY,
...(deploymentStatusDetailRowProps.appDetails.deploymentAppType === DeploymentAppTypes.FLUX
? []
: [TIMELINE_STATUS.ARGOCD_SYNC, TIMELINE_STATUS.KUBECTL_APPLY]),
] as DeploymentStatusDetailRowType['type'][]
).map((timelineStatus) => (
<Fragment key={timelineStatus}>
Expand Down
34 changes: 22 additions & 12 deletions src/Shared/Components/DeploymentStatusBreakdown/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-param-reassign */
import { findRight, handleUTCTime, logExceptionToSentry } from '@Common/Helper'
import { DeploymentAppTypes } from '@Common/Types'
import { DEPLOYMENT_STATUS } from '@Shared/constants'
import {
DeploymentPhaseType,
Expand All @@ -22,6 +23,7 @@ import {
import { ProcessUnableToFetchOrTimedOutStatusType } from './types'

const getDefaultDeploymentStatusTimeline = (
deploymentAppType: DeploymentAppTypes,
data?: DeploymentStatusDetailsType,
): DeploymentStatusDetailsBreakdownDataType => {
const commonProps: Pick<
Expand Down Expand Up @@ -58,19 +60,26 @@ const getDefaultDeploymentStatusTimeline = (
...commonProps,
displayText: 'Push manifest to Git',
},
[TIMELINE_STATUS.ARGOCD_SYNC]: {
...commonProps,
displayText: 'Synced with Argo CD',
},
[TIMELINE_STATUS.KUBECTL_APPLY]: {
...commonProps,
displayText: 'Apply manifest to Kubernetes',
resourceDetails: [],
subSteps: [],
},
...(deploymentAppType === DeploymentAppTypes.GITOPS
? {
[TIMELINE_STATUS.ARGOCD_SYNC]: {
...commonProps,
displayText: 'Synced with Argo CD',
},
[TIMELINE_STATUS.KUBECTL_APPLY]: {
...commonProps,
displayText: 'Apply manifest to Kubernetes',
resourceDetails: [],
subSteps: [],
},
}
: {}),
[TIMELINE_STATUS.APP_HEALTH]: {
...commonProps,
displayText: 'Propagate manifest to Kubernetes resources',
displayText:
deploymentAppType === DeploymentAppTypes.FLUX
? 'Synced with Flux CD'
: 'Propagate manifest to Kubernetes resources',
},
},
errorBarConfig: deploymentErrorMessage
Expand Down Expand Up @@ -233,12 +242,13 @@ const processKubeCTLApply = (
* - In similar fashion based on the deploymentStatus we will set the icon and display text for the timeline.
*/
export const processDeploymentStatusDetailsData = (
deploymentAppType: DeploymentAppTypes,
data?: DeploymentStatusDetailsType,
): DeploymentStatusDetailsBreakdownDataType => {
if (data && !WFR_STATUS_DTO_TO_DEPLOYMENT_STATUS_MAP[data.wfrStatus]) {
logExceptionToSentry(new Error(`New WFR status found: ${data?.wfrStatus}`))
}
const deploymentData = getDefaultDeploymentStatusTimeline(data)
const deploymentData = getDefaultDeploymentStatusTimeline(deploymentAppType, data)

const { deploymentStatus } = deploymentData

Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ export interface customEnv {
*/
FEATURE_MANAGE_TRAFFIC_ENABLE?: boolean
FEATURE_INFRA_PROVISION_INFO_BLOCK_HIDE?: boolean
/**
* If true, will add flux option to deployment types in devtron apps and devtron charts
* @default false
*/
FEATURE_FLUX_DEPLOYMENTS_ENABLE?: boolean
}
declare global {
interface Window {
Expand Down