- Added more search queries under pytest
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Tests**
- Added new end-to-end test functions for various SQL queries, including
count aggregation, match, max, in, and distinct queries, to ensure API
reliability and accuracy.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixed function breaking testcase under logs
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Tests**
- Updated UI test selectors for the logs page to improve accuracy and
reliability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved spacing in error handling to enhance code readability.
- **New Features**
- Enhanced search functionality with additional parameters for more
precise results.
- Dynamically added columns based on specific conditions to improve data
visualization.
- **Tests**
- Updated UI tests to ensure compatibility with the new search and
column addition features.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Neha P <neha@openobserve.ai>
- Verify if table type dashboard is created
- Verify if timezone selected as Asia/Calcuta and timestamp on UI is as
per selected timezone
- Verify if user is able to change timezone to Europe/Zurich
- Verify if the timezone is updated to changed timezone
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced timestamp comparison tests across different timezones on
dashboards.
- **Tests**
- Added new helper functions for test cases to streamline request
sending and timestamp formatting.
- Cleaned up and optimized existing test cases by removing unused and
commented-out code.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Improved handling and parsing of SQL queries for better performance
and reliability.
- Simplified logic for timestamp handling and query parsing.
- **Bug Fixes**
- Fixed issues with error notifications related to SQL orderby and
timestamp requirements.
- **New Features**
- Added dynamic column addition to the result grid based on SQL mode and
selected fields.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Neha P <neha@openobserve.ai>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added new test cases for checking JSON responses with timestamps and
assertions for response statuses.
- **Bug Fixes**
- Updated query functions for stream exploration to improve accuracy.
- **Chores**
- Added a new environment variable `ZO_INGEST_ALLOWED_UPTO` with a value
of `5`.
- **Tests**
- Enhanced UI tests with new functions and assertions to improve test
coverage and reliability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced search functionality with indexed matching options.
- **Bug Fixes**
- Updated SQL queries in tests to align with new matching functions.
- **Improvements**
- Standardized naming conventions for matching functions to improve
clarity and consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The new endpoint `/config/reload` will refresh the
environment variables.
There are a bunch of env-vars which will not be reloaded
for e.g. HTTP_PORT etc. these will need a restart.
---------
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced SQL query manipulation and result processing in the logs
functionality.
- Improved handling of aggregation flags in the logs.
- **Bug Fixes**
- Adjusted logic for calculating total query results to ensure accurate
data representation.
- **Tests**
- Added UI tests for resetting filters, refreshing the page, and
interacting with elements in SQL mode.
- **Chores**
- Commented out `loadLogsData()` function call in the logs module to
optimize performance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Verify pagination displayed for schema
- Verify pagination displayed when histogram is off and user clicks on
log result and closes the result
- Verify if pagination is displayed when SQL is on and user clicks on
log result and closes the result
- Verify if results displayed when SQL+histogram is on and then stream
is selected
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced login process to improve user authentication flow.
- Added pagination functionality for better navigation through results
in various scenarios.
- Improved display of results when SQL and histogram features are used
together.
- Enhanced user interface for selecting streams and displaying
corresponding results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
match_all renamed to match_all_raw
match_all_indexed renamed to match_all
same pattern applied to *_ignore_case functions
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved clarity in function names for better understanding and
usability.
- **Tests**
- Updated SQL queries in test cases to reflect changes in function
names, ensuring accurate test results.
- **Chores**
- Adjusted logging statements to provide better insights during
debugging.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Verify if user is able to create and delete Once - type report
- Verify if user is able to create and delete Hourly - type report
- Verify if user is able to create and delete weekly- type report
- Verify if user is able to create and delete monthly - type report
- Verify if user is able to create a new dashboards for all the reports
and delete it
- Verify if user is able to delete all the reports after creating
Testcases for the following scenarios -
- Verify if user is able to create stream with empty name
- Verify if user navigates to logs and selects empty name stream and
then selects a stream with fields, all the data should load
- Verify if user is able to add field
- Verify if user is able to delete field
- Added match all and match all index query time taken comparison
- Added match all ignore cases and match_all_indexed_ignore_case time
take comparions
- Add settings page sanity
- Add refresh stats cases on page reload
- Added more cases under logs for sanity
**Testcases covered**
- Create an area type dashboard
- Take a screenshot of this dashboard
- Compare this image with an existing image
- Delete the panel
- Delete the dashboard
Automation for below scenarios-
- Verify if Add to defined schema fields is displayed on UI
- Verify if on clicking the checkbox for items, the button gets enabled
- Verify on adding on user defined schema the selected fields are
displayed.
- Verify after updating these settings user is able to navigate to
stream via stream explorer
- Verify if user is able to click on log search results after updating
schema settings
- Verify if the updated schema displayed under results as ALL post new
data ingestion
- Verify if user is able to remove the fields and update the settings
- Verify after removing, the fields do not display under all in UI
Tests for following scenarios
- Verify if user is able to view region tab
- Verify if user is able to click on region tab
- Verify if 2 options displayed under region tab
- Verify if 1 Region saved under saved view is displayed when the view
applied
- Verify if user is able to select stream explorer and click on saved
view only 1 selected option to be displayed
- Verify if saved view is deleted after adding only1 region should click
on region, change
Automation for bug - #3480
-Logs: Blank page displayed after user adds a function on logs page,
clicks on any log result and then selects search around
Dashboard : Multi select variables
- Should select 1 variable
- should select multiple variable
- should select All variables
- Verify selection appears on UI.
- Delete a panel and dashboard
Logs:
- Search around to work when only histogram enabled
- Search around to work when SQL is enabled
- Verify if user is able to click on pipeline via menu
- Verify if user is able to click on pipeline from the tabs via pipeline
menu
- Verify if user is able to select a stream on pipeline UI
- Verify if user is able to add name on pipeline UI
- Verify if user is able to close pipeline UI
- Verify if user is able to save a new pipeline
- Verify user is able to edit and delete a new pipeline
- Verify if functions is displayed when editing pipeline
- Verify if route is displayed on editing pipeline
- Verify functions drag drop works on pipeline UI
- Verify route drag drop works on pipeline UI
- Verify if error displayed on adding invalid functions on pipeline UI
- Verify if user is able add a new function successfully via pipeline
functions
- Verify if cancel button works on function additon UI
- Verify if error displayed when route created with only spaces
- Verify if user able to create route and then delete the pipeline post
creation of route
- Verify if error displayed on clicking save button directly without
adding name for function under pipeline
**Problem**:
Histogram was disabled in SQL mode.
**Solution**:
Enabled histogram in sql mode for only non aggregated queries
---------
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
- Verify if quick mode is displayed
- Verify if user is able to click on interesting fields
- Verify on clicking interesting fields user is able to view the field
in sql mode
- Verify if on clicking interesting field when histogram is enabled,
expected results are displayed
- Verify if error displayed on entering random text in histogram mode
when quick mode is on
- Verify should display order by as default when switched to sql mode
- Verify if on page refresh the orderby is still present by default in
sql mode
- Verify if on page adding removing the interesting field removes in
from sql mode and the results too
In sql mode, if query does not contains " order by " it throws error.
Solution:
On switching to sql mode, by default added "order by _timestamp desc" in
logs query
- should not allow adding drilldown without name
- should add variable under drilldown and verify if drilldown is added
- delete the created dashboard once verification is done
- The notification has been eliminated during the configuration of
absolute dates.
- The SQL mode should not trigger the query automatically upon
deactivation if run query flag is true.
- The Histogram feature should remain inactive while SQL mode is
enabled.
- Modifications related to the quick mode.
- Within SQL mode, the "_timestamp" field is required, and an "order by"
clause is necessary.
---------
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
- added match all valid cases for histogram and sql
- match_all_indexed cases for histogram and sql
- match_all_ignore case for histogram and sql
- match_all_indexed_ignorecase for histogram and sql
---------
Co-authored-by: Ankur Srivastava <best.ankur@gmail.com>
Created a fixture which will be available during scope=session. This
will ingest data present in tests/test-data/logs_data.json to
org_pytest_data and stream_pytest_data
API Tests positive and negative scenarios -
- Search without payload
- Search with valid sql query
- search with invalid sql query
- search with limit and sql query
- valid histogram query
- histogram query with limit
---------
Co-authored-by: Neha P <neha@openobserve.ai>
Co-authored-by: Neha P <144308844+neha00290@users.noreply.github.com>
Added testcases for the following scenarios
- should match total - histogram mode ignore case for normal and index
search test
- should match total - histogram mode match all for normal and index
search