Skip to content

fix: missing restore config in in-place restore#347

Merged
jason-lynch merged 1 commit intomainfrom
fix/PLAT-564/missing-restore-config
Apr 16, 2026
Merged

fix: missing restore config in in-place restore#347
jason-lynch merged 1 commit intomainfrom
fix/PLAT-564/missing-restore-config

Conversation

@jason-lynch
Copy link
Copy Markdown
Member

Summary

The restore config on the database/instance spec is used to bootstrap a new node. It is not used during an in-place restore, where the active restore configuration is provided as a separate argument.

This change takes that into account and propagates that argument through to the HasRestoreConfig property on the database resource. Now that we're setting this property correctly, the "post restore" logic triggers as expected.

Testing

# the TestS3BackupRestore test fails on main, but passes on this branch
make test-e2e E2E_FIXTURE=lima E2E_RUN=TestS3BackupRestore

PLAT-564

The restore config on the database/instance spec is used to bootstrap
a new node. It is not used during an in-place restore, where the active
restore configuration is provided as a separate argument.

This change takes that into account and propagates that argument through
to the `HasRestoreConfig` property on the database resource. Now that
we're setting this property correctly, the "post restore" logic triggers
as expected.

PLAT-564
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 981be030-862b-4619-9d07-9a2f987264ac

📥 Commits

Reviewing files that changed from the base of the PR and between 7f24a01 and 71a8be0.

📒 Files selected for processing (3)
  • server/internal/database/operations/restore_database.go
  • server/internal/database/orchestrator.go
  • server/internal/workflows/plan_restore.go
💤 Files with no reviewable changes (1)
  • server/internal/database/orchestrator.go

📝 Walkthrough

Walkthrough

Refactoring shifts restore configuration propagation from implicit derivation via instance accessor methods to explicit field assignment. The NodeRestoreResources struct now directly holds restore configuration, eliminating the intermediate RestoreConfig() method and updating workflows to populate it.

Changes

Cohort / File(s) Summary
Restore Configuration Infrastructure
server/internal/database/operations/restore_database.go, server/internal/database/orchestrator.go
Added RestoreConfig field to NodeRestoreResources struct and removed the RestoreConfig() accessor method from InstanceResources, making restore config an explicit field rather than derived.
Restore Workflow Integration
server/internal/workflows/plan_restore.go
Updated getRestoreResources to propagate restoreConfig into the NodeRestoreResources struct via the new field assignment.

Poem

🐰 The config hops now without detours,
No longer hiding in instance doors,
Explicit fields in struct they rest,
Direct and clear—a cleaner quest!
Restore with purpose, bold and true,
Refactored paths for workflows new. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing a missing restore config in in-place restore operations, matching the core objective of propagating restore configuration.
Description check ✅ Passed The description provides a clear summary of the change, explains the distinction between instance spec restore config and in-place restore config, lists testing commands, includes the related ticket (PLAT-564), and covers most checklist items adequately.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/PLAT-564/missing-restore-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@rshoemaker rshoemaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@jason-lynch jason-lynch merged commit 05f1c2c into main Apr 16, 2026
3 checks passed
@jason-lynch jason-lynch deleted the fix/PLAT-564/missing-restore-config branch April 16, 2026 20:45
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