Skip to content

Conversation

@nyurik
Copy link
Contributor

@nyurik nyurik commented Oct 29, 2022

  • use new output system
  • allow customization of the user rights
  • export PGDATABASE and PGPASSWORD env vars

fixes #6
fixes #7

* use new output system
* allow customization of the user rights
* export PGDATABASE and PGPASSWORD env vars
@rcmuniz1994
Copy link

@ikalnytskyi This PR fixes a warning about a deprecated command too. See:

Screen Shot 2022-12-15 at 00 03 21

Isn't it interesting merge it asap? Or, if you want, I can fix just part related with the warning.

Thanks. Have a nice day.

@nyurik
Copy link
Contributor Author

nyurik commented Dec 15, 2022

@rcmuniz1994 I have since released an updated version that has postgis focus - https://github.com/actions-marketplace-validations/nyurik_action-setup-postgis -- but obviously many people only need postgres itself, not postgis.

@ikalnytskyi
Copy link
Owner

ikalnytskyi commented Dec 28, 2022

Hey @nyurik,

Thanks for the patch and sorry for ignoring it for so long.

use new output system

Can you please submit it as a separate PR? If inconvenient, I can do it on your behalf. I just want to track separate changes separately, preserving rationale in commits description.

Submitted this in a separate PR preserving original authorship: #9.

export PGDATABASE and PGPASSWORD env vars

Can you please explain why do we need this? Users are advised to use connection-uri instead of relying on environment variables.

In order to prevent unexpected bugs when these env vars are used for newly created users, I decided to remove them from being set globally. The credentials for created user can now be requested via postgresql service parameter (i.e. via PGSERVICE envvars or via service= connection parameter). See #13 for details.

allow customization of the user right

The trick you're doing is a little bit low-level. Can you please explain to me what is your use case and what are you trying to achieve? I'd expect createuser invoked by this action to be an implementation detail, and all non-standard users be crafted by action users via createuser manual invocation.

I read the original issue, and it seems the main rationale behind this patch is because default user wasn't a super user. I've changed that in #11 It was my bad that I didn't make it a super user in the first place.

@ikalnytskyi
Copy link
Owner

I think raised concerns are addressed in @v4, so I'm closing this patch. Please feel free to re-submit with improvements you're still missing or file a ticket in the issue tracker.

@ikalnytskyi ikalnytskyi closed this Jan 5, 2023
@nyurik
Copy link
Contributor Author

nyurik commented May 24, 2024

@ikalnytskyi thanks for an in-depth reply! I somehow missed, and only now got back to reviewing all this. Thanks for your dedication!

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.

New user has no rights, and cannot be changed when default Use the new set output instead of the deprecated one

3 participants