mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 08:09:22 +00:00
### **User description**
When using custom type variables (custom, constant, textbox) as parent
variables for query_values variables (e.g., using custom variables for
query_values), the dependent children weren't loading on initial page
load.
Root cause:
1. Custom type variables weren't marked as pending during initialization
2. Manager didn't recognize custom types as non-API variables that load
synchronously
3. finalizeVariableLoading wasn't notifying manager on completion
Fixes:
1. Mark custom/constant/textbox variables as pending so they load and
notify the manager
2. Expand non-API type detection to include custom type variables, not
just query_values with custom/all defaults
3. Add manager notification in finalizeVariableLoading, but only on
first load to avoid triggering children on dropdown reopens
4. Pass isInitialLoad to finalizePartialVariableLoading for proper child
loading
___
### **PR Type**
Bug fix
___
### **Description**
- Mark custom-type variables as pending
- Treat non-API parents as preloaded
- Notify manager only on first load
- Pass `isInitialLoad` to partial finalize
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["Variables initialization"] --> B["Mark non-API variables pending"]
B --> C["VariablesValueSelector loads values"]
C --> D["Finalize partial loading (initial-load aware)"]
D --> E["Notify manager on first load"]
E --> F["Trigger dependent children loading"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<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>useVariablesManager.ts</strong><dd><code>Load non-API
variable types during initialization</code>
</dd></summary>
<hr>
web/src/composables/dashboard/useVariablesManager.ts
<ul><li>Mark
<code>custom</code>/<code>constant</code>/<code>textbox</code> as
pending<br> <li> Expand “non-API parent” detection logic<br> <li>
Include <code>dynamic_filters</code> as non-API parent<br> <li> Enable
child pending when all parents non-API</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10481/files#diff-95f6bdeb96f8454bdff53bb60cafe6851b0cda450591813dd4dfb2038c4f3d50">+27/-13</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>VariablesValueSelector.vue</strong><dd><code>Gate
manager notifications to first load</code>
</dd></summary>
<hr>
web/src/components/dashboards/VariablesValueSelector.vue
<ul><li>Pass <code>isInitialLoad</code> into
<code>finalizePartialVariableLoading</code><br> <li> Compute
<code>isFirstLoad</code> from partial-loaded state<br> <li> Notify
manager only on initial successful load<br> <li> Avoid triggering
children on dropdown reopen</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10481/files#diff-5c6e3bcb87cb64f25bf8157a541604b7a4904c1282acf662cab5d76a5be6bd56">+17/-2</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
zinc-observe-ui-automation
Playwright UI Testing
Installation
npm install
Running Tests
Using Playwright Runner UI (Recommended)
cd playwright-runner
npm start
Then open http://localhost:3000 to access the test runner interface.
Using Command Line
# Run all tests
npx playwright test
# Run specific test by tag
npx playwright test -g @alertsImportExport
# Run in headed mode
npx playwright test --headed
# Run specific test file
npx playwright test Alerts/alerts-import.spec.js
Environment Configuration
Tests can be configured using:
- Playwright Runner UI - Set environment variables through the web interface
- Environment Variables - Set variables in terminal or .env file