Support `psql` as part of the server host
- Lenguaje dominante
- TypeScript
- Estrellas
- 25
- Forks
- 22
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
According to the [CAF (Cloud Adoption Framework)](https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations) the official abbreviation for a PostgreSQL database is `psql`.
But the current implementation blindly replaces [`'psql'` with `''`](https://github.com/Azure/postgresql/blob/1d47d25bbb9375f1192ff806291f807dd2ce9e92/src/Utils/ActionInputs.ts#L27C1-L28C1), which breaks the ability to use this action with such a named DB.
**Input**:
```yml
- 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:
```yml
- uses: azure/postgresql@v1
with:
connection-string: host=caf-named-db-p"sql.postgres.database.azure.com ...
```
But this is far from ideal 😂
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza en src/Utils/ActionInputs.ts, en la lógica enlazada que elimina `psql` y las comillas de la cadena de conexión. Reproduce el problema con un host como `caf-named-db-psql.postgres.database.azure.com` y, a continuación, verifica que la action conserve `psql` cuando forme parte del host, mientras sigue analizando correctamente la cadena de conexión.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- github-actions, postgresql, typescript
- Área
- database, devops
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100