Skip to content

feat: custom plugin condition details#3096

Merged
AbhishekA1509 merged 9 commits into
mainfrom
feat/custom-plugin-condition-details
Apr 21, 2026
Merged

feat: custom plugin condition details#3096
AbhishekA1509 merged 9 commits into
mainfrom
feat/custom-plugin-condition-details

Conversation

@AbhishekA1509

@AbhishekA1509 AbhishekA1509 commented Apr 17, 2026

Copy link
Copy Markdown
Member

Description

This pull request introduces significant enhancements to how plugin condition details and variables are handled in the CI Pipeline plugin modal and related utilities. The main improvements include extracting and associating plugin condition details with input/output variables, updating payload construction logic to include these details, and improving type definitions to support the new structure. These changes improve the accuracy and flexibility of plugin configuration and condition handling.

Enhancements to plugin variable and condition handling:

  • Added utility function getConditionDetailsAndVariablesFromPlugin to extract condition details and clean variable lists from plugin input/output variables. This is used in both the plugin modal and pre-build step to ensure condition details are correctly associated and passed. [1] [2] [3] [4]
  • Updated the plugin selection and creation flows to use the extracted plugin condition details and cleaned variables, ensuring that condition details are consistently included when setting or updating plugin steps. [1] [2] [3] [4] [5]

Improvements to payload construction and variable parsing:

  • Refactored parseInputVariablesIntoCreatePluginPayload to include associated condition details and additional properties (valueConstraint, isRuntimeArg, pluginStepCondition) when available, improving the fidelity of plugin step payloads. [1] [2] [3]
  • Enhanced getCreatePluginPayload to split condition details into input and output categories using a new utility, and to pass the correct set of conditions to each variable list. [1] [2]

Type and dependency updates:

  • Extended type definitions to support new fields (pluginStepCondition, valueConstraint, isRuntimeArg) on plugin step variable items, and imported additional types as needed. [1] [2] [3] [4]
  • Updated the dependency on @devtron-labs/devtron-fe-common-lib to version 1.23.5-beta-2 in package.json to ensure compatibility with new types and features.

New utility for condition detail categorization:

  • Added getInputOutputConditionDetails in cdpipeline.util.tsx to categorize condition details as input or output based on their type, supporting more precise payload construction.

These changes collectively make plugin step configuration more robust and maintainable, especially regarding the handling of complex condition logic.

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

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

@github-actions

Copy link
Copy Markdown

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 Apr 17, 2026
@github-actions

Copy link
Copy Markdown

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

1 similar comment
@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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

arunjaindev
arunjaindev previously approved these changes Apr 21, 2026
@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 Apr 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

@AbhishekA1509 AbhishekA1509 merged commit 9712a96 into main Apr 21, 2026
10 checks passed
@AbhishekA1509 AbhishekA1509 deleted the feat/custom-plugin-condition-details branch April 21, 2026 09:17
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