Skip to content

fix: detect resource deletion in duplicate deployment filter - #4328

Open
omkasera972-ai wants to merge 1 commit into
flowable:mainfrom
omkasera972-ai:fix/deployment-resource-deletion-bug
Open

omkasera972-ai wants to merge 1 commit into
flowable:mainfrom
omkasera972-ai:fix/deployment-resource-deletion-bug

Conversation

@omkasera972-ai

Copy link
Copy Markdown

Description

This pull request fixes a logic bug in the duplicate deployment filter (deploymentsDiffer method inside DeployCmd).

Previously, when checking if a new deployment differed from an existing saved deployment, the code only iterated over the resources present in the new deployment. If a user deleted a non-generated resource (such as a BPMN XML file) while keeping the remaining resources identical, the duplicate detector failed to notice the deletion and incorrectly returned false. This caused the engine to skip creating the new deployment and retain the old state.

Changes

  • Updated deploymentsDiffer in DeployCmd.java to iterate through savedResources and check if any non-generated resource was removed (i.e., exists in saved deployment but missing in the new deployment).
  • If a resource deletion is detected, it correctly returns true, triggering a new deployment.

Checklist

  • Unit tests: NA (Logic fix on duplicate filter check)
  • Documentation: NA

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant