Skip to content

refactor(frontend): deep-compare operator properties in the version diff - #9585

Open
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:fix/version-diff-deep-compare
Open

Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:fix/version-diff-deep-compare

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • getOperatorsDifference now compares operator properties with lodash isEqual over the union of both operators' property keys, so object- and array-valued properties are only highlighted when they actually change and a property present only in the newer version is detected as added.

Any related issues, documentation, discussions?

Closes: #9582

How was this PR tested?

  • Run cd frontend && ./node_modules/.bin/ng test --watch=false --include='src/app/dashboard/service/user/workflow-version/workflow-version.service.spec.ts'; expect the suite green, including new cases that deeply-equal object/array properties are not flagged, a changed nested value is flagged, and a property present only in the second operator is flagged.
  • Open a workflow version comparison for an operator with an object- or array-valued property and confirm identical properties are no longer highlighted.

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.8 in compliance with ASF

getOperatorsDifference compared each operator property with !=, so object- and array-valued properties were compared by reference and always reported as changed in the workflow version diff, and the loop iterated only the first operator's keys, so a property present only in the second version was never reported. It now compares with lodash isEqual over the union of both operators' property keys, so only genuinely changed properties are highlighted and added properties are detected.

workflow-version.service.spec adds cases that deeply-equal object and array properties are not flagged, that a changed nested value is flagged, and that a property present only in the second operator is flagged.
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @tanishqgandhi1908
    You can notify them by mentioning @tanishqgandhi1908 in a comment.

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Nov 20, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.57%. Comparing base (7f9bdf3) to head (ca90c9a).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9585   +/-   ##
=========================================
  Coverage     91.57%   91.57%           
  Complexity     5158     5158           
=========================================
  Files          1300     1300           
  Lines         58092    58094    +2     
  Branches       7615     7615           
=========================================
+ Hits          53195    53197    +2     
  Misses         2959     2959           
  Partials       1938     1938           
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 7f9bdf3
agent-service 99.56% <ø> (ø) Carriedforward from 7f9bdf3
amber 85.43% <ø> (ø) Carriedforward from 7f9bdf3
computing-unit-managing-service 63.88% <ø> (ø) Carriedforward from 7f9bdf3
config-service 87.50% <ø> (ø) Carriedforward from 7f9bdf3
file-service 82.16% <ø> (ø) Carriedforward from 7f9bdf3
frontend 96.45% <100.00%> (+<0.01%) ⬆️
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 7f9bdf3
pyamber 98.38% <ø> (ø) Carriedforward from 7f9bdf3
result-service 85.71% <ø> (ø) Carriedforward from 7f9bdf3
workflow-compiling-service 78.30% <ø> (ø) Carriedforward from 7f9bdf3

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workflow version diff highlights unchanged operator properties

2 participants