opensearch-project / opensearch-project/sql
[v3.0.0] Handle legacy test cases relying on OpenSearch DSL format
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
This task is to decide which of the legacy tests using OpenSearch DSL (json) format are worth keeping and what to do with them.
#3367 deprecates OpenSearch DSL format.
However, there are some issues with legacy IT test cases:
- Correctness check is written against the OpenSearch DSL response format. This is less of an issue and can be resolved by either
- Modify all test cases to expect and check correctness with jdbc response
- Add an adapting layer to map jdbc response to the json format, so that we don't need to modify multiple hundreds of test cases
- A more troublesome issue is that they rely on using the endpoint _plugins/_sql?format=json to ensure legacy engine is being used, instead of v2 engine. Since the PR deprecates "?format=json", most of those queries in legacy IT will now be run by the v2 engine. However,
- Some of those queries are considered invalid query for the v2 engine.
- And for those queries that have no problem running in v2 engine, it's questionable if we still want to test them in legacy engine.
We might want to move away from specifically testing the legacy engine in IT cases, and instead just test the desired queries, regardless of it's legacy or not.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading #3367 and inventorying the legacy IT test cases that use the _plugins/_sql?format=json endpoint and OpenSearch DSL response checks. Compare the affected queries with v2 behavior and document which tests to retain, update, adapt, or remove; done means the legacy test coverage has an agreed direction and the affected cases reflect it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, json, sql
- Domain
- backend-api-design, testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100