Skip to content

Conversation

@aelkiss
Copy link
Member

@aelkiss aelkiss commented Sep 15, 2025

@Ronster2018 Mainly just want to check that this is looking the way you'd expect both in docker-compose.yml and that it matches what you'd expect given https://hathitrust.atlassian.net/wiki/spaces/ETT/pages/3489759233/Database+Credentials+in+Kubernetes

@aelkiss aelkiss requested a review from Ronster2018 September 15, 2025 20:41
@aelkiss
Copy link
Member Author

aelkiss commented Sep 15, 2025

@Ronster2018 I'll have a corresponding ht_tanka pull request as well soon.

Also: ETT-36: remove version.rb
@aelkiss aelkiss force-pushed the ETT-44-database-config branch from a3710ca to ea8e16a Compare September 15, 2025 21:11
@coveralls
Copy link

coveralls commented Sep 15, 2025

Coverage Status

coverage: 98.808% (-0.002%) from 98.81%
when pulling f550a54 on ETT-44-database-config
into 76040e9 on main.

@aelkiss
Copy link
Member Author

aelkiss commented Sep 15, 2025

Tests succeeded; I think the minimal coverage decrease isn't a problem.

Comment on lines 36 to 42
environment:
REDIS_URL: redis://redis/
PREVIEW_EMAIL: true
MARIADB_HT_RO_HOST: mariadb-test
MARIADB_HT_RO_USERNAME: datasets
MARIADB_HT_RO_PASSWORD: datasets
MARIADB_HT_RO_DATABASE: ht
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, we don't need to duplicate the work being brought in from the fragment template above. It looks like the only difference here is the MARIADB_HT_RO_HOST section on line 39 which can be overwritten. I made the following changes locally and here is what I would suggest:

line 19: add &environment anchor
line 37: add <<: *environment alias
line 39: Keep MARIADB_HT_RO_HOST: mariadb-test

to test and check the output in the terminal to make sure things look right, run docker compose -f docker-compose.yml config

  environment: &environment
    REDIS_URL: redis://redis/
    PREVIEW_EMAIL: true
    MARIADB_HT_RO_HOST: mariadb-dev
    MARIADB_HT_RO_USERNAME: datasets
    MARIADB_HT_RO_PASSWORD: datasets
    MARIADB_HT_RO_DATABASE: ht

services:

  test:
    <<: *common-service
    restart: never
    command: bundle exec rspec
    depends_on:
      redis: *healthy
      mariadb-test: *healthy
    environment:
      <<: *environment
      MARIADB_HT_RO_HOST: mariadb-test

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I'll give that a try!

Copy link
Member Author

Choose a reason for hiding this comment

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

This looks like it should work. Once tests pass I'll go ahead and merge.

In accordance with feedback on the PR
@aelkiss aelkiss merged commit e15b934 into main Sep 17, 2025
1 of 2 checks passed
@aelkiss aelkiss deleted the ETT-44-database-config branch September 17, 2025 14:13
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.

4 participants