Deploy the 2026-12-02 review remediation to QA (vq03/vq04) and DEV (vd03) #160

Open
opened 2026-12-03 12:28:29 -05:00 by dohertj2 · 0 comments
Owner

Deploy the 2026-12-02 code-review remediation (main @ 922021c4, issues #152–#158) to QA (vq03/vq04) and DEV (vd03). Deploying is the owner's call; nothing here has been deployed beyond the local docker rig.

Needs care:

  • Stop both central nodes and upgrade them together. #152 (CDB-1) encrypts the deployment configuration JSON at rest, and older binaries cannot read encrypted rows. A startup backfill (DeploymentConfigSecretUpgrade) re-protects existing plaintext rows on first boot. Afterwards, both of these must return 0:
    • SELECT COUNT(*) FROM DeployedConfigSnapshots WHERE ConfigurationJson NOT LIKE 'dp:config:v1:%'
    • the same query on PendingDeployments
  • Apply the migrations, with the sqlcmd -I scripts under docs/plans/sql/:
    • WidenSystemArtifactPerSiteStatus.sql
    • AddKpiRollupBackfillState.sql
    • AuditLogChannelOccurredIndex.sql (partition-aligned index on AuditLog)
  • Site schema changes apply in place at boot: the new idx_sf_messages_lane and IX_fwd_owed indexes, and a site_events index swap. The first boot builds them, so expect it to be slower on large site files.
  • Upgrade central before the sites. There are no proto changes.

Expected after the upgrade:

  • Instances that compose one module in several slots, or override an alarm's on-trigger script, read Out of date once (#153, TPL-1/2/5). This is correct; redeploy them.
  • The first KPI recorder start folds the whole raw retention window once (#155, KPI-1).
  • A new option, ScadaBridge:Communication:GrpcConnectTimeout, defaults to 5 s.
  • The leftover AuditLog__HashChain__Enabled env var can also be removed at this deploy (see CLAUDE.md).

Verify on QA:

  • Redeploy an instance; the site fetches the encrypted config.
  • A config-audit row appears for an instance disable/enable.
  • A failover drill: the standby refuses site streams with Unavailable, and central moves to the active node.
  • Retry a parked cached call and watch the central SiteCalls row leave Parked (this was not testable on the rig).
Deploy the 2026-12-02 code-review remediation (`main` @ 922021c4, issues #152–#158) to QA (vq03/vq04) and DEV (vd03). Deploying is the owner's call; nothing here has been deployed beyond the local docker rig. **Needs care:** - **Stop both central nodes and upgrade them together.** #152 (CDB-1) encrypts the deployment configuration JSON at rest, and older binaries cannot read encrypted rows. A startup backfill (`DeploymentConfigSecretUpgrade`) re-protects existing plaintext rows on first boot. Afterwards, both of these must return 0: - `SELECT COUNT(*) FROM DeployedConfigSnapshots WHERE ConfigurationJson NOT LIKE 'dp:config:v1:%'` - the same query on `PendingDeployments` - **Apply the migrations, with the `sqlcmd -I` scripts under `docs/plans/sql/`:** - `WidenSystemArtifactPerSiteStatus.sql` - `AddKpiRollupBackfillState.sql` - `AuditLogChannelOccurredIndex.sql` (partition-aligned index on `AuditLog`) - **Site schema changes** apply in place at boot: the new `idx_sf_messages_lane` and `IX_fwd_owed` indexes, and a `site_events` index swap. The first boot builds them, so expect it to be slower on large site files. - **Upgrade central before the sites.** There are no proto changes. **Expected after the upgrade:** - Instances that compose one module in several slots, or override an alarm's on-trigger script, read *Out of date* once (#153, TPL-1/2/5). This is correct; redeploy them. - The first KPI recorder start folds the whole raw retention window once (#155, KPI-1). - A new option, `ScadaBridge:Communication:GrpcConnectTimeout`, defaults to 5 s. - The leftover `AuditLog__HashChain__Enabled` env var can also be removed at this deploy (see CLAUDE.md). **Verify on QA:** - Redeploy an instance; the site fetches the encrypted config. - A config-audit row appears for an instance disable/enable. - A failover drill: the standby refuses site streams with `Unavailable`, and central moves to the active node. - Retry a parked cached call and watch the central `SiteCalls` row leave Parked (this was not testable on the rig).
dohertj2 added the type:deploy-gatepriority:p1 labels 2026-12-03 12:28:29 -05:00
Sign in to join this conversation.