- [x] Enrichment tables are not listed correctly with RBAC.
- [x] Create ofga ownership for metadata streams
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Enhanced handling of stream types for improved flexibility and
functionality.
- Introduced enterprise-level ownership management features for metadata
handling in the context of the enterprise feature.
- **Bug Fixes**
- Streamlined logic for retrieving model keys associated with stream
types, ensuring more accurate results.
<!-- 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 delta processing logic, allowing for broader consideration of
deltas regardless of their start time.
- **Bug Fixes**
- Streamlined query handling by removing unnecessary complexity and
error checks related to query duration.
- Adjusted return behavior of delta calculations, ensuring consistent
output in line with updated logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes:
- [x] show vrl error from cache
- [x] histogram interval changes
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved error handling in response merging, ensuring more accurate
propagation of function errors.
- **New Features**
- Updated time intervals for histogram generation, enhancing accuracy in
data representation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- #4338
- #4380
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Improved handling of selected values in the Variables Value Selector,
ensuring that all available options are assigned when no values are
selected.
- Introduced a toggle switch to control the visibility of variables in
the dashboard, enhancing user interface flexibility.
- Added new properties for managing default selection behavior in
multi-select variables.
- Updated localization support with a new entry for hiding elements on
the dashboard.
- **Bug Fixes**
- Enhanced input validation rules for the Add Setting Variable component
for consistency.
- Improved text consistency in the Config Panel user interface.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
Added `owner` and `enabled` URI query parameter for the
`{org_id}/alerts` and `{org}/{stream_name}/alerts` `GET` APIs. E.g. -
`{org}/alerts?owner=user@user.com&enabled=true`.
Fixes#4273
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a new filtering capability for alerts, allowing users to
filter by owner and enabled status.
- Added a new structure, `AlertListFilter`, to manage alert filtering
criteria.
- **Improvements**
- Enhanced alert retrieval functions to support user-defined query
parameters for more granular control over alert listings, improving the
overall usability of the alert system.
- Expanded filtering logic in the AlertList component for a more
comprehensive search capability within the alert list.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Fixes#4455
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced authorization checks for `query`, `query_range`, and `series`
functions to dynamically reflect stream types.
- Improved permission validation logic in the `search` and
`search_multi` functions, allowing for more accurate access control
based on user roles and stream types.
- Updated logic in the `get_latest_traces` function to refine the
construction of the `o2_type` field for better permission checks.
- **Bug Fixes**
- Corrected the mapping of stream types to model keys, enhancing
security and accuracy in permission checks.
- **Chores**
- Added necessary imports for `OFGA_MODELS` to support new permission
logic.
<!-- 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 caching mechanism with improved control over data processing.
- Added functionality to retrieve settings for query range validation,
improving user feedback on query limitations.
- **Bug Fixes**
- Improved error handling for query duration modifications, ensuring
clearer communication to users.
- **Documentation**
- Updated documentation to reflect changes in function signatures and
new parameters for better clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Feature:
- #4339
## Fixes:
- #4233
- #4239
- #4306
- #4307
- #4311
- `<blank>` was not visible properly in the dropdown when the value is
null converted it to `<blank>`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced support for version 5 of the Dashboard, enhancing the
dashboard's extensibility.
- Added a new component for managing filter options, improving user
interaction with dashboard queries.
- Implemented a new user interface for adding conditions to dashboard
panels.
- **Bug Fixes**
- Improved error handling in SQL query generation to prevent crashes.
- **Documentation**
- Updated localization files to include new entries for adding groups
and conditions.
- **Refactor**
- Streamlined filter management by creating dedicated components,
enhancing code maintainability.
- **Tests**
- Enhanced UI tests for improved interaction with dropdowns and filters.
- **Chores**
- Removed obsolete event listeners and variables to simplify component
logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
fixed#4382
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced conditional compilation for the `ofga` module, enabling
more flexible builds based on the "enterprise" feature.
- Enhanced the `init` function to validate store IDs when the super
cluster feature is active.
- Added a new function to handle database updates, improving modularity.
- **Bug Fixes**
- Improved error handling in the initialization process to enhance
system observability.
- **Style**
- Restructured import statements for better organization and clarity in
the `ofga` module.
- Simplified conditional logic formatting in the `Sql` implementation
for improved readability.
<!-- 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**
- Introduced a `histogram_interval` field to enhance query response
capabilities, allowing for more detailed data representation.
- Enhanced caching logic to set the `histogram_interval` based on the
`discard_interval`, improving the handling of cached query responses.
- **Improvements**
- Added conditional logic in response handling to include
`histogram_interval` when specific criteria are met, improving response
accuracy and robustness.
- Refined checks for empty responses, enhancing the robustness of the
merging process for query responses.
<!-- 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 response handling by including the histogram interval in
search results.
- **Bug Fixes**
- Adjusted hit filtering logic to improve accuracy by changing the
timestamp comparison criteria.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Fixes#4394
- When cloning alert, don't copy `last_satisfied_at`,
`last_triggered_at`
When the alert query is invalid, the scheduler stops processing the
alert and returns, but the error message is not reported in the triggers
usage stream. This PR fixes that.
When the alert query is invalid, it will be retried again and again
(default maximum number of retries is `3`). After that, the associated
`scheduled_jobs` record will be automatically removed from the table and
hence the alert will not be triggered anymore.
In order to schedule the alert again, the user needs to update the query
and again save it, it will start scheduling again.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Enhanced alert handling logic for improved robustness and clarity.
- Introduced structured handling of alert data with better error
management.
- Added initialization of `last_triggered_at` and `last_satisfied_at`
fields to ensure clear state management for alerts.
- **Bug Fixes**
- Improved error handling for alert evaluation, ensuring accurate status
updates for alert triggers.
- Enhanced state preservation for alerts by updating the
`last_satisfied_at` timestamp during saves.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The `last_satisfied_at` field in the alert tracks when the alert
condition last met. This is in UTC microseconds.
This PR fixes the issue in #4379
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Introduced a new timestamp field to track when alerts were last
satisfied.
- Enhanced alert handling logic to manage and update satisfaction
timestamps effectively.
- Added a new column in the Alert List to display the last satisfied
timestamp for alerts.
- Improved localization support by adding a label for the last satisfied
timestamp.
- **Bug Fixes**
- Improved accuracy in alert state management by ensuring timestamps are
recorded correctly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Sai Nikhil <nikhil@openobserve.ai>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced query hash calculation for improved uniqueness and
flexibility in search functionality.
- **Bug Fixes**
- Simplified control flow in the hash generation process, reducing
potential errors in query handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes#4388
- If the VRL function in alert contains only '.', no need to store the
VRL function in the alert
- Remove alert evaluation in backend while saving alert
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved logic for saving alerts by preventing the assignment of
non-meaningful values (specifically a single period) to alert
conditions, enhancing data integrity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes#4360
In case some `scheduled_job` records (required for alerts to get
scheduled properly) are missing for some alerts, they can be recreated
by simply disabling and enabling it.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Improvements**
- Enhanced error logging for trigger updates and creations, providing
clearer context with the inclusion of the `schedule_key`.
- Improved robustness of trigger management logic, facilitating easier
diagnosis of issues related to alert triggers.
- Increased flexibility in alert handling by dynamically setting the
`is_realtime` property based on the alert's characteristics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
issue #4326
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced new structures for updating stream settings, allowing for
more granular management of stream configurations.
- Added an asynchronous function for updating stream settings via HTTP
PUT requests.
- Implemented a new service route for handling updates to stream
settings.
- Enhanced the `AddStream` component to retrieve updated settings.
- **Improvements**
- Improved schema management by tracking previous settings during
updates.
- Enhanced utility functions for comparing and managing stream settings.
- **Documentation**
- Updated documentation to reflect changes in API functionality for
creating and updating stream settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced cache checking logic to improve performance and handling of
aggregate queries.
- **Bug Fixes**
- Improved error logging for cached results to streamline
troubleshooting.
- **Refactor**
- Refined control flow and code readability in cache-related functions
without changing core functionality.
<!-- 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 integrated performance metrics,
allowing for better monitoring and optimization of search operations.
- **Bug Fixes**
- Improved logging behavior in the caching mechanism to avoid
unnecessary log entries, providing clearer and more relevant log
outputs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes#4291
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a new method for handling 409 Conflict responses in the
HTTP responses, improving error messaging clarity.
- **Bug Fixes**
- Updated error handling to return conflict responses instead of
forbidden responses when certain delete operations fail due to resource
conflicts.
- Enhanced clarity in user membership responses by changing the error
message when a user is already part of an organization.
These changes improve user experience by providing clearer and more
accurate feedback on error conditions related to resource management.
<!-- 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**
- Introduced a new configurable caching strategy, allowing users to
choose between "Overlap," "Duration," or "Both" for result caching.
- Added a new public field for `result_cache_selection_strategy` in the
application configuration, providing improved flexibility in managing
caching behavior.
- **Improvements**
- Enhanced the function for processing cache results to accommodate the
new caching strategies, allowing for more nuanced result management
based on user selection.
- Updated the `check_cache` functionality to conditionally sort cached
results and optimize performance based on the state of the cache.
- Improved tracking of the size of hits in cache responses.
- Added a helper function to streamline the calculation of the discard
timestamp for cached results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- #4302
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Introduced new configuration options for dashboard panels, including
settings for "Top Results" and an "Others" series to enhance data
visualization.
- Added an input field in the dashboard configuration panel for users to
specify the number of top values displayed.
- **Improvements**
- Enhanced data processing capabilities for SQL data, allowing better
aggregation and sorting of results.
- Streamlined the dashboard configuration flow for an improved user
experience.
- Improved error handling and logging in data processing to enhance
debugging and visibility.
<!-- 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 validation for alert creation to prevent the use of "SELECT
*" in SQL queries, improving data integrity and security during the
alert setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes : https://github.com/openobserve/openobserve/issues/4274
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced search response quality by implementing a deduplication step,
ensuring unique entries based on timestamps in the search results.
- Improved delta calculations in the caching mechanism with new
parameters for granular control over time intervals, enhancing the
accuracy of cached data responses.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes#4241
- Adds a new `data` column to `scheduled_jobs` table for the purpose of
storing different data as required by different modules.
- Uses the last end time of stream as the start time of derived stream
calculation.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added a new `data` field to the `Trigger` structure, allowing for
additional information storage in scheduled jobs.
- Introduced a new `DerivedTriggerData` struct for improved data
handling within the scheduler module.
- Enhanced job evaluation and query conditions with new optional
`start_time` parameters for greater flexibility.
- **Bug Fixes**
- Improved error handling for database schema changes to maintain
backward compatibility with older versions.
- **Refactor**
- Simplified logic within various functions to improve code clarity and
performance.
<!-- 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 the `ResultCacheMeta` struct to support equality comparisons,
improving filtering and duplicate checks.
- Updated response merging to account for histogram intervals in cache
responses.
- Improved filtering logic to optimize processing of metadata, including
early returns for empty collections.
- **Bug Fixes**
- Refined logic to ensure correct filtering based on response times for
metadata processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Addresses #4273
- Adds `last_triggered_at`, `owner`, `updated_at` and `last_edited_by`
fields (similar to Reports) to Alerts.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced alert and report management with additional metadata fields
for tracking last triggered times, owners, and edit history.
- Introduced user identification in report creation and updates for
better ownership tracking.
- **Bug Fixes**
- Improved logic for saving alerts and reports to accurately reflect
their statuses and metadata during creation and updates.
- **Documentation**
- Restructured import organization for improved clarity and
maintainability in the codebase.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->