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

[BUG] Query insights tests fail on first pass #638

Closed
dblock opened this issue Oct 23, 2024 · 0 comments · Fixed by #641
Closed

[BUG] Query insights tests fail on first pass #638

dblock opened this issue Oct 23, 2024 · 0 comments · Fixed by #641
Assignees
Labels
bug Something isn't working

Comments

@dblock
Copy link
Member

dblock commented Oct 23, 2024

What is the bug?

Intermittent CI failure, e.g. https://github.com/opensearch-project/opensearch-api-specification/actions/runs/11487125212/job/31970965603?pr=637

How can one reproduce the bug?

I can reproduce it on a new docker start from tests/plugins/query_insights.

tests/plugins/query_insights $ docker compose up
npm run test:spec--insecure -- --tests tests/plugins/query_insights/insights/top_queries.yaml --verbose
        FAILED  Retrieve top queries by memory usage.
            PASSED  PARAMETERS
                PASSED  type
            PASSED  REQUEST BODY
            PASSED  RESPONSE STATUS
            PASSED  RESPONSE PAYLOAD BODY
            FAILED  RESPONSE PAYLOAD SCHEMA (data/top_queries/2/source/query/bool/adjust_pure_negative property is not defined in the spec)
            SKIPPED RESPONSE OUTPUT VALUES

Here's the response:

"top_queries": [
    {
      "timestamp": 1729713532744,
      "source": {
        "size": 10000,
        "query": {
          "bool": {
            "must_not": [
              {
                "exists": {
                  "field": "source",
                  "boost": 1
                }
              }
            ],
            "adjust_pure_negative": true,
            "boost": 1
          }
        }
      },
      "phase_latency_map": {
        "expand": 0,
        "query": 53,
        "fetch": 2
      },
      "search_type": "query_then_fetch",
      "indices": [
        ".opensearch-sap-log-types-config"
      ],
      "node_id": "G9AF1X_gQtWHg5VZjUVgtw",
      "total_shards": 1,
      "labels": {},
      "task_resource_usages": [
        {
          "action": "indices:data/read/search",
          "taskId": 43,
          "parentTaskId": -1,
          "nodeId": "G9AF1X_gQtWHg5VZjUVgtw",
          "taskResourceUsage": {
            "cpu_time_in_nanos": 1731501,
            "memory_in_bytes": 97912
          }
        }
      ],

What is the expected behavior?

Tests to pass.

Do you have any additional context?

After #625.

@dblock dblock added bug Something isn't working untriaged labels Oct 23, 2024
@dblock dblock removed the untriaged label Oct 23, 2024
@dblock dblock changed the title [BUG] Query insights tests intermittently fail [BUG] Query insights tests fail on first pass Oct 24, 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

Successfully merging a pull request may close this issue.

2 participants