CheckInGUI robustness: fail-safe DB read, JSONFiles dir, DB hostname - #1
Open
tkolberg wants to merge 3 commits into
Open
CheckInGUI robustness: fail-safe DB read, JSONFiles dir, DB hostname#1tkolberg wants to merge 3 commits into
tkolberg wants to merge 3 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes three issues hit on the FSU motherboard check-in stand (
DESKTOP-P3D2OHP):get_previous_test_resultsfail-safe — add arequeststimeout and return[], []on a non-marker / error response, instead of crashing withUnboundLocalErroronbegin1or 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_DBJSONFiles dir —os.makedirs(..., exist_ok=True)before the JSON writes, so a fresh checkout doesn'tFileNotFoundErroronJSONFiles/storage.json.Configs/WM_cfg.yamlbaseURL — point atphy-k619lf-a.hep.fsu.eduinstead of a hard-coded IP (the DB host's IP has changed repeatedly:.114 → .131 → .91; the FQDN is durable). Drop this commit iffsuis meant to stay IP-pinned.Not included (separate tracks):
WMWBH1in the DB (Board_type+Type_test_stitch) — DB-side action onphy-k619lf-a.cur.fetchall()[0][0]inadd_test_functions.py(add_test/get_previous_test_results), which 500 on any unregistered board type.