fix: skip null rows when parsing pool metrics CSV

This commit is contained in:
russell@unturf.com 2026-01-23 15:28:20 -05:00
parent 5965ce682d
commit 3f73bf6203
13 changed files with 21 additions and 21 deletions

View file

@ -1 +1 @@
4.2.19 4.2.20

View file

@ -6013,7 +6013,7 @@ void print_usage(const char *prog) {
* ============================================================================ */ * ============================================================================ */
const char *unsandbox_version(void) { const char *unsandbox_version(void) {
return "4.2.19"; return "4.2.20";
} }
const char *unsandbox_detect_language(const char *filename) { const char *unsandbox_detect_language(const char *filename) {

View file

@ -72,7 +72,7 @@
* </ol> * </ol>
* *
* @author Permacomputer Project * @author Permacomputer Project
* @version 4.2.19 * @version 4.2.20
*/ */
import javax.crypto.Mac import javax.crypto.Mac

View file

@ -1,6 +1,6 @@
{ {
"name": "un-async", "name": "un-async",
"version": "4.2.19", "version": "4.2.20",
"description": "Unsandbox async JavaScript SDK - Execute code in 50+ languages", "description": "Unsandbox async JavaScript SDK - Execute code in 50+ languages",
"main": "src/un_async.js", "main": "src/un_async.js",
"type": "module", "type": "module",

View file

@ -1,6 +1,6 @@
{ {
"name": "un-sync", "name": "un-sync",
"version": "4.2.19", "version": "4.2.20",
"description": "unsandbox.com JavaScript SDK (Isomorphic - Node.js + Browser)", "description": "unsandbox.com JavaScript SDK (Isomorphic - Node.js + Browser)",
"type": "module", "type": "module",
"main": "src/un.js", "main": "src/un.js",

View file

@ -15,7 +15,7 @@ local ltn12 = require("ltn12")
local Un = {} local Un = {}
Un.API_BASE = "https://api.unsandbox.com" Un.API_BASE = "https://api.unsandbox.com"
Un.VERSION = "4.2.19" Un.VERSION = "4.2.20"
-- Credential loading -- Credential loading
function Un.load_accounts_csv(path) function Un.load_accounts_csv(path)

View file

@ -47,7 +47,7 @@ use Digest::HMAC_SHA256 qw(hmac_sha256_hex);
use File::HomeDir; use File::HomeDir;
use Time::HiRes qw(time sleep); use Time::HiRes qw(time sleep);
our $VERSION = "4.2.19"; our $VERSION = "4.2.20";
our $API_BASE = 'https://api.unsandbox.com'; our $API_BASE = 'https://api.unsandbox.com';
# Credential system # Credential system

View file

@ -7,7 +7,7 @@ from setuptools import setup, find_packages
setup( setup(
name="unsandbox-async", name="unsandbox-async",
version="4.2.19", version="4.2.20",
description="Asynchronous Python SDK for unsandbox.com code execution", description="Asynchronous Python SDK for unsandbox.com code execution",
long_description=open("README.md").read() if False else "Async Python SDK for unsandbox code execution", long_description=open("README.md").read() if False else "Async Python SDK for unsandbox code execution",
author="unsandbox.com", author="unsandbox.com",

View file

@ -7,7 +7,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setup( setup(
name="unsandbox", name="unsandbox",
version="4.2.19", version="4.2.20",
author="Unsandbox", author="Unsandbox",
description="Synchronous Python SDK for unsandbox.com code execution", description="Synchronous Python SDK for unsandbox.com code execution",
long_description=long_description, long_description=long_description,

View file

@ -27,7 +27,7 @@ from .un import (
CredentialsError, CredentialsError,
) )
__version__ = "4.2.19" __version__ = "4.2.20"
__all__ = [ __all__ = [
"execute_code", "execute_code",
"execute_async", "execute_async",

View file

@ -7,7 +7,7 @@
[package] [package]
name = "un-async" name = "un-async"
version = "4.2.19" version = "4.2.20"
edition = "2021" edition = "2021"
authors = ["unsandbox.com"] authors = ["unsandbox.com"]
description = "Asynchronous Rust SDK for unsandbox.com secure code execution API" description = "Asynchronous Rust SDK for unsandbox.com secure code execution API"

View file

@ -7,7 +7,7 @@
[package] [package]
name = "un-sync" name = "un-sync"
version = "4.2.19" version = "4.2.20"
edition = "2021" edition = "2021"
authors = ["unsandbox.com"] authors = ["unsandbox.com"]
description = "Synchronous Rust SDK for unsandbox.com secure code execution API" description = "Synchronous Rust SDK for unsandbox.com secure code execution API"

View file

@ -175,14 +175,14 @@ report = {
# Parse per-pool time series if available # Parse per-pool time series if available
if pools_csv: if pools_csv:
try: import os
import os if os.path.exists(pools_csv):
if os.path.exists(pools_csv): with open(pools_csv) as f:
with open(pools_csv) as f: next(f) # skip header
next(f) # skip header for line in f:
for line in f: try:
parts = line.strip().split(',') parts = line.strip().split(',')
if len(parts) >= 8: if len(parts) >= 8 and parts[2] != 'null':
pool_id = parts[1] pool_id = parts[1]
if pool_id not in pool_samples: if pool_id not in pool_samples:
pool_samples[pool_id] = {"load1": [], "load5": [], "load15": [], "available": [], "total": []} pool_samples[pool_id] = {"load1": [], "load5": [], "load15": [], "available": [], "total": []}
@ -191,8 +191,8 @@ if pools_csv:
pool_samples[pool_id]["load15"].append(float(parts[4])) pool_samples[pool_id]["load15"].append(float(parts[4]))
pool_samples[pool_id]["available"].append(int(parts[5])) pool_samples[pool_id]["available"].append(int(parts[5]))
pool_samples[pool_id]["total"].append(int(parts[6])) pool_samples[pool_id]["total"].append(int(parts[6]))
except Exception as e: except (ValueError, IndexError):
print(f"Warning: Could not parse pools CSV: {e}") continue # Skip invalid rows
# Add pool breakdown with time series stats # Add pool breakdown with time series stats
if pool_samples: if pool_samples: