knockknock10 commented on code in PR #6997:
URL: https://github.com/apache/camel-k/pull/6997#discussion_r4757790909
##########
pkg/trait/deployer.go:
##########
@@ -61,6 +95,97 @@ func (t *deployerTrait) Apply(e *Environment) error {
return nil
}
+type resourceSnapshot struct {
Review Comment:
Added a comment above the struct explaining what it stores and why we need
it. We save the old resource before applying the new one so we can put it back
if the apply fails. It's also saved before Apply because the resource might
already have been changed even when Apply returns an error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]