wasmCloud / wadm

wasmCloud Application Deployment Manager (wadm): Declarative application deployments for wasmCloud applications.
https://wasmcloud.com
Apache License 2.0
95 stars 22 forks source link

[FEAT] List application status messages in a list #256

Open lachieh opened 2 months ago

lachieh commented 2 months ago

At the moment, all the status messages are listed in a big ol' string. This makes scanning the information difficult both in the cli and in other interfaces that consume this data (i.e. wash ui).

I'd like to see the addition of a status_message_array property on the application status either as an array of strings, or an array of hashmaps with some extra info like time and priority.

Existing

{
  "apps": [
    {
      "deployed_version": "v0.0.1",
      "description": "...",
      "name": "kvcounter-rust",
      "status": "deployed",
      "status_message": "Could not satisfy spread default for file:///Users/lheywood/Projects/wasmCloud/wasmCloud/examples/rust/actors/http-hello-world/build/http_hello_world_s.wasm, 0/1 eligible hosts found., Putting link definition between kvcounter_rust-file____users_lheywood_projects_wasmcloud_wasmcloud_examples_rust_actors_http_hello_world_build_http_hello_world_s_wasm and kvcounter_rust-ghcr_io_wasmcloud_keyvalue_redis_0_23_0, Putting link definition between kvcounter_rust-ghcr_io_wasmcloud_http_server_0_20_0 and kvcounter_rust-file____users_lheywood_projects_wasmcloud_wasmcloud_examples_rust_actors_http_hello_world_build_http_hello_world_s_wasm, Could not satisfy spread default for ghcr.io/wasmcloud/http-server:0.20.0, 0/1 eligible hosts found., Could not satisfy spread default for ghcr.io/wasmcloud/keyvalue-redis:0.23.0, 0/1 eligible hosts found.",
      "version": "v0.0.1"
    }
  ],
  "success": true
}

Proposed

{
  "apps": [
    {
      "deployed_version": "v0.0.1",
      "description": "...",
      "name": "kvcounter-rust",
      "status": "deployed",
      "status_message": "Could not satisfy spread default for file:///Users/lheywood/Projects/wasmCloud/wasmCloud/examples/rust/actors/http-hello-world/build/http_hello_world_s.wasm, 0/1 eligible hosts found., Putting link definition between kvcounter_rust-file____users_lheywood_projects_wasmcloud_wasmcloud_examples_rust_actors_http_hello_world_build_http_hello_world_s_wasm and kvcounter_rust-ghcr_io_wasmcloud_keyvalue_redis_0_23_0, Putting link definition between kvcounter_rust-ghcr_io_wasmcloud_http_server_0_20_0 and kvcounter_rust-file____users_lheywood_projects_wasmcloud_wasmcloud_examples_rust_actors_http_hello_world_build_http_hello_world_s_wasm, Could not satisfy spread default for ghcr.io/wasmcloud/http-server:0.20.0, 0/1 eligible hosts found., Could not satisfy spread default for ghcr.io/wasmcloud/keyvalue-redis:0.23.0, 0/1 eligible hosts found.",
      "status_message_array": [
        {
          "message": "Could not satisfy spread default for file:///Users/lheywood/Projects/wasmCloud/wasmCloud/examples/rust/actors/http-hello-world/build/http_hello_world_s.wasm, 0/1 eligible hosts found.",
          "time": "2021-09-01T12:00:00Z",
          "level": "critical"
        },
        {
          "message": "Putting link definition between kvcounter_rust-file____users_lheywood_projects_wasmcloud_wasmcloud_examples_rust_actors_http_hello_world_build_http_hello_world_s_wasm and kvcounter_rust-ghcr_io_wasmcloud_keyvalue_redis_0_23_0",
          "time": "2021-09-01T12:00:00Z",
          "level": "info"
        },
        {
          "message": "Putting link definition between kvcounter_rust-ghcr_io_wasmcloud_http_server_0_20_0 and kvcounter_rust-file____users_lheywood_projects_wasmcloud_wasmcloud_examples_rust_actors_http_hello_world_build_http_hello_world_s_wasm",
          "time": "2021-09-01T12:00:00Z",
          "level": "info"
        },
        {
          "message": "Could not satisfy spread default for ghcr.io/wasmcloud/http-server:0.20.0, 0/1 eligible hosts found.",
          "time": "2021-09-01T12:00:00Z",
          "level": "critical"
        },
        {
          "message": "Could not satisfy spread default for ghcr.io/wasmcloud/keyvalue-redis:0.23.0, 0/1 eligible hosts found.",
          "time": "2021-09-01T12:00:00Z",
          "level": "critical"
        }
      ]
      "version": "v0.0.1"
    }
  ],
  "success": true
}
stale[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this has been closed too eagerly, please feel free to tag a maintainer so we can keep working on the issue. Thank you for contributing to wasmCloud!

lachieh commented 1 week ago

@brooksmtownsend can we reopen this one? I don't seem to have the ability.