Compare commits

..

3 Commits

Author SHA1 Message Date
renovate[bot]
9c8030e3e8
chore(deps): lock file maintenance documentation dependencies
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-08 15:28:52 +00:00
Niccolò Fei
bb7845dd62
fix(scheme): register meta types for CNPG scheme group version (#943)
Some checks failed
release-please / release-please (push) Failing after 5s
After the controller-runtime v0.24.0 upgrade (58f4fed), the instance
sidecar logged "v1.GetOptions is not suitable for converting to
postgresql.cnpg.io/v1" on every WAL archive, which broke retention
policy enforcement.

Register the standard meta types with metav1.AddToGroupVersion after the
AddKnownTypes call in internal/cnpgi/common/scheme.go and
internal/scheme/cnpg.go.

Closes #942

Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
2026-06-08 11:08:15 +02:00
Marco Nenciarini
3efe655ed5
ci: stop Dagger from shallow-cloning the working tree (#947)
In GitHub Actions pull request builds, Dagger's telemetry git-label
collection runs `git fetch --depth 1` against the working tree whenever
GITHUB_REF is a refs/pull/ ref, which turns the checkout into a shallow
clone. Once shallow, `git merge-base origin/main HEAD` finds no common
ancestor and the commitlint task (--from=origin/main) fails on every
pull request.

Most dagger invocations already prefix GITHUB_REF= to suppress this; a
few were missing it. Prefix the remaining calls so Dagger never
shallow-fetches the host repository.

Upstream Dagger bug: dagger/dagger#13351

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-06-08 09:17:21 +02:00
4 changed files with 21 additions and 17 deletions

View File

@ -122,7 +122,7 @@ tasks:
docusaurus-version-is-aligned:
desc: Verify that a documentation version exists for the current version of the plugin
cmds:
- $(dagger -s call -m dagger/check-doc-version has-version-documentation --src .)
- $(GITHUB_REF= dagger -s call -m dagger/check-doc-version has-version-documentation --src .)
src:
- .release-please-manifest.json
- ./web/versions.json
@ -366,12 +366,12 @@ tasks:
DAGGER_DOCKER_SHA: ee12c1a4a2630e194ec20c5a9959183e3a78c192
cmds:
- >
dagger call -m github.com/purpleclay/daggerverse/docker@${DAGGER_DOCKER_SHA}
GITHUB_REF= dagger call -m github.com/purpleclay/daggerverse/docker@${DAGGER_DOCKER_SHA}
--registry ghcr.io --username $REGISTRY_USER --password env:REGISTRY_PASSWORD
build --dir . --file containers/Dockerfile.plugin --args GO_VERSION={{.GO_VERSION}} --platform linux/amd64 --platform linux/arm64
publish --ref {{.PLUGIN_IMAGE_NAME}} --tags {{.IMAGE_VERSION}}
- >
dagger call -m github.com/purpleclay/daggerverse/docker@${DAGGER_DOCKER_SHA}
GITHUB_REF= dagger call -m github.com/purpleclay/daggerverse/docker@${DAGGER_DOCKER_SHA}
--registry ghcr.io --username $REGISTRY_USER --password env:REGISTRY_PASSWORD
build --dir . --file containers/Dockerfile.sidecar --args GO_VERSION={{.GO_VERSION}} --platform linux/amd64 --platform linux/arm64
publish --ref {{.SIDECAR_IMAGE_NAME}} --tags {{.IMAGE_VERSION}}
@ -456,13 +456,13 @@ tasks:
DAGGER_KUSTOMIZE_SHA: ff27cd50f6b4eed2e3753c520632cd6099e1ce52
cmds:
- >
dagger -s call -m https://github.com/sagikazarmark/daggerverse/kustomize@${DAGGER_KUSTOMIZE_SHA}
GITHUB_REF= dagger -s call -m https://github.com/sagikazarmark/daggerverse/kustomize@${DAGGER_KUSTOMIZE_SHA}
edit --source . --dir kubernetes
set image --image plugin-barman-cloud={{.PLUGIN_IMAGE_NAME}}:{{.IMAGE_VERSION}}
set secret --secret plugin-barman-cloud --from-literal SIDECAR_IMAGE={{.SIDECAR_IMAGE_NAME}}:{{.IMAGE_VERSION}}
directory directory --path kubernetes export --path manifest-build
- >
dagger -s call -m github.com/sagikazarmark/daggerverse/kustomize@${DAGGER_KUSTOMIZE_SHA}
GITHUB_REF= dagger -s call -m github.com/sagikazarmark/daggerverse/kustomize@${DAGGER_KUSTOMIZE_SHA}
build --source . --dir manifest-build export --path manifest.yaml
sources:
- ./config/**/*.yaml
@ -489,7 +489,7 @@ tasks:
msg: not a tag, failing
cmds:
- >
dagger -s call -m github.com/sagikazarmark/daggerverse/gh@${DAGGER_GH_SHA}
GITHUB_REF= dagger -s call -m github.com/sagikazarmark/daggerverse/gh@${DAGGER_GH_SHA}
with-source --source .
run --repo {{.GITHUB_REPOSITORY}} --token env:GITHUB_TOKEN
--cmd "release upload {{.GITHUB_REF_NAME}} manifest.yaml"

View File

@ -25,6 +25,7 @@ import (
cnpgv1 "github.com/cloudnative-pg/cloudnative-pg/api/v1"
"github.com/cloudnative-pg/machinery/pkg/log"
"github.com/spf13/viper"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
@ -58,6 +59,7 @@ func GenerateScheme(ctx context.Context) *runtime.Scheme {
&cnpgv1.Backup{}, &cnpgv1.BackupList{},
&cnpgv1.ScheduledBackup{}, &cnpgv1.ScheduledBackupList{},
)
metav1.AddToGroupVersion(result, schemeGroupVersion)
schemeLog := log.FromContext(ctx)
schemeLog.Info("CNPG types registration", "schemeGroupVersion", schemeGroupVersion)

View File

@ -25,6 +25,7 @@ import (
cnpgv1 "github.com/cloudnative-pg/cloudnative-pg/api/v1"
"github.com/cloudnative-pg/machinery/pkg/log"
"github.com/spf13/viper"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -49,6 +50,7 @@ func AddCNPGToScheme(ctx context.Context, s *runtime.Scheme) {
&cnpgv1.Backup{}, &cnpgv1.BackupList{},
&cnpgv1.ScheduledBackup{}, &cnpgv1.ScheduledBackupList{},
)
metav1.AddToGroupVersion(s, schemeGroupVersion)
log.FromContext(ctx).Info("CNPG types registration", "schemeGroupVersion", schemeGroupVersion)
}

View File

@ -2008,24 +2008,24 @@
tslib "^2.4.0"
"@emnapi/core@^1.4.3":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.10.0.tgz#380ccc8f2412ea22d1d972df7f8ee23a3b9c7467"
integrity sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==
version "1.11.0"
resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.11.0.tgz#8a655042dbbb10d0266670c9903c34a7001c705b"
integrity sha512-l9Oo58x0HOP5znGzVhYW9U3e5wVuA4LAZU2AGezTmkhO1CgQRFDhDg4nneHsu/t3WniXg9QrG2nIXL/ZS8ln8Q==
dependencies:
"@emnapi/wasi-threads" "1.2.1"
"@emnapi/wasi-threads" "1.2.2"
tslib "^2.4.0"
"@emnapi/runtime@^1.4.3":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.10.0.tgz#4b260c0d3534204e98c6110b8db1a987d26ec87c"
integrity sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==
version "1.11.0"
resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.11.0.tgz#ce16b3674ff7266bbf50f9668bde8a04f3014d4e"
integrity sha512-55coeOFKHv1ywEcUXJtWU5f+Jr/W5tZDvZig8DLKSwUN1JpROQ4rk/SNOQiFWmaR/VKF4zuFyW1B8JduOSv6Pg==
dependencies:
tslib "^2.4.0"
"@emnapi/wasi-threads@1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz#28fed21a1ba1ce797c44a070abc94d42f3ae8548"
integrity sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==
"@emnapi/wasi-threads@1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz#4c93becf5bfa3b13d1bbdcc06aee38321ad8139a"
integrity sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==
dependencies:
tslib "^2.4.0"