feat: add manifest diff in deploy image modal#3055
Conversation
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
There was a problem hiding this comment.
Pull request overview
This pull request refactors the deployment configuration diff tab infrastructure by centralizing tab definitions and adds support for a "Manifest Output" tab in the pipeline deployment config diff view. The changes improve maintainability by moving shared constants and utilities to a centralized location while adding new functionality for manifest comparison.
Changes:
- Centralized deployment config diff tab definitions from component-specific files to
Pages/Sharedfor reusability - Added manifest output tab functionality with new data fetching logic and error handling
- Enhanced UI to conditionally disable sorting and scope variables for manifest view
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Pages/Shared/constants.ts | New file defining centralized deployment config diff tab constants |
| src/Pages/Shared/utils.ts | New file with utility function to get tab configuration |
| src/Pages/Shared/index.ts | Exports for the new shared constants and utilities |
| src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/utils.ts | Removed tab definitions that were moved to shared location |
| src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompare.tsx | Updated imports to use centralized tab definitions |
| src/components/app/details/triggerView/PipelineConfigDiff/usePipelineDeploymentConfig.ts | Major changes: added manifest data fetching logic, tab configuration, and enhanced error/loading state handling |
| src/components/app/details/triggerView/PipelineConfigDiff/types.ts | Extended types to include tabConfig and navHelpText properties |
| src/components/app/details/triggerView/PipelineConfigDiff/PipelineConfigDiff.tsx | Added logic to conditionally disable sorting for manifest view |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/components/app/details/triggerView/PipelineConfigDiff/usePipelineDeploymentConfig.ts
Show resolved
Hide resolved
src/components/app/details/triggerView/PipelineConfigDiff/usePipelineDeploymentConfig.ts
Show resolved
Hide resolved
src/components/app/details/triggerView/PipelineConfigDiff/usePipelineDeploymentConfig.ts
Show resolved
Hide resolved
src/components/app/details/triggerView/PipelineConfigDiff/usePipelineDeploymentConfig.ts
Show resolved
Hide resolved
src/components/app/details/triggerView/PipelineConfigDiff/usePipelineDeploymentConfig.ts
Show resolved
Hide resolved
|



Description
This pull request refactors how deployment configuration diff tabs are defined and used, centralizing their configuration and logic for easier maintenance and consistency across the application. It also introduces support for a "Manifest Output" tab in the pipeline deployment config diff view, including new logic for fetching and displaying manifest data, and improves error and loading state handling for this new view.
Tab configuration centralization:
deploymentConfigDiffTabsandgetDeploymentConfigDiffTabsdefinitions fromDeploymentConfigCompare/utils.tstoPages/Shared/constants.tsandPages/Shared/utils.ts, and exposed them viaPages/Shared/index.tsfor use throughout the app. [1] [2] [3] [4] [5] [6]Manifest Output tab support:
usePipelineDeploymentConfigto handle the "Manifest Output" tab, including fetching manifest data for different deployment scenarios and integrating it into the diff view. [1] [2] [3] [4] [5]PipelineConfigDiffand its types to support the new tab and conditionally adjust sorting and scope variable configuration based on the active tab. [1] [2] [3] [4]Enhanced error and loading state handling:
User experience improvements:
These changes make the deployment config diff views more robust, maintainable, and user-friendly.
Fixes https://github.com/devtron-labs/sprint-tasks/issues/2813
Type of change
How Has This Been Tested?
QA
Checklist: