Skip to content

Conversation

@moseshll
Copy link
Contributor

  • Move all Perl DB connection code to a single module under perl_lib
  • Remove config/database.yml
  • Add necessary MARIADB_HT... and MARIADB_RIGHTS... vars to docker compose.

- Move all Perl DB connection code to a single module under `perl_lib`
- Remove config/database.yml
- Add necessary `MARIADB_HT...` and `MARIADB_RIGHTS...` vars to docker compose.
@moseshll moseshll requested a review from aelkiss January 20, 2025 19:53
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.

This all looks right to me. Note that we will need to get https://hathitrust.atlassian.net/browse/DEV-1471 done and merged before deploying this.


my $sdr_dbh;
$sdr_dbh = DBI->connect( "DBI:MariaDB:$db_name:$db_server", $db_user, $db_passwd,
{ RaiseError => 0, AutoCommit => 1 } ) || die "Cannot connect: $DBI::errstr";
Copy link
Member

Choose a reason for hiding this comment

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

Just noting that the move removes the AutoCommit => 1, but that should be fine as this code is only using the read-only connection (and we weren't previously using autocommit for the read-write stuff)

@aelkiss aelkiss merged commit 8141446 into main Jan 24, 2025
1 check passed
@aelkiss aelkiss deleted the DEV-1472_db_credentials_from_ENV branch January 24, 2025 15:08
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