BREAKING CHANGE: create superuser #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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