Skip to content

feat: collect and report all source databases checks at once

Artyom Kartasov requested to merge collect-source-db-checks into master

Description

Collect and report all source databases checks at once

The response returns all warnings, notices and errors for all databases at once (grouped by error type, then by database)

If the database has multiple errors/warnings, the most severe error level is listed.

Related issue

Examples

{
  "status": "error",
  "result": "connection_error",
  "message": "Too many databases were requested to be checked. Only the following databases have been verified: postgres, t4, t5, t6, t7. The following databases have errors:\n \"t7\" - failed to connect to `host=172.17.0.2 user=postgres database=t7`: server error (FATAL: database \"t7\" does not exist (SQLSTATE 3D000));\n \"t6\" - failed to connect to `host=172.17.0.2 user=postgres database=t6`: server error (FATAL: database \"t6\" does not exist (SQLSTATE 3D000));\n \n",
  "dbVersion": 14,
  "tuningParams": {}
}
{
  "status": "notice",
  "result": "unexplored_image",
  "message": "The connection to the following databases was successful: t1,t2, but details about the extensions and locales of the Docker image have not yet been collected. Please try again later. \n",
  "dbVersion": 14,
  "tuningParams": {}
}
{
  "status": "error",
  "result": "connection_error",
  "message": "The following databases have errors:\n \"test_small\" - failed to connect to `host=db.***** user=postgres database=test_small`: server error (FATAL: database \"test_small\" does not exist (SQLSTATE 3D000));\n \nThe image specified in section \"databaseContainer\" lacks the following extensions used in the source databases:  test3 (pg_graphql 1.2.3). \n",
  "dbVersion": 15,
  "tuningParams": {
    "default_statistics_target": "100",
    "effective_cache_size": "98304",
    "jit": "off",
    "jit_provider": "llvmjit",
    "maintenance_work_mem": "65536",
    "max_parallel_maintenance_workers": "1",
    "max_parallel_workers": "2",
    "max_parallel_workers_per_gather": "1",
    "random_page_cost": "1.1",
    "work_mem": "3500"
  }
}

Checklist

  • MR description has been reviewed
  • MR changes are functionally tested
  • MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed & DOCS ARE ADJUSTED (reference doc, etc)
  • MR does NOT have UI changes OR there are UI changes and they have been reviewed & UX IS REVIEWED
Edited by Artyom Kartasov

Merge request reports