Skip to content

Fix state upgrade panic; migrate legacy attribute; add tests - #124

Merged
devops-rob merged 4 commits into
devops-rob:mainfrom
IonutLupsan:main
Jan 14, 2026
Merged

Fix state upgrade panic; migrate legacy attribute; add tests#124
devops-rob merged 4 commits into
devops-rob:mainfrom
IonutLupsan:main

Conversation

@IonutLupsan

Copy link
Copy Markdown
Contributor
  • Prevent panic during resource state upgrade.
  • Migrate legacy destroy_parameters to destroy_request_parameters.
  • Preserve existing state where possible; set skip_read and clear read_* per v1.
  • Add upgrade tests (including null legacy field) and generalize test data.

Notes:

  • All provider tests pass locally.
  • Generated with GitHub Copilot.

Updated state upgrade logic to handle attribute rename from 'destroy_parameters' to 'destroy_request_parameters'. Added manual state extraction for compatibility with v0.
Added helper functions to extract values from raw state during upgrade and modified state extraction logic to handle missing attributes more robustly.
Add tests for state upgrade handling of destroy parameters
@devops-rob

Copy link
Copy Markdown
Owner

Thanks for this. Truly appreciated. I'll get this review done by tomorrow latest. It's an honour to have your contribution

@devops-rob

Copy link
Copy Markdown
Owner

@IonutLupsan Thanks again for doing this. The linter is failing on line 971 of the test. It looks like you assign the variable req then re-assign the value before using it on line 991. When you have a moment, could you please take a look and push an update. I'll re-run the action then. Thanks again

@IonutLupsan

Copy link
Copy Markdown
Contributor Author

Hopefully everything is fine now.

@IonutLupsan

Copy link
Copy Markdown
Contributor Author

Following up on loose ends - can you re-run the action again ?

@devops-rob
devops-rob merged commit bf95d90 into devops-rob:main Jan 14, 2026
11 checks passed
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.

2 participants