opensearch-project / sql-cli

The SQL CLI component in OpenSearch is a stand-alone Python application for query
Apache License 2.0
4 stars 13 forks source link

Main test: Update query returned records limit #30

Closed Swiddis closed 1 month ago

Swiddis commented 1 month ago

Description

When running in CI via tox, the returned limit seems to be 10000, while locally it's 200 by default. This means that one of the two test sets is always failing depending on what this number is. This PR manually specifies the limit to remove this inconsistency.

Also, side note: if you have the old cli_helpers[styles]=1.3 locally after the 2.3 dependency was merged in main, formatting tests will start behaving inconsistently locally vs on CI. Pulling the new dep from main will fix it.

Issues Resolved

N/A

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Swiddis commented 1 month ago

Found the root cause: https://github.com/opensearch-project/sql/pull/2860 changes the limit from 200 to 10000 as of 2.17. This means you get different behavior depending on which version you run. I added a LIMIT clause to enforce consistency.