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

Support psql as part of the server host #48

Open
michaelcontento opened this issue Aug 31, 2023 · 1 comment · May be fixed by #50
Open

Support psql as part of the server host #48

michaelcontento opened this issue Aug 31, 2023 · 1 comment · May be fixed by #50

Comments

@michaelcontento
Copy link

michaelcontento commented Aug 31, 2023

According to the CAF (Cloud Adoption Framework) the official abbreviation for a PostgreSQL database is psql.

But the current implementation blindly replaces 'psql' with '', which breaks the ability to use this action with such a named DB.

Input:

      - uses: azure/postgresql@v1
        with:
          connection-string: host=caf-named-db-psql.postgres.database.azure.com ...

Output:

psql: error: could not translate host name "caf-named-db-.postgres.database.azure.com" to address: Name or service not known
Error: Error occurred while running action:
Error: The process '/usr/bin/psql' failed with exit code 2

Personal workaround:

The code currently not only replaces 'psql' with '', it also (as a second step) replaces '"' with ''. So a functional workaround that I use is adding a rouge " like this:

      - uses: azure/postgresql@v1
        with:
          connection-string: host=caf-named-db-p"sql.postgres.database.azure.com ...

But this is far from ideal 😂

@spowser spowser linked a pull request Nov 16, 2023 that will close this issue
@spowser
Copy link

spowser commented Nov 16, 2023

Created a fork and published a release spowser/postgresql@v2 to address this issue until they merge the PR

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 a pull request may close this issue.

2 participants