manticoresoftware / manticoresearch-buddy

Manticore Buddy is a Manticore Search's sidecar which helps it with various tasks
GNU General Public License v3.0
20 stars 2 forks source link

Improve table formatter approach #369

Open donhardman opened 2 weeks ago

donhardman commented 2 weeks ago

Bug Description:

The table version of view for SHOW VERSION query gives us JSON

curl http://localhost:9308/cli?show%20version
[
  {
    "total": 5,
    "error": "",
    "warning": "",
    "columns": [
      {
        "Component": {
          "type": "string"
        }
      },
      {
        "Version": {
          "type": "string"
        }
      }
    ],
    "data": [
      {
        "Component": "Daemon",
        "Version": "6.3.3 f92db4ac1@24070715 dev"
      },
      {
        "Component": "Columnar",
        "Version": "columnar 2.3.1 42f2b06@24070110"
      },
      {
        "Component": "Secondary",
        "Version": "secondary 2.3.1 42f2b06@24070110"
      },
      {
        "Component": "KNN",
        "Version": "knn 2.3.1 42f2b06@24070110"
      },
      {
        "Component": "Buddy",
        "Version": "buddy v2.3.13"
      }
    ]
  }
]

Due to the underlying architecture we use in Buddy tableFormatter, we should consider rethinking our approach and possibly refactor it in a way that allows table representation for each command to be added automatically.

Manticore Search Version:

Latest dev version

Operating System Version:

Ubuntu Jammy

Have you tried the latest development version?

None

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

- [ ] Implementation completed - [ ] Tests developed - [ ] Documentation updated - [ ] Documentation reviewed - [ ] Changelog updated
sanikolaev commented 4 days ago

Once done let's add CLT tests for these combinations:

donhardman commented 2 days ago

Implementation finished, but waiting for https://github.com/manticoresoftware/manticoresearch/issues/2680 to be resolved before we can test it in the easiest way possible.