Skip to content

Cherry-pick v0.9.x fixes to main (#754, #756, #758)#773

Merged
tsg merged 5 commits intomainfrom
cherry-pick-v09x-fixes
Mar 12, 2026
Merged

Cherry-pick v0.9.x fixes to main (#754, #756, #758)#773
tsg merged 5 commits intomainfrom
cherry-pick-v09x-fixes

Conversation

@tsg
Copy link
Member

@tsg tsg commented Mar 12, 2026

Summary

Cherry-picks three bug fixes from v0.9.x that were missing from main:

Plus a fixup commit adapting the cherry-picked snapshot integration tests to main's options pattern (testPostgresProcessorCfg(opts ...option) instead of testPostgresProcessorCfg(url, bool)).

Test plan

  • go vet ./... passes
  • CI passes

tsg and others added 5 commits March 12, 2026 10:51
The cherry-picked tests from v0.9.x used testPostgresProcessorCfg(url, bool)
but main uses testPostgresProcessorCfg(opts ...option). Adapt the function
signatures and callers to match main's pattern.
The "ok - with views" test from v0.9.x didn't include the
schemaCreateDump as the first restore call, which exists on main
via restoreSchemas(). Shift restore call indices by 1.
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/schema/pgdumprestore 89.12% (-0.01%) 👎
github.com/xataio/pgstream/pkg/stream/integration 0.00% (ø)
github.com/xataio/pgstream/pkg/wal/processor/injector 79.41% (+3.17%) 👍
github.com/xataio/pgstream/pkg/wal/processor/postgres 78.90% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/schema/pgdumprestore/snapshot_pg_dump_restore_generator.go 83.44% (+0.32%) 320 (+18) 267 (+16) 53 (+2) 👍
github.com/xataio/pgstream/pkg/wal/processor/injector/wal_injector.go 79.41% (+3.17%) 102 (+1) 81 (+4) 21 (-3) 👍
github.com/xataio/pgstream/pkg/wal/processor/postgres/postgres_schema_observer.go 81.98% (ø) 111 91 20

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/xataio/pgstream/pkg/snapshot/generator/postgres/schema/pgdumprestore/snapshot_pg_dump_restore_generator_test.go
  • github.com/xataio/pgstream/pkg/stream/integration/pg_pg_integration_test.go
  • github.com/xataio/pgstream/pkg/stream/integration/snapshot_pg_integration_test.go
  • github.com/xataio/pgstream/pkg/wal/processor/injector/wal_injector_test.go

@tsg tsg requested a review from kvch March 12, 2026 14:26
@tsg tsg merged commit 5e00a2f into main Mar 12, 2026
7 checks passed
@tsg tsg deleted the cherry-pick-v09x-fixes branch March 12, 2026 15:23
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.

2 participants