Skip to content

Conversation

arunjaindev
Copy link
Contributor

@arunjaindev arunjaindev commented Jul 25, 2025

Description

This PR refactors the CD trigger view components by removing duplication between CDMaterial and BulkCD components in EnvTriggerView and TriggerView. The main goal is to consolidate shared functionality into a new DeployImageModal component that can handle both individual and bulk deployment triggers.

  • Created a new unified DeployImageModal component structure to replace the duplicated CDMaterial component
  • Replaced the old CDMaterial component usage in TriggerView with the new DeployImageModal
  • Updated type definitions to use the new consolidated material type structure

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2502

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?

QA

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

arunjaindev and others added 27 commits July 25, 2025 16:26
…te components

- Added ImageSelectionCTA component for handling image selection logic and UI.
- Introduced MaterialListEmptyState component to manage and display empty states for material lists.
- Updated DeployImageModal to integrate new components and improve state management.
- Refactored utility functions to support new features and enhance code readability.
- Improved type definitions for better TypeScript support and maintainability.
…state management and improve code readability
- Added support for bulk deployment of images, including new tag selection options.
- Introduced constants for bulk deployment image tags.
- Updated DeployImageContent to handle bulk trigger scenarios and render appropriate UI elements.
- Enhanced DeployImageHeader to accept a custom title prop for better flexibility.
- Refactored rendering logic in DeployImageContent to improve readability and maintainability.
- Added new types for better type safety and clarity in props.
- Implemented error handling and empty state management for various deployment scenarios.
…rror handling, prop defaults, and layout adjustments
…derImages functionality and enhance error handling
…ageContent for improved image selection handling
…DeployImageContent for enhanced empty state handling
…e initialization and streamline image selection handling
…loyment handling and state management

- Refactored BulkDeployModal to streamline image selection and deployment logic.
- Integrated new utility functions for better handling of deployment window metadata and bulk CD details.
- Updated service functions to fetch deployment window maps and handle API responses more effectively.
- Improved type definitions for better clarity and maintainability.
- Adjusted BulkTriggerSidebar to reflect changes in error handling for unauthorized access.
- Cleaned up unused constants and imports across the affected files.
…nt and update dependency in DeployImageModal
…ployImageContent layout for better filter handling
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

vivek-devtron
vivek-devtron previously approved these changes Aug 11, 2025
@github-actions github-actions bot added PR:Ready-to-Review PR:Ready-to-Review and removed PR:Issue-verification-failed PR:Issue-verification-failed labels Aug 18, 2025
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@AbhishekA1509 AbhishekA1509 merged commit 9b03cad into develop Aug 18, 2025
9 of 10 checks passed
@AbhishekA1509 AbhishekA1509 deleted the fix/cd-trigger branch August 18, 2025 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Ready-to-Review PR:Ready-to-Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants