Skip to content

Preserve nested REST attribute changes on save - #1470

Open
efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:efe/fix-nested-rest-state
Open

efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:efe/fix-nested-rest-state

Conversation

@efegokdemir

Copy link
Copy Markdown

Description

Fixes #1331

create_instance kept mutable nested response values by reference in original_state, so in-place edits also changed the comparison baseline and could be omitted from save requests. This deep-copies the baseline and adds a regression test.

How has this been tested?

  • bundle exec rake test:library — 343 tests passed.
  • API_VERSION=2026_07 bundle exec rake test:rest_wrappers — 626 tests passed.
  • Targeted RuboCop passed.
  • The regression test failed before the fix and passed after it. The all-version wrapper suite was not completed.

Checklist:

  • My commit message follows the pattern described in here
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the project documentation.
  • I have added a changelog line.

@github-actions github-actions Bot added the devtools-gardener Post the issue or PR to Slack for the gardener label Oct 12, 2026

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

devtools-gardener Post the issue or PR to Slack for the gardener

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hashdiff does not see change if nested object is updated in place due to same reference value in resource object and original_state

1 participant