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

Refactor BaseDatabase class for simplicity #945

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Commits on Oct 17, 2024

  1. allow passing env to CommandRunner

    evgeni authored and ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    470a5ea View commit details
    Browse the repository at this point in the history
  2. Drop config parameter on database instance methods

    The configuration is an instance level setting that is never passed in.
    This simplifies the code by avoiding the need to pass it around.
    ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    747e89e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d75f89b View commit details
    Browse the repository at this point in the history
  4. Use -f parameter for pg_dump

    This avoids needing to use a shell.
    ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    66cf3f7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a2fad6e View commit details
    Browse the repository at this point in the history
  6. Pass in PostgreSQL credentials via environment variables

    This avoids the need to build a complex command. On the plus side, it
    avoids the risk of leaking anything about the database access. On the
    downside, that can make debugging harder.
    ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    de4e060 View commit details
    Browse the repository at this point in the history
  7. Also pass in the database name via an environment variable

    This avoids the need for another helper command and simplifies the
    commands.
    ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    fba403a View commit details
    Browse the repository at this point in the history
  8. Pass in the version query via stdin

    This matches other queries.
    ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    cf26905 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ac61072 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    aa0407e View commit details
    Browse the repository at this point in the history
  11. Completely cache the Debian PostgreSQL versions

    This uses a block that won't run if @deb_postgresql_versions is already
    set.
    ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    974d33d View commit details
    Browse the repository at this point in the history
  12. drop hidden_patterns

    evgeni authored and ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    62caf3e View commit details
    Browse the repository at this point in the history
  13. Use <<~ for more predictable indenting

    This wasn't used in the past for Ruby 1.9 or 2.0 support, but we can now
    rely on this. It makes testing easier.
    ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    591bbc1 View commit details
    Browse the repository at this point in the history
  14. add tests for base database concern

    evgeni authored and ekohl committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    9bed8ed View commit details
    Browse the repository at this point in the history