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

Part of DEV-1083 better handling of INI file for mysql client #17

Merged
merged 10 commits into from
Aug 19, 2024

Conversation

moseshll
Copy link
Contributor

@moseshll moseshll commented Aug 7, 2024

  • Write credentials to tempfile based on ENV
  • Remove config/mysql_defaults_extra.ini
  • Requires hathifiles-database secret/ENV with connection string broken into individual variables

Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

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

Given our current understanding that dumping with the mysql/mariadb command line client is significantly faster than any approach we could take with Ruby, I think this is fine -- it puts the knowledge all in one place about database credentials, whereas other approaches would need the credentials duplicated.

I don't think we need the gsub to replace whitespace with spaces, but worth double checking, but removing that doesn't need to block merging.

@moseshll
Copy link
Contributor Author

The gsub on the SQL heredoc is redundant since the gsub applied to the system("mysql ...") command takes care of it. The top-level gsub is needed -- system gets mad otherwise. I'm getting rid of the redundant one.

@moseshll moseshll merged commit de4a640 into main Aug 19, 2024
2 checks passed
@moseshll moseshll deleted the DEV-1083_mysql_dump_fixes branch August 19, 2024 18:48
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