bug: Report detailed compatibility errors on incompatible SyncTarget.Status.ResourcesToSync
#33
Labels
good first issue
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
Describe the bug
When a resource to sync on a SyncTarget is incompatible, there are not details about the compatibility errors between the KCP schema and the SyncTarget schema.
That makes it quite hard to understand what happens.
Steps To Reproduce
root:compute:kubernetes
APIExportSyncTarget.Status.ResourcesToSync
list have theIncompatible
state, but don't provide any more detail.Expected Behaviour
We should have a compatibility detailed error message.
This should be possible, since the internal code used to do the compatibility check returns a list of errors (missing field, incompatible types, etc...)
Additional Context
Here is the code where the at least the
err.Error()
of the error coming from theschemacompat.EnsureStructuralSchemaCompatibility()
call should be added in a detailed message on theResourceToSync
:https://github.com/kcp-dev/kcp/blob/60ba17a1780879d4418ab8d1e90abc6ece65cbba/pkg/reconciler/workload/synctargetexports/synctargetcompatible_reconcile.go#L122-L128
The text was updated successfully, but these errors were encountered: