You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing metav1 registration for CNPG scheme group version #942
The root cause is a missing metav1.AddToGroupVersion() call for the CNPG types (postgresql.cnpg.io/v1) after the controller-runtime v0.24.0 upgrade.
During the migration (PR #880), the Barman Cloud API registration (barmancloud.cnpg.io/v1) was correctly updated to include metav1.AddToGroupVersion(scheme, GroupVersion)[1], but the CNPG types registration was not. This causes the scheme to not recognize v1.GetOptions as compatible with the postgresql.cnpg.io/v1 group when the retention policy enforcement performs Client.Get() operations [2].
The fix would be to add metav1.AddToGroupVersion in both locations where CNPG types are registered:
Activity
dosubot commentedon Jun 5, 2026
The root cause is a missing
metav1.AddToGroupVersion()call for the CNPG types (postgresql.cnpg.io/v1) after the controller-runtime v0.24.0 upgrade.During the migration (PR #880), the Barman Cloud API registration (
barmancloud.cnpg.io/v1) was correctly updated to includemetav1.AddToGroupVersion(scheme, GroupVersion)[1], but the CNPG types registration was not. This causes the scheme to not recognizev1.GetOptionsas compatible with thepostgresql.cnpg.io/v1group when the retention policy enforcement performsClient.Get()operations [2].The fix would be to add
metav1.AddToGroupVersionin both locations where CNPG types are registered:internal/scheme/cnpg.go[3]:internal/cnpgi/common/scheme.go[4]:This matches the pattern already used for the Barman Cloud API group registration.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
fix(scheme): register meta types for CNPG scheme group version (#943)
feat(github-release): update release cloudnative-pg/plugin-barman-clo…
feat(github-release): update release cloudnative-pg/plugin-barman-clo…
feat(github-release): update release cloudnative-pg/plugin-barman-clo…
feat(github-release): update release cloudnative-pg/plugin-barman-clo…
chore(deps): update dependency cloudnative-pg/plugin-barman-cloud to …
chore(deps): update dependency https://github.com/cloudnative-pg/plug…