Skip to content

Keep the PostgreSQL 17 copy through an interrupted restore, and harden the 44.0 regenerations - #653

Merged
pierre-b merged 1 commit into
devfrom
fix/release-44-gate
Nov 19, 2026
Merged

pierre-b merged 1 commit into
devfrom
fix/release-44-gate

Conversation

@pierre-b

Copy link
Copy Markdown
Contributor

Fixes found while rehearsing the 44.0 upgrade (43.0 compose on PostgreSQL 17, demo data and live automations, then the 44.0 compose and image).

  • compose.yaml: putting the copy back leaves a mark in the backup volume, so a restore stopped half-way is started again, instead of the partial data being taken for the 17 data and the copy deleted. scripts/pg-upgrade-rehearsal.sh gains INTERRUPT_RESTORE=1 (with INTERRUPT=1): it passes with this change and fails without it.
  • Segment recompilation (v44, cmd/regen-json-filters): a query is stored only while the segment still holds the tree and arguments it was compiled from; a segment saved meanwhile is read again and recompiled from what was saved. Unit tests, and an integration test that saves the segment between the read and the write; it fails with the previous guard.
  • Trigger regeneration: a lock timeout, a deadlock or a serialization failure fails the run instead of leaving a valid automation on its old body; the migration runs again at the next start. A statement_timeout cancellation still skips the automation, since it would repeat at every start.
  • Dockerfile: the console build gets a 4 GB Node heap; on a host under 16 GB, node:22-alpine defaults to about 2 GB and the build ran out of memory.

No CHANGELOG entry: all of it changes 44.0 code that has not been released.

…n the 44.0 regenerations

- compose.yaml: putting the copy back leaves a mark in the backup volume, so a restore stopped half-way is started again, instead of the partial data being taken for the 17 data and the copy deleted. The rehearsal script gains INTERRUPT_RESTORE=1.
- The segment recompilation stores a query only while the segment still holds the tree and arguments it was compiled from; a segment saved meanwhile is read again and recompiled from what was saved.
- The trigger regeneration fails the run on a lock timeout, a deadlock or a serialization failure, instead of leaving a valid automation on its old body; the migration runs again at the next start.
- Dockerfile: the console build gets a 4 GB Node heap, which a host under 16 GB of memory does not give it by default.
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.28571% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.44%. Comparing base (d5da9f5) to head (699160a).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
internal/migrations/segment_sql_regen.go 76.36% 7 Missing and 6 partials ⚠️
internal/migrations/automation_trigger_regen.go 66.66% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #653      +/-   ##
==========================================
- Coverage   90.46%   90.44%   -0.02%     
==========================================
  Files         392      392              
  Lines       76454    76497      +43     
==========================================
+ Hits        69162    69189      +27     
- Misses       4736     4745       +9     
- Partials     2556     2563       +7     
Flag Coverage Δ
unit 90.44% <74.28%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pierre-b
pierre-b merged commit 87766ac into dev Nov 19, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant