Skip to content

feat: add flux in deployment types #2770

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

arunjaindev
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

@github-actions github-actions bot added the PR:Issue-verification-failed PR:Issue-verification-failed label Jun 13, 2025
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

import { repoType } from '../../../../config'
import UserGitRepo from '../../../gitOps/UserGitRepo'
import { getChartValuesFiltered } from '@Components/charts/charts.helper'
import { ChartValuesType } from '@Components/charts/charts.types'
import { ConfigureGitopsInfoBlock } from '@Components/workflowEditor/ConfigureGitopsInfoBlock'
import DeploymentTypeIcon, {
DEPLOYMENT_TYPE_TO_TEXT_MAP,
} from '@Components/common/DeploymentTypeIcon/DeploymentTypeIcon'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use barrel import

<Helm className="icon-dim-24 ml-6" />
)}
<span className="fs-13 fw-6 cn-9 md-6" data-testid="deployment-type">
{DEPLOYMENT_TYPE_TO_TEXT_MAP[commonState.installedConfig.deploymentAppType as DeploymentAppTypes] ??
Copy link
Member

@AbhishekA1509 AbhishekA1509 Jun 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null check not required if correct type is given to DEPLOYMENT_TYPE_TO_TEXT_MAP since records expect all enums and undefined will also not render anything [but in this case then span should not be rendered as well]

<RadioGroupItem
dataTestId="flux-deployment"
value={DeploymentAppTypes.FLUX}
disabled={allowedDeploymentTypes.indexOf(DeploymentAppTypes.FLUX) === -1}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allowedDeploymentTypes.indexOf(DeploymentAppTypes.FLUX) === -1 is happening twice same for all blocks

import { importComponentFromFELibrary } from '../helpers/Helpers'

export const DEPLOYMENT_TYPE_TO_TEXT_MAP = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add type can use exclude

const className = `icon-dim-${iconSize}`
switch (deploymentAppType) {
case DeploymentAppTypes.GITOPS:
return <ArgoCD data-testid="argo-cd-app-logo" className={className} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible lets try make const maps since they break on addition of type if vaue is not present

Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

Copy link

Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Issue-verification-failed PR:Issue-verification-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants