Skip to content

Comments

feat: group instance status fields#50

Merged
jason-lynch merged 1 commit intomainfrom
feat/PLAT-86/group-instance-status-fields
Jun 16, 2025
Merged

feat: group instance status fields#50
jason-lynch merged 1 commit intomainfrom
feat/PLAT-86/group-instance-status-fields

Conversation

@jason-lynch
Copy link
Member

@jason-lynch jason-lynch commented Jun 12, 2025

Groups the instance status fields into logical sections so that they're easier to read.

Example

{
  // ...
  "instances": [
    {
      "connection_info": {
        "hostname": "orbstack",
        "ipv4_address": "198.19.249.2",
        "port": 32797
      },
      "created_at": "2025-06-13T19:34:07Z",
      "host_id": "8f6e5455-e228-4e2e-9129-a86cba1437c8",
      "id": "2d5c4307-9e1c-558d-ab8a-6c1f326a5fad",
      "node_name": "n1",
      "postgres": {
        "patroni_state": "running",
        "role": "primary",
        "version": "17.5"
      },
      "spock": {
        "read_only": "off",
        "subscriptions": [
          {
            "name": "sub_n1n3",
            "provider_node": "n3",
            "status": "replicating"
          },
          {
            "name": "sub_n1n2",
            "provider_node": "n2",
            "status": "replicating"
          }
        ],
        "version": "4.0.10"
      },
      "state": "available",
      "status_updated_at": "2025-06-13T19:36:23Z",
      "updated_at": "2025-06-13T19:34:17Z"
    },
    // ...
  ],
  // ...
}

PLAT-86

@jason-lynch jason-lynch force-pushed the feat/PLAT-86/api-endpoint-summaries branch from 8a7079b to c2400d1 Compare June 12, 2025 21:02
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/group-instance-status-fields branch from a4ec727 to 22831e1 Compare June 12, 2025 21:02
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/api-endpoint-summaries branch 2 times, most recently from e64f881 to b8c6248 Compare June 12, 2025 21:22
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/group-instance-status-fields branch from 22831e1 to f1afa73 Compare June 12, 2025 21:24
@jason-lynch jason-lynch requested review from mmols and tsivaprasad June 12, 2025 21:42
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/api-endpoint-summaries branch from b8c6248 to f1d8414 Compare June 12, 2025 21:54
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/group-instance-status-fields branch from f1afa73 to 3aae1ec Compare June 12, 2025 21:54
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/api-endpoint-summaries branch from f1d8414 to 5e4ae7a Compare June 13, 2025 11:32
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/group-instance-status-fields branch from 3aae1ec to 365c423 Compare June 13, 2025 11:33
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/api-endpoint-summaries branch from 5e4ae7a to e0216f5 Compare June 13, 2025 17:19
Groups the instance status fields into logical sections so that they're
easier to read.

PLAT-86
@jason-lynch jason-lynch force-pushed the feat/PLAT-86/group-instance-status-fields branch from 365c423 to c73a6e5 Compare June 13, 2025 17:19
Base automatically changed from feat/PLAT-86/api-endpoint-summaries to main June 13, 2025 18:21
Copy link
Contributor

@tsivaprasad tsivaprasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome...!

restish control-plane-local-1 get-database f2f1cae9-6f37-4609-aa98-d0991bff3493

HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 16 Jun 2025 16:39:03 GMT

{
  created_at: "2025-06-16T15:12:23Z"
  id: "f2f1cae9-6f37-4609-aa98-d0991bff3493"
  instances: [
    {
      connection_info: {
        hostname: "docker-desktop"
        ipv4_address: "192.168.64.2"
        port: 56294
      }
      created_at: "2025-06-16T15:12:54Z"
      host_id: "8f6e5455-e228-4e2e-9129-a86cba1437c8"
      id: "60cff14d-066d-579c-b139-522d35f69d08"
      node_name: "n1"
      postgres: {
        patroni_state: "running"
        role: "primary"
        version: "17.5"
      }
      spock: {
        read_only: "off"
        subscriptions: [
          {
            name: "sub_n1n2"
            provider_node: "n2"
            status: "replicating"
          }
          {
            name: "sub_n1n3"
            provider_node: "n3"
            status: "replicating"
          }
        ]
        version: "4.0.10"
      }
      state: "available"
      status_updated_at: "2025-06-16T16:38:58Z"
      updated_at: "2025-06-16T15:13:08Z"
    }
    {
      connection_info: {
        hostname: "docker-desktop"
        ipv4_address: "192.168.64.2"
        port: 56290
      }
      created_at: "2025-06-16T15:12:54Z"
      host_id: "36dcd7ff-9f04-476e-ac6f-5495d075607d"
      id: "1de81ed2-aac1-5074-a221-681fdff0735d"
      node_name: "n2"
      postgres: {
        patroni_state: "running"
        role: "primary"
        version: "17.5"
      }
      spock: {
        read_only: "off"
        subscriptions: [
          {
            name: "sub_n2n3"
            provider_node: "n3"
            status: "replicating"
          }
          {
            name: "sub_n2n1"
            provider_node: "n1"
            status: "replicating"
          }
        ]
        version: "4.0.10"
      }
      state: "available"
      status_updated_at: "2025-06-16T16:38:56Z"
      updated_at: "2025-06-16T15:13:08Z"
    }
    {
      connection_info: {
        hostname: "docker-desktop"
        ipv4_address: "192.168.64.2"
        port: 56288
      }
      created_at: "2025-06-16T15:12:54Z"
      host_id: "fa461a39-5867-4a72-9923-dd7ce91e1eab"
      id: "73e3ab53-65b4-5a12-a73c-01c9df80af73"
      node_name: "n3"
      postgres: {
        patroni_state: "running"
        role: "primary"
        version: "17.5"
      }
      spock: {
        read_only: "off"
        subscriptions: [
          {
            name: "sub_n3n1"
            provider_node: "n1"
            status: "replicating"
          }
          {
            name: "sub_n3n2"
            provider_node: "n2"
            status: "replicating"
          }
        ]
        version: "4.0.10"
      }
      state: "available"
      status_updated_at: "2025-06-16T16:38:59Z"
      updated_at: "2025-06-16T15:13:08Z"
    }
  ]
  spec: {
    backup_config: {
      provider: ""
      repositories: [
        {
          base_path: "/backups/container"
          id: "e45dfd13-b318-4ce2-acbe-dd07a7c1c006"
          type: "posix"
        }
      ]
    }
    database_name: "my_app"
    database_users: [
      {
        attributes: ["SUPERUSER", "LOGIN"]
        db_owner: false
        password: "password"
        username: "admin"
      }
      {
        attributes: ["LOGIN"]
        db_owner: false
        password: "password"
        roles: ["pgedge_application"]
        username: "app"
      }
    ]
    extra_volumes: [
      {
        destination_path: "/backups/container"
        host_path: "/Users/sivat/backups/host"
      }
    ]
    nodes: [
      {
        extra_volumes: [
          {
            destination_path: "/backups/container"
            host_path: "/Users/sivat/backups/host"
          }
        ]
        host_ids: ["8f6e5455-e228-4e2e-9129-a86cba1437c8"]
        name: "n1"
      }
      {
        extra_volumes: [
          {
            destination_path: "/backups/container"
            host_path: "/Users/sivat/backups/host"
          }
        ]
        host_ids: ["36dcd7ff-9f04-476e-ac6f-5495d075607d"]
        name: "n2"
      }
      {
        extra_volumes: [
          {
            destination_path: "/backups/container"
            host_path: "/Users/sivat/backups/host"
          }
        ]
        host_ids: ["fa461a39-5867-4a72-9923-dd7ce91e1eab"]
        name: "n3"
      }
    ]
    postgres_version: "17.0.0"
    spock_version: "4.0.0"
  }
  state: "available"
  updated_at: "2025-06-16T15:12:23Z"
}

@jason-lynch jason-lynch merged commit 89737c3 into main Jun 16, 2025
2 checks passed
@jason-lynch jason-lynch deleted the feat/PLAT-86/group-instance-status-fields branch June 16, 2025 18:49
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.

3 participants