Repository navigation
test(e2e): cover backups through plugin-barman-cloud - #10850
Conversation
|
/test |
|
❗ By default, the pull request is configured to backport to all release branches.
|
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/27149675532 |
539611d to
217888d
Compare
217888d to
a4b9cc4
Compare
|
/test bp=main |
|
/test |
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/27191931426 |
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/27191933998 |
|
/test bp=v0.12.0 |
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/27191975143 |
|
/test bp=main |
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/27208688172 |
e56613c to
c4d8744
Compare
ensure_cert_manager skipped installing whenever the cert-manager namespace existed, regardless of whether the manifest apply that creates it had actually completed. A namespace left over from an interrupted prior run would make it skip straight to waiting on Deployments that were never created. Check for the Deployment itself so a partial install re-applies instead of requiring manual cleanup. Signed-off-by: Marco Nenciarini <[email protected]>
_github_auth_header's return value was interpolated inline via -H "\$(_github_auth_header)" at each curl call site. Since this file is sourced into scripts that turn on "set -x" under DEBUG=true, the token would appear in the traced command line. Fold it into a _curl_github wrapper that suppresses tracing only around the curl call itself, restoring it via a RETURN trap, and use it at all four call sites instead of duplicating the -H flag. Signed-off-by: Marco Nenciarini <[email protected]>
39e702c to
3e4bf4d
Compare
|
/test |
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/28822303018 |
The segment holding a plugin backup's stop record can stay unarchived until archive_timeout closes it on its own; this test's restore happens well within that window, so it needs the explicit switch. Written to stand on its own rather than by contrast with the in-core tests, since those are expected to go away once in-core Barman Cloud support is dropped. Signed-off-by: Marco Nenciarini <[email protected]>
3e4bf4d to
9a962ff
Compare
In-core Barman Cloud support is deprecated in favour of the Barman Cloud plugin, so the e2e suite needs to cover backups taken through the plugin. The plugin follows its own release cycle, so the build to test is chosen at invocation time: the latest release, the current main, or a pinned version when reproducing an issue. On kind and k3d, once the operator is up, the suite installs cert-manager (a plugin prerequisite) and the Barman Cloud plugin into cnpg-system, defaulting to the latest plugin release; the resolved operator and plugin versions are printed at the start of the run. The suite then covers, through the plugin: - a smoke round-trip: a cluster archives through the plugin, the operator reports it as loaded, and a backup is taken, restored into a new cluster via the externalClusters plugin source, and verified - a replica cluster bootstrapped from a plugin backup, then streaming from the source - tablespaces surviving a backup and restore round-trip - a plugin-backed cluster across an in-place operator upgrade, with a backup taken through the plugin afterwards - a ScheduledBackup with the immediate option, a prefer-standby backup target verified to run on a replica, and a point-in-time recovery from an external cluster definition The in-core variants stay until the in-core support is removed; their clusters are shared with volume-snapshot scenarios that have no plugin counterpart yet. The new specs use a dedicated plugin-barman-cloud label: "plugin" already selects the kubectl-cnpg tests, whose certificate spec restarts the operator and would fail anything running alongside it. cert-manager is now installed on every kind/k3d e2e run; its version is Renovate-tracked. The operator under test stays the local build by default. To pick the plugin build a run validates, pass barman_plugin (alias bp) to the /test command on a pull request — /test barman_plugin=release (the default), /test bp=main, or /test bp=v0.12.0 for a pinned version — or set the barman_plugin workflow_dispatch input to the same value. Locally, the equivalent is BARMAN_PLUGIN_VERSION=main ./hack/e2e/run-e2e-local.sh. Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Niccolò Fei <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Niccolò Fei <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> (cherry picked from commit 08ead64)
In-core Barman Cloud support is deprecated in favour of the Barman Cloud plugin, so the e2e suite needs to cover backups taken through the plugin. The plugin follows its own release cycle, so the build to test is chosen at invocation time: the latest release, the current main, or a pinned version when reproducing an issue. On kind and k3d, once the operator is up, the suite installs cert-manager (a plugin prerequisite) and the Barman Cloud plugin into cnpg-system, defaulting to the latest plugin release; the resolved operator and plugin versions are printed at the start of the run. The suite then covers, through the plugin: - a smoke round-trip: a cluster archives through the plugin, the operator reports it as loaded, and a backup is taken, restored into a new cluster via the externalClusters plugin source, and verified - a replica cluster bootstrapped from a plugin backup, then streaming from the source - tablespaces surviving a backup and restore round-trip - a plugin-backed cluster across an in-place operator upgrade, with a backup taken through the plugin afterwards - a ScheduledBackup with the immediate option, a prefer-standby backup target verified to run on a replica, and a point-in-time recovery from an external cluster definition The in-core variants stay until the in-core support is removed; their clusters are shared with volume-snapshot scenarios that have no plugin counterpart yet. The new specs use a dedicated plugin-barman-cloud label: "plugin" already selects the kubectl-cnpg tests, whose certificate spec restarts the operator and would fail anything running alongside it. cert-manager is now installed on every kind/k3d e2e run; its version is Renovate-tracked. The operator under test stays the local build by default. To pick the plugin build a run validates, pass barman_plugin (alias bp) to the /test command on a pull request — /test barman_plugin=release (the default), /test bp=main, or /test bp=v0.12.0 for a pinned version — or set the barman_plugin workflow_dispatch input to the same value. Locally, the equivalent is BARMAN_PLUGIN_VERSION=main ./hack/e2e/run-e2e-local.sh. Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Niccolò Fei <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Niccolò Fei <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> (cherry picked from commit 08ead64)
In-core Barman Cloud support is deprecated in favour of the Barman Cloud plugin, so the e2e suite needs to cover backups taken through the plugin. The plugin follows its own release cycle, so the build to test is chosen at invocation time: the latest release, the current main, or a pinned version when reproducing an issue. On kind and k3d, once the operator is up, the suite installs cert-manager (a plugin prerequisite) and the Barman Cloud plugin into cnpg-system, defaulting to the latest plugin release; the resolved operator and plugin versions are printed at the start of the run. The suite then covers, through the plugin: - a smoke round-trip: a cluster archives through the plugin, the operator reports it as loaded, and a backup is taken, restored into a new cluster via the externalClusters plugin source, and verified - a replica cluster bootstrapped from a plugin backup, then streaming from the source - tablespaces surviving a backup and restore round-trip - a plugin-backed cluster across an in-place operator upgrade, with a backup taken through the plugin afterwards - a ScheduledBackup with the immediate option, a prefer-standby backup target verified to run on a replica, and a point-in-time recovery from an external cluster definition The in-core variants stay until the in-core support is removed; their clusters are shared with volume-snapshot scenarios that have no plugin counterpart yet. The new specs use a dedicated plugin-barman-cloud label: "plugin" already selects the kubectl-cnpg tests, whose certificate spec restarts the operator and would fail anything running alongside it. cert-manager is now installed on every kind/k3d e2e run; its version is Renovate-tracked. The operator under test stays the local build by default. To pick the plugin build a run validates, pass barman_plugin (alias bp) to the /test command on a pull request — /test barman_plugin=release (the default), /test bp=main, or /test bp=v0.12.0 for a pinned version — or set the barman_plugin workflow_dispatch input to the same value. Locally, the equivalent is BARMAN_PLUGIN_VERSION=main ./hack/e2e/run-e2e-local.sh. Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Niccolò Fei <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Niccolò Fei <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> (cherry picked from commit 08ead64)
…grade test PR #10850 worked around the operator setting a cnpg.io/cleanupPlugin finalizer on the plugin barman-cloud Service, which would otherwise wedge cnpg-system in Terminating state on namespace deletion. The plugin upgrade e2e spec deleted the plugin Service ahead of time to let the operator clear it first. PR #10940 removed that finalizer from new Services entirely, but the spec always upgrades between operator builds generated from the current source tree, so it already carries the fix and the workaround is stale there. reset_operator_namespace in hack/testing-tools keeps the same pre-deletion step, since deploy_operator_from_manifest can target an arbitrary released operator version, and every version released so far still sets the old finalizer. Signed-off-by: Marco Nenciarini <[email protected]>
…grade test (#11237) PR #10850 worked around the operator setting a cnpg.io/cleanupPlugin finalizer on the plugin barman-cloud Service, which would otherwise wedge cnpg-system in Terminating state on namespace deletion. The plugin upgrade e2e spec deleted the plugin Service ahead of time to let the operator clear it first. PR #10940 removed that finalizer from new Services entirely, but the spec always upgrades between operator builds generated from the current source tree, so it already carries the fix and the workaround is stale there. reset_operator_namespace in hack/testing-tools keeps the same pre-deletion step, since deploy_operator_from_manifest can target an arbitrary released operator version, and every version released so far still sets the old finalizer. Signed-off-by: Marco Nenciarini <[email protected]>
…grade test (#11237) PR #10850 worked around the operator setting a cnpg.io/cleanupPlugin finalizer on the plugin barman-cloud Service, which would otherwise wedge cnpg-system in Terminating state on namespace deletion. The plugin upgrade e2e spec deleted the plugin Service ahead of time to let the operator clear it first. PR #10940 removed that finalizer from new Services entirely, but the spec always upgrades between operator builds generated from the current source tree, so it already carries the fix and the workaround is stale there. reset_operator_namespace in hack/testing-tools keeps the same pre-deletion step, since deploy_operator_from_manifest can target an arbitrary released operator version, and every version released so far still sets the old finalizer. Signed-off-by: Marco Nenciarini <[email protected]> (cherry picked from commit aae5635)
…grade test (#11237) PR #10850 worked around the operator setting a cnpg.io/cleanupPlugin finalizer on the plugin barman-cloud Service, which would otherwise wedge cnpg-system in Terminating state on namespace deletion. The plugin upgrade e2e spec deleted the plugin Service ahead of time to let the operator clear it first. PR #10940 removed that finalizer from new Services entirely, but the spec always upgrades between operator builds generated from the current source tree, so it already carries the fix and the workaround is stale there. reset_operator_namespace in hack/testing-tools keeps the same pre-deletion step, since deploy_operator_from_manifest can target an arbitrary released operator version, and every version released so far still sets the old finalizer. Signed-off-by: Marco Nenciarini <[email protected]> (cherry picked from commit aae5635)
…grade test (#11237) PR #10850 worked around the operator setting a cnpg.io/cleanupPlugin finalizer on the plugin barman-cloud Service, which would otherwise wedge cnpg-system in Terminating state on namespace deletion. The plugin upgrade e2e spec deleted the plugin Service ahead of time to let the operator clear it first. PR #10940 removed that finalizer from new Services entirely, but the spec always upgrades between operator builds generated from the current source tree, so it already carries the fix and the workaround is stale there. reset_operator_namespace in hack/testing-tools keeps the same pre-deletion step, since deploy_operator_from_manifest can target an arbitrary released operator version, and every version released so far still sets the old finalizer. Signed-off-by: Marco Nenciarini <[email protected]> (cherry picked from commit aae5635)
In-core Barman Cloud support is deprecated in favour of the Barman Cloud plugin, so the e2e suite needs to cover backups taken through the plugin. The plugin follows its own release cycle, so the build to test is chosen at invocation time: the latest release, the current main, or a pinned version when reproducing an issue.
On kind and k3d, once the operator is up, the suite installs cert-manager (a plugin prerequisite) and the Barman Cloud plugin into cnpg-system, defaulting to the latest plugin release; the resolved operator and plugin versions are printed at the start of the run.
The suite then covers, through the plugin:
The in-core variants stay until the in-core support is removed; their clusters are shared with volume-snapshot scenarios that have no plugin counterpart yet. The new specs use a dedicated plugin-barman-cloud label: "plugin" already selects the kubectl-cnpg tests, whose certificate spec restarts the operator and would fail anything running alongside it.
cert-manager is now installed on every kind/k3d e2e run; its version is Renovate-tracked. The operator under test stays the local build by default.
To pick the plugin build a run validates, pass barman_plugin (alias bp) to the /test command on a pull request — /test barman_plugin=release (the default), /test bp=main, or /test bp=v0.12.0 for a pinned version — or set the barman_plugin workflow_dispatch input to the same value. Locally, the equivalent is BARMAN_PLUGIN_VERSION=main ./hack/e2e/run-e2e-local.sh.