-
Notifications
You must be signed in to change notification settings - Fork 823
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
Cleanup Patch Sidecar Logging #3973
Conversation
Build Succeeded 🥳 Build Id: 74589f1c-5abe-4017-b56d-b22785ad1dba The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
@@ -457,7 +458,12 @@ func (s *SDKServer) patchGameServer(ctx context.Context, gs, gsCopy *agonesv1.Ga | |||
return nil, err |
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.
Do we also need to account for this error return as well?
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 double checked - this is already wrapped, so we don't have to re-wrap it.
Also, if there is an issue with creating a patch, that's really shouldn't happen and should definitely be logged.
Build Succeeded 🥳 Build Id: 88e25500-7625-4f75-832f-6e7a4175112b The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Missed this little of nuance in code review when moving to Patch with the SDK Sidecar - in that a Patch operation doesn't return a Conflict error type/status value if it fails, so every time it does, the Agones sidecar will log it as an error on production installs. So this cleaned up a few things: * renamed "debugError" type to "traceError" type, since we only log it under Trace, not Debug. * if `patchGameServer` fails under the error `IsInvalid`, wrap it in a TraceError so it doesn't show up in prod. * Wrapped the error with `errors` context, such that if the patch does fail, it's far easier now to work out where it failed. Closes googleforgames#3967
071f92c
to
12ec087
Compare
Build Succeeded 🥳 Build Id: bd4e58ac-ec69-4e9c-88cc-4cb3861f3a30 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
/kind bug
What this PR does / Why we need it:
Missed this little of nuance in code review when moving to Patch with the SDK Sidecar - in that a Patch operation doesn't return a Conflict error type/status value if it fails, so every time it does, the Agones sidecar will log it as an error on production installs.
So this cleaned up a few things:
patchGameServer
fails under the errorIsInvalid
, wrap it in a TraceError so it doesn't show up in prod.errors
context, such that if the patch does fail, it's far easier now to work out where it failed.Which issue(s) this PR fixes:
Closes #3967
Special notes for your reviewer: