fix(restore): use custom CNPG group and version for scheme registration#847
Merged
leonardoce merged 2 commits intomainfrom Apr 13, 2026
Merged
fix(restore): use custom CNPG group and version for scheme registration#847leonardoce merged 2 commits intomainfrom
leonardoce merged 2 commits intomainfrom
Conversation
f9fc850 to
304b279
Compare
The restore command was missing the CUSTOM_CNPG_GROUP and CUSTOM_CNPG_VERSION environment variable bindings that other commands (e.g. instance) already had. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Extract generateScheme() from the instance package into common.GenerateScheme() and use it from both instance and restore managers. The restore manager previously used a hardcoded init() that ignored CUSTOM_CNPG_GROUP and CUSTOM_CNPG_VERSION, causing restore jobs to fail when running under a non-standard CNPG API group. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
mnencia
approved these changes
Apr 13, 2026
leonardoce
approved these changes
Apr 13, 2026
mnencia
pushed a commit
that referenced
this pull request
Apr 14, 2026
🤖 I have created a release *beep* *boop* --- ## [0.12.0](v0.11.0...v0.12.0) (2026-04-13) ### Features * **deps:** Update dependency barman to v3.18.0 ([#813](#813)) ([a8b446f](a8b446f)) ### Bug Fixes * **deps:** Update all non-major go dependencies ([#751](#751)) ([5001fe7](5001fe7)) * **deps:** Update all non-major go dependencies ([#757](#757)) ([d031c23](d031c23)) * **deps:** Update all non-major go dependencies ([#801](#801)) ([6ae101f](6ae101f)) * **deps:** Update dependency @easyops-cn/docusaurus-search-local to ^0.55.0 ([#753](#753)) ([60d32cc](60d32cc)) * **deps:** Update documentation dependencies ([#833](#833)) ([e1d4a6e](e1d4a6e)) * **deps:** Update k8s.io/utils digest to 28399d8 ([#829](#829)) ([3549e26](3549e26)) * **deps:** Update k8s.io/utils digest to b8788ab ([#784](#784)) ([f64ff8e](f64ff8e)) * **deps:** Update kubernetes packages to v0.35.2 ([#788](#788)) ([a7e28f6](a7e28f6)) * **deps:** Update module github.com/cert-manager/cert-manager to v1.19.3 [security] ([#775](#775)) ([79238f5](79238f5)) * **deps:** Update module github.com/cert-manager/cert-manager to v1.20.2 ([#844](#844)) ([441f43b](441f43b)) * **deps:** Update module github.com/cloudnative-pg/api to v1.29.0 ([#837](#837)) ([09181b0](09181b0)) * **deps:** Update module github.com/cloudnative-pg/machinery to v0.4.0 ([#850](#850)) ([18e3888](18e3888)) * **deps:** Update module google.golang.org/grpc to v1.79.3 [security] ([#819](#819)) ([376e178](376e178)) * **deps:** Update module sigs.k8s.io/controller-runtime to v0.23.3 ([#789](#789)) ([3f726ea](3f726ea)) * **deps:** Update module sigs.k8s.io/kustomize/api to v0.21.1 ([#790](#790)) ([84a388e](84a388e)) * **metrics:** Announce sidecar injection capability ([#776](#776)) ([4a94cb9](4a94cb9)) * **rbac:** Reconcile Role when ObjectStore spec changes ([#823](#823)) ([8971a39](8971a39)) * **restore:** Race condition in parallel WAL restore spool ([#812](#812)) ([25d72ce](25d72ce)) * **restore:** Use custom CNPG group and version for scheme registration ([#847](#847)) ([b1f373d](b1f373d)) * **security:** Harden GitHub Actions workflows against expression injection ([#773](#773)) ([ce7b761](ce7b761)) * Skip maintenance cycle when plugin is not enabled for backups ([#826](#826)) ([63a67cb](63a67cb)), closes [#774](#774) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: Peggie <info@cloudnative-pg.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The restore manager used a hardcoded scheme registration that ignored CUSTOM_CNPG_GROUP and CUSTOM_CNPG_VERSION, causing restore jobs to fail under non-standard CNPG API groups.
Extract
generateScheme()intocommon.GenerateScheme()and use it from both instance and restore managers.