fix(agent-service, v1.2): delete links targeting removed input ports when shrinking input ports - #7637
Draft
github-actions[bot] wants to merge 1 commit into
Conversation
…hrinking input ports (#7349) ### What changes were proposed in this PR? This PR fixes a bug in `WorkflowState.updateOperatorInputPorts` where shrinking an operator's input port count left links targeting removed input ports. The method now removes any links whose target port no longer exists by calling `deleteLink`, preventing dangling links from remaining in the workflow state. A regression test was also added to verify that links targeting deleted input ports are removed when the input port count is reduced. ### Any related issues, documentation, discussions? Closes #7169 ### How was this PR tested? Added a regression test covering the case where an operator's input ports are reduced while a link targets one of the removed ports. Verified with: ```bash bun test --test-name-pattern="removes links targeting input ports that are dropped" bun test ``` Before: <img width="1716" height="1160" alt="image" src="https://github.com/user-attachments/assets/bcfd23cb-aa4b-4f8e-87c1-46f0eda3e3e4" /> After: <img width="1716" height="984" alt="image" src="https://github.com/user-attachments/assets/f9937312-80f8-423b-8ec7-d7c522319b90" /> ### Was this PR authored or co-authored using generative AI tooling? (backported from commit 12169c2) Generated-by: ChatGPT (5.5 mini)
Contributor
Author
|
The cherry-pick conflicted and was committed with conflict markers. Resolve the conflicts on this branch, then mark this PR ready for review. Conflicting files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Automated backport of #7349 to
release/v1.2.Source: 12169c2 · automation run
Any related issues, documentation, discussions?
Backport of #7349. Originally linked #7169.
How was this PR tested?
Release-branch CI runs on this branch once the conflicts are resolved and this PR is marked ready for review.
Was this PR authored or co-authored using generative AI tooling?
No.