docs(server): complete helm upgrade, migration hooks, and recovery runbooks - #843
Conversation
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request comprehensively rewrites the NudgeBee Server upgrade documentation, adding detailed operational procedures for pre-flight checks, manifest comparisons, database migration hooks, storage diagnostics, and rollback runbooks. The review feedback highlights several necessary corrections to the documentation's command-line examples. These include prefixing Kubernetes resource names (deployments, pods, StatefulSets) with the standard release name, using the correct database name (nudgebee instead of postgres), avoiding TTY allocation (-it) when piping kubectl exec output to prevent file corruption, adding AWS Aurora-specific snapshot commands, and defining environment variables before they are referenced.
There was a problem hiding this comment.
Code Review
This pull request comprehensively updates the NudgeBee Server upgrade documentation, transforming it from a basic checklist into an in-depth operational guide. It adds detailed sections on pre-flight checks, manifest comparison, database migration lifecycles, StatefulSet/PVC diagnostics, external infrastructure topologies, rollback runbooks, and post-upgrade verification. Feedback on the changes suggests removing the -t (TTY) flag from the kubectl exec database backup command to prevent potential archive corruption or execution failures in non-interactive environments.
… and aurora snapshots
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands and improves the NudgeBee Server upgrade documentation, adding detailed sections on pre-flight checks, manifest comparisons, database migration lifecycles, StatefulSet/PVC storage diagnostics, external infrastructure topologies, rollback runbooks, and post-upgrade verification. The review comments provide valuable improvements to the backup and restore commands, suggesting the use of pg_dumpall instead of pg_dump to ensure all databases (including Temporal databases) are fully backed up and restored.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the NudgeBee Server upgrade documentation, adding comprehensive guides on pre-flight checks, manifest comparison, database migration lifecycles, storage diagnostics, external infrastructure topologies, and rollback runbooks. The review feedback suggests several improvements to the documented commands, including explicitly targeting the PostgreSQL container in kubectl exec commands to avoid multi-container failures, adding missing password fields to the external Temporal configuration example, and dropping existing databases before restoring backups during a rollback to prevent relation conflicts.
… drop dbs prior to restore
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the NudgeBee Server upgrade documentation, adding comprehensive guides on pre-flight checks, manifest comparisons, database migration lifecycles, storage diagnostics, and rollback runbooks. The reviewer suggested a critical improvement to the database rollback instructions, recommending that active connections be terminated using pg_terminate_backend before attempting to drop the databases to prevent execution failures.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands and restructures the NudgeBee Server upgrade documentation, adding comprehensive, code-grounded operational procedures such as pre-flight checks, database backups, manifest comparisons, migration lifecycle details, StatefulSet/PVC troubleshooting, external infrastructure topology, rollback runbooks, and post-upgrade verification. The review feedback identifies two configuration errors in the documentation: an incorrect YAML nesting structure for Temporal's persistence configuration and an incorrect configuration key reference for Temporal's schema Helm hooks.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the NudgeBee Server upgrade documentation, adding comprehensive guides on pre-flight checks, database backups, manifest comparisons, migration lifecycles, storage diagnostics, external infrastructure topologies, and rollback procedures. The review feedback highlights a few critical improvements for the rollback and configuration sections: correcting the Temporal Helm chart hook parameters, ensuring Temporal services are scaled down and up during database restores to avoid connection conflicts, and addressing rollback procedures for external databases.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the NudgeBee Server upgrade documentation, adding detailed guides on pre-flight checks, database migration lifecycles, storage diagnostics, external infrastructure topology, and rollback runbooks. The review feedback points out two issues in the updated documentation: first, the Temporal SQL persistence configuration example is missing the required pluginName: "postgres" parameter; second, the postgres-migration-job is incorrectly documented as a post-upgrade hook when it needs to be a pre-upgrade hook to run before the application pods roll over.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the NudgeBee Server upgrade documentation, adding detailed operational procedures for pre-flight checks, manifest comparison, database migrations, storage diagnostics, external infrastructure topology, and rollback runbooks. The review feedback suggests several corrections to the documentation, including fixing an inconsistency in the database migration sequence diagram, replacing a wildcard in the database restore command to prevent potential stream corruption, adding a necessary step to create a DB instance when restoring an Aurora cluster, and correcting a redundant argument in the verification kubectl run command.
…nstance creation, and curl entrypoint
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the upgrade documentation for NudgeBee Server, transforming it into a comprehensive, production-grade guide. It now includes detailed instructions on pre-flight checks, database backups, manifest comparisons, migration diagnostics, storage troubleshooting, external topology setups, and database rollback runbooks. The reviewer feedback addresses two issues in the documentation's code snippets: correcting the Temporal Helm chart hook parameters from useHelmHooks to registerWithHelmHooks, and splitting the DROP DATABASE command into separate -c flags in the PostgreSQL restore runbook to prevent transaction block errors.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the NudgeBee Server upgrade documentation, adding detailed operational procedures for pre-flight checks, manifest comparisons, database migrations, storage diagnostics, external topologies, and rollback runbooks. The review feedback suggests several improvements to the documentation, including adding TLS configuration parameters for Temporal datastores, ensuring collector deployments are properly scaled down and up during database restores to prevent connection conflicts, and specifying network configuration options when restoring RDS/Aurora snapshots.
…ora network parameters
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request significantly expands the NudgeBee Server upgrade documentation, transforming it into a comprehensive, production-grade guide that covers pre-flight checks, database backups, manifest comparisons, StatefulSet/PVC diagnostics, external infrastructure topologies, and rollback runbooks. The review feedback highlights critical issues in the rollback and troubleshooting commands, including incorrect rollback ordering for bundled PostgreSQL (which risks database incompatibility issues), redundant manual scaling steps that override production replica counts, missing Helm release prefixes on migration job commands, and the need for a note explaining benign errors during database restores.
…d prefix migration jobs
Summary
Overhauls
doc-server/docs/installation/server/upgrade.mdwith code-grounded operational runbooks derived from the umbrella chart architecture innudgebee-oss:Pre-Flight Planning & Stored Values Merging:
--version <TARGET_VERSION>).helm get values --allvshelm get values) and avoiding stale parameters from--reuse-values.helm diff upgradeand fallback nativehelm get manifest+helm template.nudgebee_secret.NUDGEBEE_ENCRYPTION_KEYacross upgrades.Database Migration Lifecycle & Failure Diagnostics:
postgres-migration-jobhook (helm.sh/hook: post-install,post-upgrade,weight: -5,backoffLimit: 0).db-checkpollingpg_isreadyand main containerrun-migrations.sh.temporal.schema.useHelmHooks: false) and shard count invariant (numHistoryShards: 512).StatefulSet & PVC Storage Diagnostics:
allowVolumeExpansion: true).kubectl delete statefulset --cascade=orphan.Bundled vs. External Infrastructure Topology:
Rollback & Recovery Runbook:
Verification
npm run buildexecuted cleanly indoc-serverwith zero broken links or broken anchors.