Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: unstable response values may cause provider produced inconsistant results #687

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

ms-henglu
Copy link
Member

@ms-henglu ms-henglu commented Dec 5, 2024

fixes #671
fixes #644

The default output feature will set the readonly fields to the output by default. But the readonly fields contain fields like "etag", "lastModifiedBy" which could be easily changed and it'll cause the provider produced inconsistent result after apply.

This PR removes above fields from default output.

@ms-henglu ms-henglu requested review from magodo and Copilot December 5, 2024 05:16
@ms-henglu ms-henglu added this to the v2.2.0 milestone Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 8 changed files in this pull request and generated no suggestions.

Files not reviewed (3)
  • internal/services/azapi_resource_data_source.go: Evaluated as low risk
  • internal/services/azapi_update_resource.go: Evaluated as low risk
  • internal/services/azapi_resource.go: Evaluated as low risk
Comments skipped due to low confidence (1)

utils/json.go:293

  • [nitpick] The function name 'RemoveFields' is too generic. Consider renaming it to something more descriptive like 'RemoveFieldsFromJSON'.
func RemoveFields(input interface{}, fields []string) interface{} {
@ms-henglu ms-henglu merged commit c2f6536 into main Dec 5, 2024
10 checks passed
@ms-henglu ms-henglu deleted the issue-671 branch December 5, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants