这是indexloc提供的服务,不要输入任何密码
Skip to content

server: edge case bug in /healthz/sources API endpoint  #9904

@meetzaveri

Description

@meetzaveri

Version Information

Server Version: 2.33.4-cloud.1

Environment

Cloud

What is the current behaviour?

When calling healthz/sources endpoint, it returns following error

"error": "environment variable 'PG_DATABASE_URL' not set",
"status": "FAILED",

This happens even though user has set PG_DATABASE_URL in their env vars under cloud project settings.

What is the expected behaviour?

It should not throw the above error if PG_DATABASE_URL is set in env vars regardless of eventual outcome of API response( being success or failure).

How to reproduce the issue?

  1. Connect Hasura with database where Database URL is set via env vars inside Hasura cloud project settings
  2. After successful connection, you can try checking health of your database by hitting healthz/sources endpoint. Ref - https://hasura.io/docs/latest/api-reference/source-health/#api-spec
  3. Check the response of the API where it should have similar error as mentioned above

Screenshots or Screencast

postman_API_example

Keywords

healthz database

Metadata

Metadata

Assignees

No one assigned

    Labels

    k/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions