Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ikalnytskyi/action-setup-postgres
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3
Choose a base ref
...
head repository: ikalnytskyi/action-setup-postgres
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4
Choose a head ref
  • 9 commits
  • 4 files changed
  • 2 contributors

Commits on Dec 28, 2022

  1. Configuration menu
    Copy the full SHA
    acc2f7f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #9 from ikalnytskyi/remove-set-output

    Use `$GITHUB_OUTPUT` instead of `::set-output`
    ikalnytskyi authored Dec 28, 2022
    Configuration menu
    Copy the full SHA
    3973215 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2023

  1. BREAKING CHANGE: create superuser

    The 'setup-postgres' action used to create a superuser that hasn't been
    exposed to users via 'connection-uri' output. The superuser has been
    named after GitHub Action's system user (i.e. 'runner'), had no password
    and could have been used via PostgreSQL client applications [1] or when
    using manually constructed connection URI with no user set.
    
    The user set via action's input parameters used to be unprivileged with
    escalated permissions to create databases on-demand. I don't remember
    why I made things this way, maybe I got confused somewhere along the
    way, but I don't think having both private superuser and public
    unprivileged user is a good idea. It's quite common in tests to
    dynamically create databases and/or users for applications under test,
    thus superuser permissions are required.
    
    This patch removes a private superuser named after the GitHub Action's
    system user (i.e. 'runner') in favor of granting superuser permissions
    to a user set via action's input parameters. Those who explicitly relied
    on 'runner' user might got affected as the user WON'T exist anymore.
    
    [1] https://www.postgresql.org/docs/15/reference-client.html
    ikalnytskyi committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    f9abc1d View commit details
    Browse the repository at this point in the history
  2. Merge pull request #11 from ikalnytskyi/superuser

    BREAKING CHANGE: create superuser
    ikalnytskyi authored Jan 3, 2023
    Configuration menu
    Copy the full SHA
    ae2fb38 View commit details
    Browse the repository at this point in the history
  3. BREAKING CHANGE: enforce password authentication

    It turns out that PostgreSQL comes with weird default that allows
    passwordless authentication for localhost connections [1]. This
    essentially means that 'password' input parameter for this action was
    ignored.
    
    The 'setup-postgres' action's primary use case is to be used on CI where
    most of the time authentication is desired in order to verify that
    passwords are passed correctly from applications under test.
    
    This patch enforces password authentication even for localhost
    connections, making sure that passwords are verified and not ignored.
    This will break everyone who previously passed wrong password or didn't
    pass it at all.
    
    [1] https://www.postgresql.org/docs/15/auth-trust.html
    
    Fixes: #5
    ikalnytskyi committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    f02428f View commit details
    Browse the repository at this point in the history
  4. Merge pull request #12 from ikalnytskyi/enforce-auth

    BREAKING CHANGE: enforce password authentication
    ikalnytskyi authored Jan 3, 2023
    Configuration menu
    Copy the full SHA
    3574bd5 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2023

  1. BREAKING CHANGE: don't set connection env vars

    The 'setup-postgres' action used to set libpq environment variables [1]
    with connection parameters so the PostgreSQL client applications [2],
    such as 'psql' or 'createuser', won't require any configuration before
    using.
    
    Unfortunately these libpq environment variables are also used by all
    libpq clients including database drivers such as 'psycopg'. While this
    may sound good, it may as well lead to undesired behaviour and unobvious
    issues when connection parameters are automatically pulled from
    environment but most not.
    
    Nevertheless, the need to easy usage of the client applications [2] is
    indisputable because providing a bunch of connection parameters all the
    time is tedious. Therefore this patch pushes requires connection
    parameters to the connection service file [3], so the client
    applications can pull the data on-demand. E.g:
    
        $ psql service=superuser -c "SELECT 1;"
        $ PGSERVICE=superuser createuser myuser
    
    [1] https://www.postgresql.org/docs/15/libpq-envars.html
    [2] https://www.postgresql.org/docs/15/reference-client.html
    [3] https://www.postgresql.org/docs/15/libpq-pgservice.html
    ikalnytskyi committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    75b3f77 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #13 from ikalnytskyi/pgservice

    BREAKING CHANGE: don't set connection env vars
    ikalnytskyi authored Jan 4, 2023
    Configuration menu
    Copy the full SHA
    f19cd58 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fd37e26 View commit details
    Browse the repository at this point in the history
Loading