lf_interop_ping_plotter.py: add detailed logging around API calls - #294
Merged
Conversation
…calls Adds request/response logging to change_target_to_ip, api_get, check_tab_exists, and get_results so API failures (unreachable manager, unexpected response shape, missing endpoint data) are visible in the logs instead of surfacing as unlogged crashes or silent no-ops. change_target_to_ip now aborts the test with a clear error when the target port can't be resolved to an IP, instead of silently falling back to the unresolved target string. get_results also detects and logs when a multi-endpoint response is missing data for some of the requested endpoints. Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
Logs the /adb/ endpoint requests used when building the pass/fail and grouped device lists, and the per-resource hw version lookups in generate_report/generate_report_robo, so failures are visible instead of surfacing as unlogged crashes. The hw version lookups now catch connection failures and non-2xx responses, log them with the resource they were for, and skip to the next resource instead of aborting the whole report partway through. Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
Logs the three /ports/all/ requests used to refresh port data during robot navigation, initial test setup, and the virtual station polling loop, so a failed lookup is visible in the logs with the context it occurred in (e.g. which robot coordinate) instead of surfacing as an unlogged crash. Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
api_get() now returns (None, None) instead of re-raising when the request itself fails, and filter_iOS_devices() checks for that None response, logs which device/endpoint it was for, and skips to the next device instead of crashing on `'status' in None`. Verified CLI: python3 lf_interop_ping_plotter.py --mgr 192.168.207.75 --real --ping_interval 1 --ping_duration 1m --target www.google.com --use_default_config
goyalsaurabh06
approved these changes
Jul 14, 2026
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.
Summary
script (json_get, api_get, raw requests.get) so failures show the
endpoint, context, and response body instead of surfacing as unlogged
crashes or silent no-ops.
ping target can't be resolved to an IP; get_results detects and logs
When a multi-endpoint response is missing data for some of the
Requested endpoints.
polling loop) Now log failures with the resource/coordinate they
occurred at and skip to the next item instead of crashing partway
through.
request fails, and filter_iOS_devices() handles that case gracefully
(logs and continues) Instead of crashing on
'status' in None.Test plan
python3 lf_interop_ping_plotter.py --mgr 192.168.207.75 --real --ping_interval 1 --ping_duration 1m --target www.google.com --use_default_config