mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 08:09:24 +00:00
fix: batch 3 package upgrade (#9755)
### **PR Type**
Enhancement
___
### **Description**
- Adjust Vitest config imports and coverage settings
- Refine coverage: add V8 provider and include patterns
- Bump Vitest, Vitest UI, and canvas mock versions
- Upgrade dotenv and remove unused type definitions
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["web/vitest.config.ts"] --> B["Import types corrected"]
A --> C["Coverage provider & include updated"]
D["web/package.json"] --> E["Bump Vitest & mocks versions"]
D --> F["Upgrade dotenv & remove types"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>vitest.config.ts</strong><dd><code>Adjust Vitest config
imports and coverage</code>
</dd></summary>
<hr>
web/vitest.config.ts
<ul><li>Replace type import from <code>vitest/config</code> to
<code>vite</code><br> <li> Remove <code>VitestUserConfig</code> cast for
mergeConfig<br> <li> Add coverage provider <code>v8</code><br> <li>
Update coverage include pattern to
<code>src/**/*.{js,ts,vue}</code></ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9755/files#diff-c3fc010b682e68f2ed0b7b1485b8aa513443a66d500903b8dff1d65908d02aae">+4/-3</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>package.json</strong><dd><code>Upgrade devDependencies
versions</code>
</dd></summary>
<hr>
web/package.json
<ul><li>Bump <code>@vitest/coverage-v8</code> and
<code>@vitest/ui</code> to 4.x<br> <li> Upgrade <code>vitest</code> and
<code>vitest-canvas-mock</code> versions<br> <li> Update
<code>dotenv</code> to <code>^17.2.3</code><br> <li> Remove unused
<code>@types/dompurify</code></ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9755/files#diff-b861012a5dd72b8a9f3281b7cf09f5a779c98569d040b1bbc1db50f1b15e7cce">+5/-6</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
This commit is contained in:
@@ -568,21 +568,28 @@ def test_e2e_time_series_window_functions(create_session, base_url):
|
||||
},
|
||||
}
|
||||
|
||||
try:
|
||||
resp_get_allsearch = session.post(
|
||||
f"{url}api/{org_id}/_search?type=logs",
|
||||
json=json_data,
|
||||
timeout=60 # 60 seconds timeout for complex query
|
||||
)
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
logging.warning(f"Connection error during complex query: {e}. Retrying once...")
|
||||
# Retry once after a brief pause
|
||||
time.sleep(2)
|
||||
resp_get_allsearch = session.post(
|
||||
f"{url}api/{org_id}/_search?type=logs",
|
||||
json=json_data,
|
||||
timeout=60
|
||||
)
|
||||
# Retry logic with exponential backoff for connection errors
|
||||
max_retries = 3
|
||||
retry_delay = 2
|
||||
last_error = None
|
||||
|
||||
for attempt in range(max_retries):
|
||||
try:
|
||||
resp_get_allsearch = session.post(
|
||||
f"{url}api/{org_id}/_search?type=logs",
|
||||
json=json_data,
|
||||
timeout=60 # 60 seconds timeout for complex query
|
||||
)
|
||||
break # Success, exit retry loop
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
||||
last_error = e
|
||||
if attempt < max_retries - 1:
|
||||
wait_time = retry_delay * (2 ** attempt) # Exponential backoff
|
||||
logging.warning(f"Attempt {attempt + 1}/{max_retries} failed with {type(e).__name__}: {e}. Retrying in {wait_time}s...")
|
||||
time.sleep(wait_time)
|
||||
else:
|
||||
logging.error(f"All {max_retries} attempts failed. Last error: {e}")
|
||||
pytest.skip(f"Skipping test due to persistent connection issues after {max_retries} attempts: {e}")
|
||||
|
||||
assert (
|
||||
resp_get_allsearch.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user