Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve table formatter approach #369

Open
5 tasks
donhardman opened this issue Oct 7, 2024 · 5 comments
Open
5 tasks

Improve table formatter approach #369

donhardman opened this issue Oct 7, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@donhardman
Copy link
Collaborator

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
@donhardman donhardman added the bug Something isn't working label Oct 7, 2024
@donhardman donhardman self-assigned this Oct 7, 2024
@sanikolaev
Copy link
Collaborator

sanikolaev commented Oct 23, 2024

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

  • /cli + buddy query (various queries, e.g. SHOW and fuzzy)
  • /cli + normal query
  • /cli_json + buddy_query
  • /sql + normal select query
  • /sql + buddy select query
  • /sql?mode=raw + normal query
  • /sql?mode=raw + buddy query
  • multi-query sql over http:

@donhardman
Copy link
Collaborator Author

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

@donhardman
Copy link
Collaborator Author

@Nick-S-2018
I have no idea, but after refactoring, something happened to Elastic-like queries. I tried to fix what I could, but I'm afraid I need help to take a look at this logic:

1) InsertQueryTest::testHTTPElasticInsertQueryOk

/workdir/test/Buddy/functional/InsertQueryTest.php:69

If you need to assist with the new way of forming the response, reach me on Slack. The problem is that the test can't find "_id" in the response, which is weird.

@PavelShilin89, please proceed with the tests in this branch: manticoresoftware/manticoresearch#2701. Let me know if you need any further information or assistance.

@sanikolaev sanikolaev assigned Nick-S-2018 and unassigned donhardman Oct 30, 2024
@donhardman
Copy link
Collaborator Author

I found and fixed the issue on my own, so we can proceed with tests

@PavelShilin89
Copy link

@donhardman Testing performed in PR - manticoresoftware/manticoresearch#2701
Requires test review and merge approval.

@donhardman donhardman removed their assignment Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants