Skip to content

fix(restore): use custom CNPG group and version for scheme registration#847

Merged
leonardoce merged 2 commits intomainfrom
dev/fix-restore
Apr 13, 2026
Merged

fix(restore): use custom CNPG group and version for scheme registration#847
leonardoce merged 2 commits intomainfrom
dev/fix-restore

Conversation

@armru
Copy link
Copy Markdown
Member

@armru armru commented Apr 13, 2026

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() into common.GenerateScheme() and use it from both instance and restore managers.

@armru armru requested a review from a team as a code owner April 13, 2026 08:40
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working go Pull requests that update go code labels Apr 13, 2026
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>
@armru armru force-pushed the dev/fix-restore branch from 304b279 to a350cf6 Compare April 13, 2026 09:02
@mnencia mnencia changed the title fix(restore): bind custom CNPG group and version env vars fix(restore): use custom CNPG group and version for scheme registration Apr 13, 2026
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>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Apr 13, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 13, 2026
@leonardoce leonardoce merged commit b1f373d into main Apr 13, 2026
8 checks passed
@leonardoce leonardoce deleted the dev/fix-restore branch April 13, 2026 11:20
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants