Skip to content

Can't stop composed resource watches when XRD is deleted #6396

@negz

Description

@negz

What happened?

We see this in the realtime composition E2E tests a lot:

CompositeResourceDefinition/xparents.example.org cannot stop composite resource controller: cannot stop "ComposedResource" watch for "nop.crossplane.io/v1alpha1, Kind=NopResource": cannot get informer for *composed.Unstructured: Timeout: failed waiting for *composed.Unstructured Informer to sync

It's coming from:

if err := w.Stop(ctx); err != nil {
return errors.Wrapf(err, "cannot stop %q watch for %q", wid.Type, wid.GVK)
}

...and in turn...

i, err := s.infs.GetInformer(ctx, s.Type)
if err != nil {
return errors.Wrapf(err, "cannot get informer for %T", s.Type)
}

Interestingly we must've been able to get the informer at some point, because we were able to start the watch:

i, err := s.infs.GetInformer(ctx, s.Type, cache.BlockUntilSynced(true))
if err != nil {
return errors.Wrapf(err, "cannot get informer for %T", s.Type)
}

How can we reproduce it?

Delete an XRD with realtime composition enabled. It doesn't seem to happen every time, but it does happen pretty often (I reproduced it locally first attempt).

What environment did it happen in?

Crossplane version:

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions