Commit Graph
74 Commits
Author SHA1 Message Date
Huaijin b41bb71779 feat: upgrade datafusion to v49 (#7649) 2025-07-30 10:57:25 +08:00
Anand Kumar Dubey ad345086d4 fix: validate password length when creating & updating users (#6782) 2025-07-20 11:11:01 +08:00
Ashish KolheandShrinath Rao 91bc704dc0 fix: RBAC default role (#7560)
### **PR Type**
Bug fix


___

### **Description**
- Include role in user-org tuple creation

- Pass `org.role` to `get_user_org_tuple`

- Add default role in custom role mapping


___

### **Changes diagram**

```mermaid
flowchart LR
  PT["process_token"] -- "pass role" --> GUT["get_user_org_tuple"]
  MG["map_group_to_custom_role"] -- "pass default role" --> GUT
```


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>jwt.rs</strong><dd><code>Add role parameter to tuple
function</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/handler/http/auth/jwt.rs

<li>Added role parameter to <code>get_user_org_tuple</code><br> <li>
Passed <code>org.role</code> in <code>process_token</code><br> <li>
Included default role in custom role mapping


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7560/files#diff-232cab74f4cbf135af424744272e17732fbda8ac005d33c0acb4597e65479d02">+15/-3</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

---------

Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
2025-07-15 15:23:59 +05:30
Hengfei Yang 5b2148b043 fix: remove sql_mode support for FE (#7516) 2025-07-10 11:41:25 +08:00
c2c7ea6a95 test: match_all queries pytest (#7208)
### **User description**
match_all queries pytest


___

### **PR Type**
Tests


___

### **Description**
- Add tests for match_all streaming queries


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>test_streaming.py</strong><dd><code>Add match_all
streaming test cases</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/api-testing/tests/test_streaming.py

<li>Added "match_all query one" test case<br> <li> Added "match_all
query two" test case<br> <li> Added "match_all query three" test case


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7208/files#diff-f15e9b733130f72112380fda658264545435fbf956b08869b0ad5a9435d222f7">+21/-3</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

---------

Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
2025-06-19 11:57:32 +05:30
Loakesh IndiranandHengfei Yang 600c0d3b7e feat: aggregation cache (#6923)
Cache Intermediate record batches for aggregate sql queries

## TODO

- [ ] Add in memory cache file index
- [ ] Modify exiting delete stream results api to also delete
`aggregations` cache
- [ ] use bounded Chanel for `CACHE_QUEUE` and and an env for queue size

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2025-06-17 21:08:48 +05:30
Shyam Panjiyar 111298017c test: pagination pytest (#7126)
### **PR Type**
Tests, Enhancement


___

### **Description**
- Comment out SQL mode calls in streaming tests

- Disable Chromium browser tests in config

- Add WebKit (Safari) project configuration

- Adjust viewport settings for Safari tests


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>streaming.spec.js</strong><dd><code>Disable SQL mode in
streaming tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/streaming.spec.js

<li>Commented out <code>await logsPage.enableSQLMode()</code> calls<br>
<li> Removed SQL mode requirement from streaming tests


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7126/files#diff-7ee1f433f2c0f92476e64e6777e719a3cbfd2c60c7e1b4fb77891445e3cd7b91">+13/-13</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>playwright.config.js</strong><dd><code>Add Safari
(WebKit) project to Playwright config</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright.config.js

<li>Commented out Chromium project configuration<br> <li> Added WebKit
(Safari) project settings<br> <li> Set viewport for Desktop Safari
device


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7126/files#diff-91cb9615068914b2e4f5d66fcbed50d3e9771ea2d882f8e8048bbe54eab3c414">+13/-6</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-06-13 17:20:03 +05:30
Shyam Panjiyar 138e7e296d test: re_match, partition search and values API pytest (#7051)
re_match,  partition search and values API pytest
2025-06-06 21:45:42 +05:30
Shyam PanjiyarandHengfei Yang dc99038a32 test: Updated change organisation validation playwright (#6912)
Updated Page change organisation validation

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2025-05-30 16:59:23 +05:30
Shyam Panjiyar 3fbe1e17dc test: Resolved issues after Integrating organization pytest (#6942)
Resolved issues after Integrating organization pytest
2025-05-28 12:13:21 +05:30
Yashodhan JoshiandYashodhan Joshi 7540824633 fix: use _all_ in org related api call perm checks (#6920)
Fixes permission check for organization related api. In ofga when we set
a role with org perms, it sets to `org:_all_{org}` but in the check , we
check for permission on `org:{org}` which causes users with role having
permission on org, not be able to rename org. This fixes it by updating
it to correct check.

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-28 11:02:01 +05:30
Shyam PanjiyarandSubhradeep Chakraborty 289d6234e5 test: new org created pytest (#6926)
New organizations created

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
2025-05-27 17:54:43 +05:30
+2 0d9f47966b feat: Organization revamp (#5579)
Fixes #5131 
Addresses #5408 

### Revamp
- Created a new table to store organizations in the `organizations`
table. Earlier, we never stored organizations in any table, rather we
used to store the organizations in the meta table as part of the `user`
json.
- The users and organization membership relations are now moved to its
own separate tables - `users` and `org_users`.

### New changes

**API changes** -
- `/organizations` - `POST` api to create an org and save it in the meta
table. In non-enterprise version, currently only the root user can
create the org. For enterprise version with rbac enabled, anyone with
`CREATE` access for organizations can create the organization and
becomes an admin. Root user can always create an organization.
- `/{org_id}/rename` - `PUT` api to rename the existing org. Only root
user and the admins of the org can access this API.

The payload for following APIs are changed -
- `POST api/{org_id}/roles` - `{"name":"new_role"}` is changed to
`{"role":"new_role"}
- `POST api/{org_id}/users/{user}` -
`{"role":"viewer","custom_role":["role_name"]}` is the new payload where
`custom_role` is optional and is array of custom roles (only works in
enterprise with rbac enabled) which will be assigned to the user. The
value of `role` can be standard role or as well as any custom role (when
it is custom role, the standard role assigned to the user is decided
based on the enterprise env variable - `O2_DEX_DEFAULT_ROLE`).
- `POST api/{org_id}/users`- the payload -
```
{"email":"user@user.com","role":"viewer","custom_role":["create_org_permission"],"password":"12345678", "first_name": "", "last_name":""}
```

- `PUT api//{org_id}/users/{email_id}` the payload -
```
{"first_name":"Hello","last_name":"j","role":"viewer","isExternal":false,"change_password":false,"password":"","custom_role":["create_org_permission"]}
```


A new ENV variable is introduced - `ZO_CREATE_ORG_THROUGH_INGESTION`
(default `false`) which if true, an org will automatically created when
ingesting data to a new org. If false, user can not create org by
ingesting data to new org, they need to first call the `POST
/organizations` API.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

**New Features**
- Added a `cloud` feature for enhanced organizational management
capabilities.
- Introduced new methods for managing organizational users and
asynchronous message processing.
- Enhanced user invitation and membership features, including improved
role handling.
- Implemented configurable ingestion URL support across various
components.
- Added new functionality for user management and organization handling
in the super cluster architecture.

**Improvements**
- Refined user authentication and authorization processes, including
error handling.
- Updated database schema to support multi-organization architecture.
- Enhanced pagination settings and UI components for better user
experience.
- Improved handling of organization names and user roles in
notifications and alerts.
- Streamlined service account token management with visibility
enhancements.
- Enhanced the `AddUpdateOrganization` component with improved user
input handling and validation.
- Updated the `AppOrganizations` component to dynamically load the
appropriate organization management interface.
- Improved the `ServiceAccountsList` component with updated pagination
options and token handling logic.

**Bug Fixes**
- Resolved issues with user role assignments and organization management
inconsistencies.
- Corrected routing and navigation logic for login and logout processes.
- Addressed various error handling scenarios in user and organization
processes.
- Fixed issues with the visibility of service account options in the
`EditGroup` and `EditRole` components based on the cloud configuration.

**Breaking Changes**
- Significant restructuring of user and organization data models.
- Changes to authentication workflows and configuration handling.
- Removal of certain components related to user and organization
management.
- Updated the logic for determining the ingestion URL across various
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
Co-authored-by: harshiv-7 <harshiv@openobserve.ai>
Co-authored-by: Huaijin <haohuaijin@gmail.com>
Co-authored-by: Zhao.wei <weizhao029@gmail.com>
Co-authored-by: ShyamOOAI <shyam@openobserve.ai>
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yashodhan@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-25 21:53:55 -07:00
Shyam Panjiyar 68f9193bec test: validate max_query_range for 1 hour pytest (#6890)
Validate max_query_range for 1 hour pytest
1. HTTP Cache False
2. HTTP Cache True
3. Streaming Search Cache False
4. Streaming Search Cache True
2025-05-23 11:33:31 +05:30
Shyam Panjiyar c84792d3eb test: streaming search pytest (#6803)
Streaming Search PyTest
2025-05-20 16:22:24 +05:30
bff9364ac7 feat: add EventProgress server event (#6668)
- [x] add `percent` calc, based on the query duration

---------

Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
Co-authored-by: omkark06 <omkar@zinclabs.io>
Co-authored-by: Kirtan Thakkar <kirtan@kiara.tech>
2025-04-29 17:38:58 +05:30
Ashish Kolhe 1f47ac2614 fix: base64 encode cookies (#6596)
fixes : [6564](https://github.com/openobserve/openobserve/issues/6564)
2025-04-28 18:08:48 +05:30
Shyam Panjiyar 9eec05a6ee test: websocket version 2 connection pytest (#6476) 2025-04-14 15:51:04 +05:30
Shyam Panjiyar 04b83127e7 test: sql vrl satisfied and no satisfied alert pytest (#6529) 2025-04-14 10:59:45 +05:30
Ashish KolheandSubhra264 5f9f304379 fix: improve error handling (#6432)
Co-authored-by: Subhra264 <chakrabortysubhradeep556@gmail.com>
2025-03-31 18:13:31 +05:30
Shyam Panjiyar f21dfd871d test: root and admin search automation using pytest (#6433) 2025-03-31 16:16:13 +05:30
+2 8cd0683a0b feat: ws v2 (#6404)
# WebSocket v2 Architecture

## NOTE: Open Issues:
- [ ] `session_drain` from server is experimental and not ready for
prod. Instead, the client maintains ongoing `trace_id`'s and when cookie
expires it will retry search for all the ongoing searches.

## Overview
Implements websocket v2 with the main goal to establish `Client-Router`
connections `per tab` and `Router-Querier` `persistent` connections.

## New Env (Default):
```sh
ZO_WEBSOCKET_CHECK_COOKIE_EXPIRY=true
ZO_WEBSOCKET_HEALTH_CHECK_INTERVAL_SECS=60
ZO_WEBSOCKET_IS_SESSION_DRAIN_ENABLED=false # This is experimental, not meant for prod
```

## High-Level Flow

1. Client establishes WebSocket connection with the router.  
2. Router creates a session.  
3. Router maintains persistent connections to all queriers.  
4. Client requests are routed to the appropriate querier using
consistent hashing.
5. Responses are routed back using `trace_id` mappings.  
6. Health checks maintain connection validity.  
7. Failed connections trigger automatic cleanup and reconnection.  
8. **Internal Communication Validation Using:**  
   - **8a.** Internal gRPC tokens  
   - **8b.** IP validation  
   - **8c.** WebSocket upgrade headers  

## Connection Lifecycle
```mermaid
sequenceDiagram
    participant Client
    participant Router
    participant ConnectionPool
    participant QuerierConn
    participant Querier
    participant Cluster

    Client->>Router: WS Connection Request
    Router->>SessionManager: register_client(client_id)
    
    Note over Router,SessionManager: Creates channels:<br/>response_tx/rx<br/>disconnect_tx/rx

    par Handle Incoming Messages
        Router->>Router: spawn handle_incoming task
    and Handle Outgoing Messages
        Router->>Router: spawn handle_outgoing task
    end

    Client->>Router: WS Client Event
    Router->>SessionManager: get_querier_for_trace(trace_id)
    
    alt No Existing Mapping
        Router->>Cluster: get_node_from_consistent_hash(trace_id)
        Router->>ConnectionPool: get_or_create_connection(querier)
        
        alt No Existing Connection
            ConnectionPool->>QuerierConn: create_connection
            QuerierConn->>Querier: WS Connection Request
            
            par Connection Tasks
                QuerierConn->>QuerierConn: spawn listen_to_querier_response
                QuerierConn->>QuerierConn: spawn health_check
            end
            
            Querier-->>QuerierConn: Connection Established
        end
        
        Router->>SessionManager: set_querier_for_trace(trace_id, querier)
    end

    Router->>QuerierConn: register_request(trace_id)
    Router->>QuerierConn: send_message(event)
    Querier-->>QuerierConn: Response
    QuerierConn->>Router: Route Response via response_tx
    Router->>Client: Forward Response

    Note over Router,Client: On Disconnect/Error:<br/>1. Send disconnect signal<br/>2. Clean up sessions<br/>3. Drain if needed
```

## Connections
```mermaid
graph TB
    subgraph "Client Layer"
        UI1[UI Client 1]
        UI2[UI Client 2]
        UI3[UI Client 3]
    end

    subgraph "Router Layer"
        R1[Router 1]
        R2[Router 2]
        
        subgraph "Router 1 Connection Pool"
            CP1[Connection Pool]
            QC11[Querier1 Conn]
            QC12[Querier2 Conn]
            QC13[Querier3 Conn]
            CP1 --- QC11
            CP1 --- QC12
            CP1 --- QC13
        end
        
        subgraph "Router 2 Connection Pool"
            CP2[Connection Pool]
            QC21[Querier1 Conn]
            QC22[Querier2 Conn]
            QC23[Querier3 Conn]
            CP2 --- QC21
            CP2 --- QC22
            CP2 --- QC23
        end
        
        R1 --- CP1
        R2 --- CP2
    end

    subgraph "Querier Layer"
        Q1[Querier 1]
        Q2[Querier 2]
        Q3[Querier 3]
    end

    UI1 -.->|WS| R1
    UI2 -.->|WS| R1
    UI3 -.->|WS| R2

    QC11 ===|Persistent WS| Q1
    QC12 ===|Persistent WS| Q2
    QC13 ===|Persistent WS| Q3
    QC21 ===|Persistent WS| Q1
    QC22 ===|Persistent WS| Q2
    QC23 ===|Persistent WS| Q3

    classDef client fill:#f9f,stroke:#333,stroke-width:2px
    classDef router fill:#bbf,stroke:#333,stroke-width:2px
    classDef querier fill:#bfb,stroke:#333,stroke-width:2px
    classDef pool fill:#ffd,stroke:#333,stroke-width:2px
    
    class UI1,UI2,UI3 client
    class R1,R2 router
    class Q1,Q2,Q3 querier
    class CP1,CP2 pool
```

## Components
```mermaid
classDiagram
    class WsHandler {
        +session_manager: Arc<SessionManager>
        +connection_pool: Arc<QuerierConnectionPool>
        +handle_connection()
        +remove_querier_connection()
        +_shutdown()
    }

    class SessionManager {
        +sessions: RwAHashMap<ClientId, SessionInfo>
        +mapped_queriers: RwAHashMap<QuerierName, HashSet<TraceId>>
        +register_client()
        +update_session_activity()
        +remove_trace_id()
        +unregister_client()
        +set_querier_for_trace()
        +get_querier_for_trace()
    }

    class QuerierConnectionPool {
        +connections: RwAHashMap<QuerierName, Arc<QuerierConnection>>
        +get_or_create_connection()
        +remove_querier_connection()
        +maintain_connections()
        +get_active_connection()
    }

    class QuerierConnection {
        +querier_name: QuerierName
        +write: Arc<Mutex<Option<SplitSink>>>
        +response_router: Arc<ResponseRouter>
        +is_connected: Arc<AtomicBool>
        +connect()
        +disconnect()
        +send_message()
        +register_request()
        +unregister_request()
    }

    class ResponseRouter {
        +routes: RwAHashMap<TraceId, Sender<WsServerEvents>>
        +route_response()
        +flush()
        +spawn_cleanup_task()
    }

    WsHandler --> SessionManager
    WsHandler --> QuerierConnectionPool
    QuerierConnectionPool --> QuerierConnection
    QuerierConnection --> ResponseRouter
```


Related Issues: #6396

---------

Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
Co-authored-by: Abhay Padamani <141122205+ktx-abhay@users.noreply.github.com>
Co-authored-by: Ashish Kolhe <35160958+oasisk@users.noreply.github.com>
Co-authored-by: udev <uddhav@openobserve.ai>
Co-authored-by: omkark06 <omkar@zinclabs.io>
Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
Co-authored-by: Omkar Kesarkhane <127078473+omkarK06@users.noreply.github.com>
Co-authored-by: udev <uddhavdave1@gmail.com>
Co-authored-by: Subhra264 <chakrabortysubhradeep556@gmail.com>
Co-authored-by: ktx-vaidehi <134508096+ktx-vaidehi@users.noreply.github.com>
2025-03-26 11:43:40 -07:00
Shyam Panjiyar cac2ded2cf test: Create Objects and Refactoring POM PyTest (#6357) 2025-03-24 16:50:30 +05:30
Patrick Sullivan 3f4074b8cf fix: Misc V2 alerts routes fixes (#6137)
Makes the following fixes to these routes:
- `ListAlerts`
  - adds `enabled` to the response body
  - adds `name_substring` to the request body
- `MoveAlerts`
- changes the method type to `PATCH` since this is a non-idempotent
update
- changing to `PATCH` coincidentally happens to fix a routing issue
where requests to `MoveAlerts` were being routed to the `UpdateAlerts`
handler
- `EnableAlert`
- changes the method type to `PATCH` since this is a non-idempotent
update
- `TriggerAlert`
- changes the method type to `PATCH` since this is a non-idempotent
update
2025-02-28 17:19:22 -06:00
a3407fe12d fix: ws connection optimizations cherry-pick (#6047)
- fix: close frame to-from client #6033
- fix: ws connection optimizations #6038
- fix: ws connection optimizations v3 #6058 
- fix: ws conn #6080 
- fix: only close sink to backend in ws_proxy

New Env:
```sh
ZO_WEBSOCKET_ENABLED=true
ZO_WEBSOCKET_CLOSE_FRAME_DELAY=50 // microseconds
ZO_WEBSOCKET_SESSION_IDLE_TIMEOUT_SECS=300
ZO_WEBSOCKET_SESSION_MAX_LIFETIME_SECS=3600
ZO_WEBSOCKET_SESSION_GC_INTERVAL_SECS=60
ZO_WEBSOCKET_PING_INTERVAL_SECS=15
```

---------

Co-authored-by: omkark06 <omkar@zinclabs.io>
Co-authored-by: ShyamOOAI <shyam@openobserve.ai>
2025-02-25 18:28:16 +05:30
Shyam PanjiyarandLoakesh Indiran 477446cb1f test: Websocket PyTest Super Cluster (#5878)
Co-authored-by: Loakesh Indiran <66478092+Loaki07@users.noreply.github.com>
2025-02-14 17:22:44 +05:30
Shyam Panjiyar 221821dbb9 test: Summary PyTest in super cluster (#5938) 2025-02-13 12:54:27 +05:30
Neha P 527fcbc76e test: fix stream-selection flakiness (#5898) 2025-02-07 13:48:44 +05:30
Shyam Panjiyar cac3b9e40c test: Added dependencies for cipher keys (#5814)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
	- Updated project dependencies in test configuration
	- Added `tink` library (version 1.10.0+)
	- Added `protobuf` library
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-27 13:39:26 +05:30
Shyam Panjiyar 2714579307 test: skipping RUM Search Pytest sanity get history playwright (#5803)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
	- Removed several RUM and search-related test functions in API testing
	- Skipped a search history test case in UI testing

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-25 10:27:30 +05:30
Shyam PanjiyarandTaiming Liu d98164b127 test: rum search updated pytest (#5797)
rum search updated pytest

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Enhanced RUM (Real User Monitoring) test suite with improved logging
and data validation.
- Added print statements to output response payloads for better test
visibility.
- Introduced additional assertions for geographical data and log message
checks in search tests.
	- Commented out specific actions in UI tests to refine test execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2025-01-25 07:25:13 +05:30
Shyam Panjiyar aa96a8a1e5 test: New alerts endpoints PyTest (#5630)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Added comprehensive end-to-end (E2E) tests for the alert management
API.
- Implemented tests for retrieving alerts, creating new alerts,
enabling/disabling alerts, triggering alerts, and deleting alerts.
- Included validation checks and response status code assertions for all
API functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-20 17:31:34 +05:30
Neha P 59c61f268c test: enrichment-pipeline-test (#5731)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Updated test cases for pipeline creation and action handling with
corrected boolean value casing.
	- Added new test case to validate pipeline creation failure scenario.
- Enhanced UI testing for enrichment table functionality by adding
date-time button interaction and visibility checks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-17 16:27:15 +05:30
Neha P 2bf8bb3720 test: add test function pytest cases (#5667)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
	- Added comprehensive test cases for API function creation
- Included tests for invalid payloads, text-only inputs, and special
character scenarios
	- Verified successful function creation with valid payloads

- **Chores**
- Updated `.gitignore` to exclude temporary directories, configuration
files, and build artifacts

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-10 19:17:47 +05:30
Hengfei Yang a686ec6927 fix: metrics ingestion with otlp json (#5649) 2025-01-10 00:22:36 +08:00
Shyam Panjiyar 78306b7083 test: service accounts PyTest (#5625)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
	- Added comprehensive end-to-end tests for service account management.
- Implemented tests for retrieving, creating, updating, refreshing, and
deleting service accounts.
- Included validation for handling invalid email formats during service
account creation.
- Ensured proper validation of API responses and status codes for
service account operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-09 12:54:44 +05:30
Shyam Panjiyar 895c0642c0 test: Have added negative test cases for new folders (#5586)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Added comprehensive test cases for dashboard and alerts folder
functionalities.
	- Introduced tests for unauthorized access scenarios.
	- Added error handling tests for invalid inputs and folder IDs.
- Improved test coverage for various edge cases, including responses for
empty and invalid folder IDs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-08 21:51:58 +05:30
Shyam Panjiyar dd25a1da66 test: New Folders API test cases in PyTest (#5570)
New Folders API test cases 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Added comprehensive API testing for dashboard and alert
functionalities.
- Implemented test cases for retrieving, creating, updating, and
deleting dashboard and alert folders.
- Ensured proper response status code validation for various API
operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-04 00:27:49 +05:30
Shyam Panjiyar 9ebf7c677c test: PyTest organizations Updated (#5465)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved clarity in passcode-related tests by renaming variables and
updating assertion messages.
	- Enhanced specificity in testing passcode responses and updates.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-26 14:19:33 +05:30
Shyam Panjiyar 593b1ea787 test: added PyTest for reset passcode (#5461)
added PyTest for reset passcode 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
- Added a new end-to-end test for the passcode reset functionality,
ensuring successful operation and response validation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-26 12:51:57 +05:30
Huaijin 1bceeef0a8 feat: support cross stream type join (#5452)
close #5420 

- [x] set tantivy index as default index
- [x] support cross stream type join like below
```
select t1.ip, t2.name from logs.t1 as t1 join enrich.t2 as t1 on t1.ip = t2.ip
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced a new `TableReferenceExt` module to enhance SQL-related
functionalities.
	- Added a new `StreamTypeProvider` struct for managing table providers.
- **Improvements**
	- Updated configuration defaults for inverted index formats.
- Enhanced handling of stream names and types throughout various
functions for better type safety.
	- Improved logging with structured stream information.
- Refined the processing of the `MatchAll` condition in SQL-like
expressions.
- **Bug Fixes**
- Expanded string matching for `StreamType` to accommodate additional
input formats.
- **Documentation**
	- Retained help comments for context on configuration fields.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-25 21:46:05 +08:00
Neha P 8e6e968997 test: add fuzzy and values UI test (#5435)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new test suite for end-to-end testing of fuzzy matching
SQL queries.
- Added new test cases for verifying API data display and error message
handling in the UI.

- **Bug Fixes**
- Improved reliability of existing tests by enhancing visibility checks
before UI interactions.

- **Tests**
- Added helper functions for dynamic timestamp generation and SQL query
posting in the testing framework.
- Updated existing tests to streamline processes and improve interaction
logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-24 14:37:33 +05:30
Neha P eecafe12ac test: pipeline updated assertions (#5413)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new suite of Playwright tests for validating enrichment
table functionality.
- Added new functions for enhanced navigation and interaction within the
pipeline UI.
- Added tests to assert the data in every derived stream with condition,
function and only source + derived stream
- Added tests to assert if user clicks on any menu option and cancel on
dialog box, user stays on pipeline page
- Added tests to assert if user clicks on dashboard menu option and
accept on dialog box, user navigates to dashboard page

  
- **Bug Fixes**
- Improved error handling in tests to ensure accurate feedback during
interactions.

- **Chores**
- Updated the GitHub Actions workflow to include additional integration
tests.
- Removed outdated test files related to function management, Kinesis
ingestion, and reporting functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-19 17:14:37 +05:30
Loakesh Indiranandhengfei yang 8d234483d2 fix: check invalid stream_name during bulk ingestion (#5403)
#5378

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Enhanced error handling for invalid stream names during ingestion,
ensuring appropriate logging and response for empty or invalid entries.
- Updated assertions in tests to reflect the correct handling of invalid
bulk payloads by the API, ensuring errors are present for invalid
submissions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
2024-12-18 18:08:31 +05:30
Neha P ec5400e11e test: pytest-scheduled-pipeline (#5385) 2024-12-17 18:10:39 +05:30
Neha P 38ee5dfe0c test: pipeline-api-tests (#5380)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Introduced a new end-to-end test for pipeline creation, enabling, and
disabling.
- Utilized parameterization to test various scenarios with different
pipeline names, actions, and expected HTTP status codes.
- Removed the previous end-to-end tests related to user token
management, which included user token retrieval and email verification
processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-17 16:25:35 +05:30
Neha P 505bd69aa3 test: e2e-enrichment-bulkapi-pytest (#5371)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced end-to-end testing for bulk ingestion with comprehensive
coverage.
- Enhanced functionality for managing enrichment tables, including
adding, uploading, and deleting entries.

- **Bug Fixes**
- Improved error handling and user interaction checks in the enrichment
table upload process.

- **Tests**
- Added multiple new test cases for enrichment table functionality,
including upload and error handling scenarios.
	- Updated existing test cases for consistency and improved logic.

- **Chores**
- Standardized import statements and improved overall test structure for
clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-16 17:13:55 +05:30
Patrick Sullivan faa8929ae1 feat: migrate dashboards out of meta table and into their own table (#5146)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Enhanced dashboard management with new methods for retrieving
properties like ID, owner, title, and description.
- Added functionality for creating, updating, listing, and deleting
dashboards through a new service module.
- Introduced a new `dashboards` table in the database, with migrations
for creation and population.

- **Bug Fixes**
- Improved error handling for dashboard retrieval and management
operations, providing clearer responses for various conditions.

- **Documentation**
- Updated documentation to reflect new methods and error handling
improvements.

- **Refactor**
- Streamlined the dashboard handling logic in service and database
modules, reducing complexity and enhancing modularity.
- Enhanced error handling logic in dashboard management functions for
better clarity and control flow.
- Refined the dashboard retrieval process to improve clarity in control
flow and error handling.
- Updated the logic for dashboard operations to simplify version
handling and reduce redundancy.
- Improved the overall structure and organization of the dashboard
management code.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-26 19:22:40 -08:00
Patrick Sullivan 46cce3de59 feat: JSON-indpendent hashing of dashboard models (#5133)
The previous mechanism for generating hashes for dashboard models
depended on hashing the JSON representation of the dashboard that was
stored in the `meta` table.

As part of the migration of dashboards out of the `meta` table and into
a dedicated `dashboards` table, this ☝️ presented some problems:

Specifically when we want to translate from the Dashboard ORM model to a
`core::meta::dashboards::Dashboard` model, we need to generate the hash
at the time of translation since `hash` is a field on
`core::meta::dashboards::Dashboard`. We can't simply generate a hash
from the JSON stored in the `dashboards.data` column because this JSON
no longer contains fields for `title`, `owner`, `description`, and
`role`. Those fields are now stored in DB columns, and changes to those
columns in the DB columns would *not* result in changes to the hash on
the JSON blob.

Therefore, rather than hashing the JSON blob, this PR implements hash
functions on the Rust types for the dashboards. Therefore changes to
fields in those Rust structs will result in changes to the hash values,
but changes to the way in which the data is stored in the DB will not
affect the hash values.

⚠️ Note that this PR is changing the hash function on the dashboard
models, so hashes generated for the same model before and after this
deployment will not be the same. My understanding is that this shouldn't
be an issue since hashes are just used as a way of checking on the UI if
the dashboard model has been updated to avoid overwriting the changes of
another user. I believe that this change to the dashboard function might
just have the effect (around the time of deployment) where it would
appear to the UI that the dashboard has been updated when, in fact, it
has not.

https://github.com/openobserve/o2-enterprise/actions/runs/11979723563

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new type alias `OrdF64` for enhanced precision in
floating-point operations.
- Added the `Hash` trait to multiple dashboard-related structs and
enums, enabling their use in hash-based collections.

- **Bug Fixes**
- Improved error handling and assertion clarity in API testing for
folder and dashboard operations.

- **Chores**
- Standardized hashing mechanism for dashboard objects in database
operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-25 10:23:38 -06:00
Neha P 8fb58346a1 test: pytest-join-queries testcases (#5128)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new JSON file for SQL join query test cases, enhancing
the variety and coverage of tests.
- Added multiple new test cases for various SQL join operations,
improving testing capabilities.

- **Bug Fixes**
- Improved error handling in data ingestion steps to ensure successful
test execution.

- **Refactor**
- Transitioned from hardcoded test data to a parameterized approach for
better maintainability and flexibility in testing.
	- Updated method signature to streamline test parameters.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-22 18:05:24 +05:30