-
Notifications
You must be signed in to change notification settings - Fork 142
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
Keeping backends in directors when backends are modified #304
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. I'd like @phamann to take a look.
Below are just suggestions, overall this change looks good to me.
I was a bit overwhelmed by the change to formatVersion
to use the new helper. Was this necessary for this change? Could we pull that out into a separate branch so that this change is strictly focused on the backend/director update? The only other suggestion that I had was to pull the new Diff
logic out into its own change and to update the existing codebase to use that new logic, so that if we could test it with existing resources and rollback separately, if necessary.
@@ -67,7 +67,7 @@ func (h *SumologicServiceAttributeHandler) Process(d *schema.ResourceData, lates | |||
URL: sf["url"].(string), | |||
MessageType: sf["message_type"].(string), | |||
Format: vla.format, | |||
FormatVersion: int(vla.formatVersion), | |||
FormatVersion: int(uintWithDefault(vla.formatVersion)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting Sumologic uses int
- https://github.com/fastly/go-fastly/blob/master/fastly/sumologic.go#L21
This has been documented internally as a breaking change TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Some minor comments and some of @mccurdyc's suggestions still need to be addressed.
…backends instead of recreating them
Acceptance Tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Thank you for fixing this with a clean implementation 🎉
Fixes #143
This change is based on the Option 2 described on #197 and some further analysis to determine the best option.
I've made the Diff computation a separate component so that in the future, other parts of the code can re-use it to perform updates instead of delete/create.
I've also fixed some unrelated issues with logging endpoints on the compute resource (see commit cc7bec3) which was causing the acceptance tests to fail.
Acceptance Test results