Change:
TestChangeCRD " TestChangeCRD": 37, Recently, not sure the date. No response_ /sig api-machinery
also flaking in weirdly, this doesn't show up at all in
cc I can't tell if this is related to the openapi change or not
Actually, I think this is an issue either with the test or with watch behavior, not sure which. The test starts 10 watches, lets them run, then waits for them to exit cleanly, and instead, they are getting watch errors. I can't tell if the watch errors are expected or not, or if server or watch client behavior changed here or not. Opened to debug further
and stand out as a recent change to watching
cc on whether the watching changes in could explain this integration test getting watch errors it didn't previously get
also stands out
would explain this integration test getting watch errors it didn't previously get?
the filter is enabled only when the server run option has a positive time duration (the default is zero). I searched the k/k repo, only the unit tests in enables this filter: I did a quick scan of the logs, did not see any graceful termination activity either. I will take a deeper look at the logs
and all merged changes were limited to that filter?
This is a Go test, so the entire test output is treated as the failure message. That output is very different from one failure to the other, so in triage we probably have x different "clusters" with one failure in each, instead of one cluster with x failures. I don't know what triage does with such small clusters.
we have changes in only the the filter adds to the request context, I just searched the code base, did not find any other call site for by default, should block (on a nil channel) If the test is receiving an event, it implies that the following case is executing, right?
xref: ??
Thank you all for deflaking.
/triage accepted

Discussion:
"strings" "sync" <ins> grpccodes "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" </ins> apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema"

utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" clientv3 "go.etcd.io/etcd/client/v3" "k8s.io/klog/v2" )

return wc } <ins> type etcdError interface { Code() grpccodes.Code Error() string } type grpcError interface { GRPCStatus() *grpcstatus.Status } func isCancelError(err error) bool { if err == nil { return false } if err == context.Canceled { return true } if etcdErr, ok := err.(etcdError); ok && etcdErr.Code() == grpccodes.Canceled { return true } if grpcErr, ok := err.(grpcError); ok && grpcErr.GRPCStatus().Code() == grpccodes.Canceled { return true } return false } </ins> func (wc *watchChan) run() { watchClosedCh := make(chan struct{}) go wc.startWatching(watchClosedCh)

select { case err := <-wc.errChan: <del> if err == context.Canceled { </del> <ins> if isCancelError(err) { </ins> break } errResult := transformErrorToEvent(err)

return nil } <del> // logWatchChannelErr checks whether the error is about mvcc revision compaction which is regarded as warning </del> func logWatchChannelErr(err error) { <del> if !strings.Contains(err.Error(), "mvcc: required revision has been compacted") { klog.Errorf("watch chan error: %v", err) } else { </del> <ins> switch { case strings.Contains(err.Error(), "mvcc: required revision has been compacted"): // mvcc revision compaction which is regarded as warning, not error </ins> klog.Warningf("watch chan error: %v", err) <ins> case isCancelError(err): // expected when watches close, no need to log default: klog.Errorf("watch chan error: %v", err) </ins> } }