Skip to content

CheckInGUI robustness: fail-safe DB read, JSONFiles dir, DB hostname - #1

Open
tkolberg wants to merge 3 commits into
fsufrom
tk/checkin-failsafe
Open

CheckInGUI robustness: fail-safe DB read, JSONFiles dir, DB hostname#1
tkolberg wants to merge 3 commits into
fsufrom
tk/checkin-failsafe

Conversation

@tkolberg

Copy link
Copy Markdown
Collaborator

Fixes three issues hit on the FSU motherboard check-in stand (DESKTOP-P3D2OHP):

  • get_previous_test_results fail-safe — add a requests timeout and return [], [] on a non-marker / error response, instead of crashing with UnboundLocalError on begin1 or freezing the GUI on a no-timeout POST. [], [] is exactly what a valid "no prior tests" response already yields, so it's the correct result for a new board.
  • send_to_DB JSONFiles diros.makedirs(..., exist_ok=True) before the JSON writes, so a fresh checkout doesn't FileNotFoundError on JSONFiles/storage.json.
  • Configs/WM_cfg.yaml baseURL — point at phy-k619lf-a.hep.fsu.edu instead of a hard-coded IP (the DB host's IP has changed repeatedly: .114 → .131 → .91; the FQDN is durable). Drop this commit if fsu is meant to stay IP-pinned.

Not included (separate tracks):

  • Registering board type WMWBH1 in the DB (Board_type + Type_test_stitch) — DB-side action on phy-k619lf-a.
  • Server-side guards for cur.fetchall()[0][0] in add_test_functions.py (add_test / get_previous_test_results), which 500 on any unregistered board type.

tkolberg added 3 commits May 29, 2026 15:51
Add a request timeout and return empty results on a non-marker / error
response (correct for a new board) instead of crashing with an
UnboundLocalError on begin1, or freezing the GUI on a no-timeout POST.
open(...,'w') does not create missing parent dirs, so a fresh checkout
hit FileNotFoundError writing JSONFiles/storage.json. Create it with
os.makedirs(exist_ok=True).
The committed IP (128.186.110.114) is stale; the DB host has changed IP
multiple times. Use the FQDN so the URL survives future IP changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant