Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use postgres DB while connecting to RDS during restore #2282

Merged
merged 4 commits into from
Aug 22, 2023
Merged

Conversation

PrasadG193
Copy link
Contributor

Change Overview

During RDS restore, it needs a database to make the connection.
This PR removes overhead of listing all the DBs from the postgres to use one. Instead use default database ie postgres always during restore.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Tested RDS backup restore using rds-postgres-dump-blueprint BP manually as well as by running the integration tests.

Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>
@github-actions
Copy link
Contributor

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Aug 22, 2023
@PrasadG193 PrasadG193 marked this pull request as ready for review August 22, 2023 07:29
Copy link
Contributor

@akankshakumari393 akankshakumari393 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -23,6 +23,8 @@ import (
_ "github.com/lib/pq"
)

const DefaultConnectDatabase = "postgres"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const DefaultConnectDatabase = "postgres"
const defaultConnectDatabase = "postgres"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to export the const as it is being imported and used in another package.

pkg/function/restore_rds_snapshot.go Show resolved Hide resolved
Kanister automation moved this from In Progress to Reviewer approved Aug 22, 2023
PrasadG193 and others added 2 commits August 22, 2023 15:24
Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>
@mergify mergify bot merged commit 0c46969 into master Aug 22, 2023
14 checks passed
Kanister automation moved this from Reviewer approved to Done Aug 22, 2023
@mergify mergify bot deleted the rds-debug branch August 22, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants