Logging in rest.Request.Body cannot be made context-aware without an API
change. Such a change is complicated if done in a backwards-compatible
fashion (must change lots of callers in Kubernetes) and prohibitive if not (all
callers of Body would have to pass a context).
Instead, logging of the request body gets moved into the functions which send
the request. This is a change of behavior, but it is limited to log levels >= 8
and thus should have no impact in production.
A request which gets sent multiple times will also log the body multiple
times. This might even be a good thing because it serves as reminder what is
being sent when it is being sent.
While at it, stack backtracing gets enhanced so that the caller of the REST API
is logged and tests for the new behavior get added.
Kubernetes-commit: 57f9b7c7a2412865e7817dbf7638881b00ac9721
I am moving myself to emeritus as I am now firmly on the end-user side
of things.
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Kubernetes-commit: 3ab816dcabf37acda33c665ab5aa85f1f6163bc1
These are long gone, removed in 2016:
* AuthPath removal: https://github.com/kubernetes/kubernetes/pull/29216
* Flag removal: https://github.com/kubernetes/kubernetes/pull/40048
This removes the remnants from clientcmd, mostly in the comments
describing how the configuration is loaded.
Since getServerIdentificationPartialConfig can no longer fail (it
copies fields from one struct to another), this drops the error
return, along with the error handling in the caller.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Kubernetes-commit: 8a8238ba7f850241de9c5cc4b22fa1a6b6a19480
This change renames NewTypedDelayingQueue to NewTypedDelayingQueue to
stay consistent with the naming scheme in the package. A
NewTypedDelayingQueue constructor is kept for backwards compatibility
but marked as deprecated.
Kubernetes-commit: 45da5dc30ecf0ba4c4b44befd96b8617278c496b
This commit refactors the `renew` function in the leader election package to replace
the deprecated `wait.PollImmediateUntil` with `wait.PollUntilContextTimeout`.
This change simplifies the context handling by removing the need for an additional
timeout context and its cancellation.
The previous implementation created a timeout context for each retry period,
which added unnecessary complexity. The new implementation directly passes the parent
context to the retry function, ensuring that the timeout is handled within `PollUntilContextTimeout`.
This change also ensures that the context passed to `tryAcquireOrRenew` and
`tryCoordinatedRenew` is consistent, improving the readability and maintainability of the code.
Kubernetes-commit: 3d2f498aa31cb2e90bcfc372b7930aed0604fbef
I was workinng on updating a dependency, and noticed that running
hack/update-vendor.sh resulted in a diff. Comitting the result
as a PR.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Kubernetes-commit: aeb607443dd9b8ee378ee10209e9b446256f3ee2
The Error method of the error returned from Request.Watch was "unknown"
even the server returned clear message in the Status struct. It was
because Request.Watch used the Result's err member directly, which is an
unstructured error from the response which the Result object may use if
the caller did not return a structured error.
The patch fixes it by calling the Result's Error method instead, which
returns the structured error when it's present.
It also removes the wrong expectation about events.
Kubernetes-commit: 596c5696c64023808af164284263647d795b0ac2