Commit Graph
206 Commits
Author SHA1 Message Date
31703cc9d2 feat: o2 AI Agent (#6899)
this PR introduces o2 ai agent with this user able to ask o2 ai about
sql query , vrl query and logs

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2025-05-27 15:09:19 +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
udev 4ac6cd3a73 fix: truncate if more results from df (#6851) (#6869)
In some cases when limit was added to the sql query we would report more
results than that size was asked. This PR adds checks to never return
more results than the `size` parameter
2025-05-21 20:25:06 +05:30
Shyam Panjiyar 53459dcecc test: enabled streaming search playwright (#6795)
log search after streaming search enabled playwright
2025-05-20 12:04:30 +05:30
Neha P 3ff97016cf test: e2e-stream-name (#6764)
Added a test to add stream name and assert if stream with uppercase
exists
add a stream with lowercase and assert if stream name with lowercase
exists
2025-05-08 20:16:03 +05:30
ktx-akshay dbd6c1017b test(dashboard): add geomap and map test cases (#6722) 2025-05-06 19:14:13 +05:30
Shyam PanjiyarandHengfei Yang e8f348819e test: Import Template Destination Alerts Playwright (#6205)
1. Import webhook and email Template

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2025-04-23 11:55:46 +05:30
Neha P c64d04d099 test: alert-folder-testcases (#6592)
These tests include 
- Added a new alert
- Add a new folder
- Added a new alert in this folder
- Moved 1 alert in 1 folder
- Bulk move alerts from default folder to new created folder
- Deleted the alerts that were moved to new folder
- Deleted the folder
- Deleted the template and destination
2025-04-21 17:56:10 +05:30
Hengfei Yang 0f5a31d0df fix: cache file for alert querier (#6573)
We already checked `ConsistentHash` on the source node, so we don't need
check again, just cache the file send to the node.
2025-04-18 19:51:04 +08:00
ktx-akshay 29699ed4cb test: multi y-axis stacked charts (#6549) 2025-04-17 13:44:32 +05:30
dependabot[bot] 418179c06a chore(deps): bump actions/create-github-app-token from 1 to 2 (#6484) 2025-04-13 16:35:55 +08:00
18d42d93e4 test(dashboard): add test cases for dashboard folder (#6500)
Co-authored-by: ktx-kirtan <124270523+ktx-kirtan@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-04-10 15:58:24 +05:30
ktx-akshay f9a4b65641 test(dashboards): add import test cases (#6399) 2025-03-27 18:05:56 +05:30
Shyam Panjiyar cac2ded2cf test: Create Objects and Refactoring POM PyTest (#6357) 2025-03-24 16:50:30 +05:30
73b49ea686 test: dashboard filter testcases (#6284)
Co-authored-by: ktx-kirtan <124270523+ktx-kirtan@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Kirtan Thakkar <kirtan@kiara.tech>
2025-03-17 15:13:49 +05:30
Yashodhan JoshiandYashodhan Joshi 55cd4e709a fix: limit parallel download thread number (#6082)
This uses background jobs in order to download files asynchronously, and
a mpsc queue in order to send file names to the jobs threads. This
limits the number of threads we spawn to a fixed number configurable via
config var.

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-03-04 16:08:15 +05:30
Hengfei Yang 595490ea33 ci: update rust to nightly-2025-03-02 (#6145) 2025-03-02 17:27:10 +08:00
Hengfei YangandTaiming Liu e5b6e507ab fix: ingester replay panic (#6117)
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2025-02-26 10:01:57 -08:00
Shyam Panjiyar b897f5439e test: websocket- Undefined Partitions Error When Histogram is disabled and run query and enabled again (#6085) 2025-02-26 14:57:41 +05:30
Chaitanya Sistla f93b05cdb5 fix: change ubicloud runner specs (#6101)
- updated the runner specs from ubicloud-standard-16 to
ubicloud-standard-8 to avoid throttling.
2025-02-25 13:34:39 -06:00
dependabot[bot] a2e128afe5 chore(deps): bump EmbarkStudios/cargo-deny-action from 2.0.4 to 2.0.6 (#6086) 2025-02-25 11:54:59 +08:00
Neha Pandsai nikhil kethe e3f685898b test: e2e-custom-charts (#6007)
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
2025-02-24 19:21:07 +05:30
ktx-akshay ad2d8882f2 test: dashboard login test cases (#5920) 2025-02-22 10:23:19 +05:30
Yashodhan Joshi 85b7d5fcdb ci: fix audit and license CIs (#6025) 2025-02-19 23:47:43 +08:00
Prabhat SharmaandHengfei Yang 3c45660316 chore: change runners to ubicloud (#5983)
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2025-02-19 23:46:28 +08:00
Shyam Panjiyar acb434b455 test: Updated URL variable for UI Super Cluster (#6022) 2025-02-19 13:37:45 +05:30
udev 56b8b9cc2d feat: Dispatch job with same branch name (#5823)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated GitHub Actions workflow to dynamically use branch names for
repository dispatch events
- Improved workflow flexibility by removing hardcoded repository branch
references

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-19 11:05:37 +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
Neha P f6fb0e0605 test: e2e-logs-loadtest (#5971)
**Tests covered** 
- Ingest 79k fields with 100 user defined schema
- Reset stream selection while reloading home page and navigating to
logs
- Selecting stream and checking schema and values
- Go to streams page and enable store original data 
- Go to stresstest stream via stream explorer 
- Check if results are visible
2025-02-14 13:40:26 +05:30
Shyam Panjiyar 221821dbb9 test: Summary PyTest in super cluster (#5938) 2025-02-13 12:54:27 +05:30
Hengfei Yang 949296d601 ci: replace base image (#5934) 2025-02-12 10:47:05 +08:00
Shyam Panjiyar 9ca79d95ef test: Reports playwright two parts with added test cases in Super Cluster (#5906)
Reports playwright two parts with added test cases in Super Cluster
2025-02-10 10:18:56 +05:30
Neha P 527fcbc76e test: fix stream-selection flakiness (#5898) 2025-02-07 13:48:44 +05:30
Bhargav 0b682773c5 fix: upgraded playwright version (#5861)
Upgraded NPM Packages in OpenObserve repo
Upgraded playwright package from 1.42.x to 1.50.x
Upgraded Node version from 18 to 22
2025-02-05 13:02:05 +05:30
Neha P d2b2165f9c test: e2e-remote-pipeline (#5842)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
	- Added new Playwright test suite for pipeline management.
	- Implemented comprehensive UI interaction tests.
	- Included tests for pipeline creation, deletion, and log management.
	- Enhanced test coverage with parallel test execution.
- Expanded integration tests with additional scenarios for pipeline
interactions.
	- Introduced a new test file for improved CI integration.

- **New Features**
- Added functionality for managing remote destinations within the
pipeline.
	- Introduced new methods for creating and deleting remote destinations.

- **Bug Fixes**
- Improved the logic for selecting the current date in the logs page to
ensure accurate date selection.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-30 13:35:00 +05:30
Omkar Kesarkhane dc8e673357 fix: added support for minimum auto refresh interval (#5696)
#5463 

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

## Release Notes

- **New Features**
- Enhanced auto-refresh interval configuration across multiple
components.
- Added minimum refresh interval support with configurable restrictions.
- Introduced new error handling and validation mechanisms for report
creation.
  - Added new utility functions for validating frequency intervals.

- **Improvements**
  - Introduced dynamic minimum refresh interval settings.
  - Added user feedback mechanisms for refresh interval constraints.
  - Improved error handling for alert creation and updates.
- Enhanced clarity and maintainability of code through formatting
adjustments.
- Updated frequency input logic to dynamically calculate minimum values.
- Added validation for refresh intervals during data refresh and URL
query restoration.

- **Configuration**
  - Added new props for minimum refresh interval and related messages.
  - Implemented dynamic minimum value calculations for frequency inputs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-27 23:32:51 +05:30
Hengfei Yang 0d2e183739 perf: keep improve metrics performance (#5729) 2025-01-22 08:16:31 +08:00
Hengfei Yang c2d4866565 feat: impl metrics cache (#5688)
impl #5656 

## Todo

- [x] Router consistent hashing for PromQL
- [x] Remove the key from index if the key get nothing from cache
- [x] Some cache item is empty, it should not
- [x] Add cache control ENV: `ZO_METRICS_CACHE_ENABLED=true`
- [ ] Optimize cache gc logic
- [ ] New encoding of RangeValue for cache
- [x] New cache key generate
- [x] Load cache from disk
- [ ] Histogram query OOM without cache for 2 days
- [x] Fix response series order
- [x] Need to check stream is exists
- [x] Add trace_id to the response
2025-01-15 08:59:53 -08:00
Taiming Liu 21b7abbe42 fix: pipeline validation at API level (#5437)
Fix for #5381 
This PR also cleans up `Error` propagation between service and http
layers.
2024-12-23 21:26:46 -08:00
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
Shyam Panjiyar ca7b05aba6 test: service account API access automation (#5258)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Updated the locator for the management menu item to enhance navigation
reliability.
- Streamlined the control flow by removing unnecessary wait times in the
management navigation process.

- **New Features**
- Added methods for managing service accounts, including adding,
validating, and deleting service accounts.
- Introduced a new test suite for validating service account
functionality, covering error handling and successful operations during
creation.
- Added a new method for automatic login based on visibility of the
login option.

- **Improvements**
- Updated the login method to ensure it waits for the correct login page
URL before proceeding.
- Simplified the login process in UI tests by removing unnecessary
parameters and wait times.
- Enhanced test scripts with improved structure and clarity, including
comments for better understanding.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-17 09:50:29 +05:30
Hengfei Yang b9435e5992 fix: max query range should be hour (#5333) 2024-12-11 19:15:26 +08:00
Hengfei Yang e65774403a ci: build node on windows (#5332) 2024-12-11 17:30:03 +08:00
Hengfei Yang 276595954d ci: build node on windows (#5331) 2024-12-11 17:10:11 +08:00
dependabot[bot] c9881c3c4e chore(deps): bump EmbarkStudios/cargo-deny-action from 2.0.2 to 2.0.4 (#5304) 2024-12-10 13:16:30 +08:00
ShyamOOAI 6f52dc444d test: Change Org (#5201)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Introduced comprehensive UI testing for the Home, Ingestion, Login,
Logs, Metrics, Traces, Pipelines, Rum, Dashboard, Alerts, Reports, Data,
IAM, and About pages.
- Added functionality to handle organization changes and validations
across multiple pages, including default organization selections.
- New test suite for validating organization change scenarios across
various pages.
	- Enhanced login functionality for internal users.
- Introduced new classes and methods for the Metrics, Streams, Rum, and
Alerts pages to support UI testing.
- Added new classes for the Data and IAM pages, expanding testing
capabilities.
	- Enhanced Management page with navigation and validation capabilities.
- New methods for validating page URLs and content across various pages.

- **Bug Fixes**
- Improved validation methods to ensure proper navigation and content
checks on various pages.

- **Documentation**
- Updated testing framework to include new test cases and improved
structure for organization change tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-04 11:01:16 +05:30
Taiming Liu d0de874cf4 fix: pipeline condition node incorrect evaluation (#5219)
fix #5218 

Backend:
- [x] allow condition node to evaluate `null` and `""`, empty, for both
`=` and `!=` conditions
- [x] stop ingestion when resolved dynamic stream name is empty

**How to Use(In ConditionNode):**
To evaluate field value is not empty:
`app_name != ""` 
To evaluate field value is not null:
`app_name != null`
2024-12-02 17:12:03 -08:00
ShyamOOAI 28319bdac3 test: Update coverage report (#5107)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced `LogsPage` with improved date and time selection, timezone
management, and clipboard operations.
- Introduced `ManagementPage` for UI testing, allowing logo updates and
management functionalities.
- Added new tests for time zone changes and streamlined test scenarios
on the logs page.
- Introduced a suite of tests for joining logs, validating various join
scenarios.

- **Bug Fixes**
- Updated confirm button interaction in `ReportsPage` to ensure
visibility before clicking.

- **Documentation**
- Improved clarity and purpose of test scenarios through restructuring
and simplification.

- **Chores**
- Added `logoManagement.spec.js` and `join.spec.js` to the Playwright UI
integration tests for expanded coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-29 05:54:29 +05:30
dependabot[bot] db1867c317 chore(deps): bump thehanimo/pr-title-checker from 1.4.2 to 1.4.3 (#5147) 2024-11-26 11:21:52 +08:00
dependabot[bot] bbe05ca5ab chore(deps): bump EmbarkStudios/cargo-deny-action from 2.0.1 to 2.0.2 (#5148) 2024-11-26 11:21:30 +08:00