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

Reintroduce Changes From Drift Management #49

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

snaselj
Copy link
Contributor

@snaselj snaselj commented Nov 9, 2023

Closes NaN

What's Changed

  • Updated the template based on the changes to Drift Manager PRs.

@snaselj snaselj requested a review from whitej6 November 9, 2023 14:51
"postgres",
f"dropdb --if-exists --user=$POSTGRES_USER {db_name} &&",
f"createdb --user=$POSTGRES_USER {db_name} &&",
f"psql --user=$POSTGRES_USER --dbname={db_name}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to perform any GRANT sql queries? Also thoughts on instead of dropping DB we call destroy then start just the db service then the psql command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was working this way without GRANT commands as createdb is called with the --user arg.

I added other option to import db with invoke destroy --import-db-file=<path>. This way it's clear, destroy removes everything, import-db keeps everything excluding the database selected. User could have other databases in the volume, destroying the whole volume could be confusing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if nautobot/nautobot#3927 is relevant here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tested with PostgreSQL 15 and confirming, permissions are granted, and collation is UTF8. @glennmatthews

@whitej6 whitej6 merged commit 8035cf4 into develop Nov 21, 2023
1 check passed
@whitej6 whitej6 deleted the u/snaselj-reintroduce-drift branch November 21, 2023 02:34
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.

3 participants