Compare commits

...

8 Commits

Author SHA1 Message Date
Gabriel José Mouallem Rodrigues
56d4765d71
Merge eefb45ca5a into 3efe655ed5 2026-06-08 09:24:53 +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
renovate[bot]
fd333cb51b
chore(deps): update documentation dependencies to v19.2.7 (#930)
Some checks failed
Deploy Docusaurus to GitHub Pages / build (push) Failing after 3s
Deploy Docusaurus to GitHub Pages / deploy (push) Has been skipped
release-please / release-please (push) Failing after 2s
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [react](https://react.dev/)
([source](https://redirect.github.com/facebook/react/tree/HEAD/packages/react))
| [`19.2.6` →
`19.2.7`](https://renovatebot.com/diffs/npm/react/19.2.6/19.2.7) |
![age](https://developer.mend.io/api/mc/badges/age/npm/react/19.2.7?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react/19.2.6/19.2.7?slim=true)
|
| [react-dom](https://react.dev/)
([source](https://redirect.github.com/facebook/react/tree/HEAD/packages/react-dom))
| [`19.2.6` →
`19.2.7`](https://renovatebot.com/diffs/npm/react-dom/19.2.6/19.2.7) |
![age](https://developer.mend.io/api/mc/badges/age/npm/react-dom/19.2.7?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-dom/19.2.6/19.2.7?slim=true)
|

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDIuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0ZWQiLCJuby1pc3N1ZSJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-04 17:56:10 +02:00
renovate[bot]
7ea2b15da0
chore(deps): update all cloudnative-pg daggerverse dependencies to e7f1192 (#938)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| commitlint | digest | `21755df` → `e7f1192` |
| controller-gen | digest | `21755df` → `e7f1192` |
| crd-gen-refs | digest | `21755df` → `e7f1192` |
| spellcheck | digest | `21755df` → `e7f1192` |
| uncommitted | digest | `21755df` → `e7f1192` |

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0ZWQiLCJuby1pc3N1ZSJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-04 17:08:42 +02:00
renovate[bot]
c45472efcb
chore(deps): update dependency dagger/dagger to v0.21.4 (#929)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dagger/dagger](https://redirect.github.com/dagger/dagger) | patch |
`0.21.0` → `0.21.4` |

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDIuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0ZWQiLCJuby1pc3N1ZSJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-04 13:25:17 +02:00
renovate[bot]
40aa4b21b8
fix(deps): update all non-major go dependencies to 5d46599 (#940)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/cloudnative-pg/barman-cloud](https://redirect.github.com/cloudnative-pg/barman-cloud)
| require | digest | `8e1642e` → `5d46599` |

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDkuNCIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0ZWQiLCJuby1pc3N1ZSJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-04 12:21:08 +02:00
renovate[bot]
f7088258fd
fix(deps): update all non-major go dependencies to 8e1642e (#939)
Some checks failed
Deploy Docusaurus to GitHub Pages / build (push) Failing after 4s
Deploy Docusaurus to GitHub Pages / deploy (push) Has been skipped
release-please / release-please (push) Failing after 3s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/cloudnative-pg/barman-cloud](https://redirect.github.com/cloudnative-pg/barman-cloud)
| require | digest | `213211e` → `8e1642e` |

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/cloudnative-pg/plugin-barman-cloud).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0ZWQiLCJuby1pc3N1ZSJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-04 10:32:50 +02:00
Gabriel Jose Mouallem Rodrigues
eefb45ca5a fix: add retry logic to updateRecoveryWindow for concurrent status updates
When backup completion and retention policy enforcement run concurrently,
both call updateRecoveryWindow to update the ObjectStore status. This can
cause "object has been modified" errors due to Kubernetes optimistic
concurrency control.

This change wraps the status update in retry.RetryOnConflict, matching
the pattern already used in setLastFailedBackupTime in the same file.
The retry logic fetches a fresh copy of the ObjectStore before each
update attempt, ensuring the resourceVersion is current.

Fixes #758

Signed-off-by: Gabriel Mouallem <gabriel@latitude.sh>
2026-02-03 15:01:30 -03:00
8 changed files with 49 additions and 41 deletions

View File

@ -44,7 +44,7 @@ jobs:
- name: Install Dagger - name: Install Dagger
env: env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.21.0 DAGGER_VERSION: 0.21.4
run: | run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Run CI task - name: Run CI task

View File

@ -31,7 +31,7 @@ jobs:
- name: Install Dagger - name: Install Dagger
env: env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.21.0 DAGGER_VERSION: 0.21.4
run: | run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Create image and manifest - name: Create image and manifest

View File

@ -21,7 +21,7 @@ jobs:
- name: Install Dagger - name: Install Dagger
env: env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.21.0 DAGGER_VERSION: 0.21.4
run: | run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Create image and manifest - name: Create image and manifest

View File

@ -46,7 +46,7 @@ tasks:
- wordlist-ordered - wordlist-ordered
env: env:
# renovate: datasource=git-refs depName=spellcheck lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main # renovate: datasource=git-refs depName=spellcheck lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_SPELLCHECK_SHA: 21755df1a27febff19b28dbe6ae57116f6088bb0 DAGGER_SPELLCHECK_SHA: e7f11923ad316021146ee34e3db9dc2d66cbb2d1
cmds: cmds:
- > - >
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/spellcheck@${DAGGER_SPELLCHECK_SHA} GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/spellcheck@${DAGGER_SPELLCHECK_SHA}
@ -60,7 +60,7 @@ tasks:
desc: Check for conventional commits desc: Check for conventional commits
env: env:
# renovate: datasource=git-refs depName=commitlint lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main # renovate: datasource=git-refs depName=commitlint lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_COMMITLINT_SHA: 21755df1a27febff19b28dbe6ae57116f6088bb0 DAGGER_COMMITLINT_SHA: e7f11923ad316021146ee34e3db9dc2d66cbb2d1
cmds: cmds:
- > - >
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/commitlint@${DAGGER_COMMITLINT_SHA} GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/commitlint@${DAGGER_COMMITLINT_SHA}
@ -74,7 +74,7 @@ tasks:
- wordlist-ordered - wordlist-ordered
env: env:
# renovate: datasource=git-refs depName=uncommitted lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main # renovate: datasource=git-refs depName=uncommitted lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_UNCOMMITTED_SHA: 21755df1a27febff19b28dbe6ae57116f6088bb0 DAGGER_UNCOMMITTED_SHA: e7f11923ad316021146ee34e3db9dc2d66cbb2d1
cmds: cmds:
- GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/uncommitted@${DAGGER_UNCOMMITTED_SHA} check-uncommitted --source . stdout - GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/uncommitted@${DAGGER_UNCOMMITTED_SHA} check-uncommitted --source . stdout
sources: sources:
@ -86,7 +86,7 @@ tasks:
- controller-gen - controller-gen
env: env:
# renovate: datasource=git-refs depName=crd-gen-refs lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main # renovate: datasource=git-refs depName=crd-gen-refs lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_CRDGENREF_SHA: 21755df1a27febff19b28dbe6ae57116f6088bb0 DAGGER_CRDGENREF_SHA: e7f11923ad316021146ee34e3db9dc2d66cbb2d1
# renovate: datasource=go depName=github.com/elastic/crd-ref-docs # renovate: datasource=go depName=github.com/elastic/crd-ref-docs
CRDREFDOCS_VERSION: v0.3.0 CRDREFDOCS_VERSION: v0.3.0
cmds: cmds:
@ -122,7 +122,7 @@ tasks:
docusaurus-version-is-aligned: docusaurus-version-is-aligned:
desc: Verify that a documentation version exists for the current version of the plugin desc: Verify that a documentation version exists for the current version of the plugin
cmds: 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: src:
- .release-please-manifest.json - .release-please-manifest.json
- ./web/versions.json - ./web/versions.json
@ -206,7 +206,7 @@ tasks:
- start-build-network - start-build-network
vars: vars:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.21.0 DAGGER_VERSION: 0.21.4
DAGGER_ENGINE_IMAGE: registry.dagger.io/engine:v{{ .DAGGER_VERSION }} DAGGER_ENGINE_IMAGE: registry.dagger.io/engine:v{{ .DAGGER_VERSION }}
cmds: cmds:
- > - >
@ -366,12 +366,12 @@ tasks:
DAGGER_DOCKER_SHA: ee12c1a4a2630e194ec20c5a9959183e3a78c192 DAGGER_DOCKER_SHA: ee12c1a4a2630e194ec20c5a9959183e3a78c192
cmds: 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 --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 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}} 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 --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 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}} publish --ref {{.SIDECAR_IMAGE_NAME}} --tags {{.IMAGE_VERSION}}
@ -381,7 +381,7 @@ tasks:
run: once run: once
env: env:
# renovate: datasource=git-refs depName=controller-gen lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main # renovate: datasource=git-refs depName=controller-gen lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_CONTROLLER_GEN_SHA: 21755df1a27febff19b28dbe6ae57116f6088bb0 DAGGER_CONTROLLER_GEN_SHA: e7f11923ad316021146ee34e3db9dc2d66cbb2d1
cmds: cmds:
- > - >
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/controller-gen@${DAGGER_CONTROLLER_GEN_SHA} GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/controller-gen@${DAGGER_CONTROLLER_GEN_SHA}
@ -456,13 +456,13 @@ tasks:
DAGGER_KUSTOMIZE_SHA: ff27cd50f6b4eed2e3753c520632cd6099e1ce52 DAGGER_KUSTOMIZE_SHA: ff27cd50f6b4eed2e3753c520632cd6099e1ce52
cmds: 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 edit --source . --dir kubernetes
set image --image plugin-barman-cloud={{.PLUGIN_IMAGE_NAME}}:{{.IMAGE_VERSION}} 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}} set secret --secret plugin-barman-cloud --from-literal SIDECAR_IMAGE={{.SIDECAR_IMAGE_NAME}}:{{.IMAGE_VERSION}}
directory directory --path kubernetes export --path manifest-build 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 build --source . --dir manifest-build export --path manifest.yaml
sources: sources:
- ./config/**/*.yaml - ./config/**/*.yaml
@ -489,7 +489,7 @@ tasks:
msg: not a tag, failing msg: not a tag, failing
cmds: 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 . with-source --source .
run --repo {{.GITHUB_REPOSITORY}} --token env:GITHUB_TOKEN run --repo {{.GITHUB_REPOSITORY}} --token env:GITHUB_TOKEN
--cmd "release upload {{.GITHUB_REF_NAME}} manifest.yaml" --cmd "release upload {{.GITHUB_REF_NAME}} manifest.yaml"

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.26.3
require ( require (
github.com/cert-manager/cert-manager v1.20.2 github.com/cert-manager/cert-manager v1.20.2
github.com/cloudnative-pg/api v1.29.1 github.com/cloudnative-pg/api v1.29.1
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260603073812-213211ec5e6f github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260604074245-5d4659922a82
github.com/cloudnative-pg/cloudnative-pg v1.29.1 github.com/cloudnative-pg/cloudnative-pg v1.29.1
github.com/cloudnative-pg/cnpg-i v0.5.0 github.com/cloudnative-pg/cnpg-i v0.5.0
github.com/cloudnative-pg/cnpg-i-machinery v0.4.2 github.com/cloudnative-pg/cnpg-i-machinery v0.4.2

6
go.sum
View File

@ -20,10 +20,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cloudnative-pg/api v1.29.1 h1:FWr8S7EQeOfdhYXyr2cof8wUXLARZiiQt5Qa6ltED7w= github.com/cloudnative-pg/api v1.29.1 h1:FWr8S7EQeOfdhYXyr2cof8wUXLARZiiQt5Qa6ltED7w=
github.com/cloudnative-pg/api v1.29.1/go.mod h1:QtWF3yzSvIfORMHaSkPAk/o3bhCJwEHJgN3riyRiz3o= github.com/cloudnative-pg/api v1.29.1/go.mod h1:QtWF3yzSvIfORMHaSkPAk/o3bhCJwEHJgN3riyRiz3o=
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260513095406-dac43abc6cf6 h1:FxIX5u8Kf1aJQnmW/5eRo+1hx/okApecnIJAmvliaJ8= github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260604074245-5d4659922a82 h1:XKuLJWTREfjUHAw97LHA1qTcuv93oMu7ILASUYNFjpc=
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260513095406-dac43abc6cf6/go.mod h1:VrubJGTgO94O2+m4EX68/wlbDmluc6ITL/VjTcMN3H4= github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260604074245-5d4659922a82/go.mod h1:jCaMsQwJJ0f/49TIdSad1Ayjv52IoJXMZBhozqilY/g=
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260603073812-213211ec5e6f h1:37XPQQ7PY1tffCXS4QuRK7eSDIzn6oeF8h3cIteN2SE=
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260603073812-213211ec5e6f/go.mod h1:jCaMsQwJJ0f/49TIdSad1Ayjv52IoJXMZBhozqilY/g=
github.com/cloudnative-pg/cloudnative-pg v1.29.1 h1:ZNEt1TMlnQKXI1kho2UqQuqdfvIvjGln4kN7C1lsmGA= github.com/cloudnative-pg/cloudnative-pg v1.29.1 h1:ZNEt1TMlnQKXI1kho2UqQuqdfvIvjGln4kN7C1lsmGA=
github.com/cloudnative-pg/cloudnative-pg v1.29.1/go.mod h1:Sbgx9jVmkle4/gR2U5JHrzDd74sRPOBHDtPkvncg5v8= github.com/cloudnative-pg/cloudnative-pg v1.29.1/go.mod h1:Sbgx9jVmkle4/gR2U5JHrzDd74sRPOBHDtPkvncg5v8=
github.com/cloudnative-pg/cnpg-i v0.5.0 h1:/TOzpNT6cwNgrpftTtrnLKdoHgMwd+88vZgXjlVgXeE= github.com/cloudnative-pg/cnpg-i v0.5.0 h1:/TOzpNT6cwNgrpftTtrnLKdoHgMwd+88vZgXjlVgXeE=

View File

@ -33,7 +33,8 @@ import (
) )
// updateRecoveryWindow updates the recovery window inside the object // updateRecoveryWindow updates the recovery window inside the object
// store status subresource // store status subresource. It uses retry logic to handle concurrent
// updates from backup completion and retention policy enforcement.
func updateRecoveryWindow( func updateRecoveryWindow(
ctx context.Context, ctx context.Context,
c client.Client, c client.Client,
@ -41,24 +42,33 @@ func updateRecoveryWindow(
objectStore *barmancloudv1.ObjectStore, objectStore *barmancloudv1.ObjectStore,
serverName string, serverName string,
) error { ) error {
// Set the recovery window inside the barman object store object objectStoreKey := client.ObjectKeyFromObject(objectStore)
convertTime := func(t *time.Time) *metav1.Time {
if t == nil { return retry.RetryOnConflict(retry.DefaultBackoff, func() error {
return nil var freshObjectStore barmancloudv1.ObjectStore
if err := c.Get(ctx, objectStoreKey, &freshObjectStore); err != nil {
return err
} }
return ptr.To(metav1.NewTime(*t))
}
recoveryWindow := objectStore.Status.ServerRecoveryWindow[serverName] // Set the recovery window inside the barman object store object
recoveryWindow.FirstRecoverabilityPoint = convertTime(backupList.GetFirstRecoverabilityPoint()) convertTime := func(t *time.Time) *metav1.Time {
recoveryWindow.LastSuccessfulBackupTime = convertTime(backupList.GetLastSuccessfulBackupTime()) if t == nil {
return nil
}
return ptr.To(metav1.NewTime(*t))
}
if objectStore.Status.ServerRecoveryWindow == nil { recoveryWindow := freshObjectStore.Status.ServerRecoveryWindow[serverName]
objectStore.Status.ServerRecoveryWindow = make(map[string]barmancloudv1.RecoveryWindow) recoveryWindow.FirstRecoverabilityPoint = convertTime(backupList.GetFirstRecoverabilityPoint())
} recoveryWindow.LastSuccessfulBackupTime = convertTime(backupList.GetLastSuccessfulBackupTime())
objectStore.Status.ServerRecoveryWindow[serverName] = recoveryWindow
return c.Status().Update(ctx, objectStore) if freshObjectStore.Status.ServerRecoveryWindow == nil {
freshObjectStore.Status.ServerRecoveryWindow = make(map[string]barmancloudv1.RecoveryWindow)
}
freshObjectStore.Status.ServerRecoveryWindow[serverName] = recoveryWindow
return c.Status().Update(ctx, &freshObjectStore)
})
} }
// setLastFailedBackupTime sets the last failed backup time in the // setLastFailedBackupTime sets the last failed backup time in the

View File

@ -7885,9 +7885,9 @@ rc@1.2.8:
strip-json-comments "~2.0.1" strip-json-comments "~2.0.1"
react-dom@^19.0.0: react-dom@^19.0.0:
version "19.2.6" version "19.2.7"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.2.6.tgz#44a81b0bcca22da814c00847d09d01c8615529b7" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.2.7.tgz#0450dc9ae9ddbff76ef196401cd8b8c7fb466ccc"
integrity sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g== integrity sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==
dependencies: dependencies:
scheduler "^0.27.0" scheduler "^0.27.0"
@ -7967,9 +7967,9 @@ react-router@5.3.4, react-router@^5.3.4:
tiny-warning "^1.0.0" tiny-warning "^1.0.0"
react@^19.0.0: react@^19.0.0:
version "19.2.6" version "19.2.7"
resolved "https://registry.yarnpkg.com/react/-/react-19.2.6.tgz#3dadb8e12b2a7934c1d5317973e5dce1301f9a4d" resolved "https://registry.yarnpkg.com/react/-/react-19.2.7.tgz#1f47a1bfc06f8ec885752c6f4af14369a9f8260b"
integrity sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q== integrity sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==
readable-stream@^2.0.1: readable-stream@^2.0.1:
version "2.3.8" version "2.3.8"