[ignore me] Simulated next 1.4-dev - #4131
Draft
joaoantoniocardoso wants to merge 18 commits into
Draft
Conversation
When no board can be started, auto_restart_ardupilot() retried every 5s forever. Each cycle leaks file descriptors, so after ~30 minutes the service hit EMFILE and uvicorn's accept loop began logging a traceback per retry, pegging the CPU and making the API unresponsive. That also removed the only recovery path, since selecting SITL requires a working /available_boards. Give up after 10 consecutive failures instead. Transient failures still self-heal, and an explicit start or board change re-arms the watchdog. The counter lives in __init__ rather than setup(), because setup() runs on every start attempt and would reset it. Fixes bluerobotics#4070
nmea_injector is the only service whose main.py imports its own package by name, and it lived inside that package. Running it directly puts the package directory itself on sys.path, so `import nmea_injector` cannot resolve and the service crash-loops on startup. This used to work because install-services.sh ran `pip3 install .` for every service, installing them as packages. The uv migration set `package = false` everywhere, which stopped that, and nmea_injector was the only service that depended on it. Moving main.py up to the service root puts the parent directory on sys.path instead, matching every other service and the layout master already uses. Rename cherry-picked from b95daa2, dropping its unrelated shebang and wifi changes.
Different log formats make navigating and interpreting them confusing, and local-time stamps are ambiguous across vehicles in different timezones. Unlike master, 1.4 registers a file sink in init_logger, so the format is applied there as well. Without it the log files users download would keep the old format and only stderr would be fixed. Backport of c1e2190.
Log contents are now ISO 8601 UTC, but the filenames were still local time, so a log dump disagreed with itself about the timezone. The extended format is not filename friendly, so the basic format is used instead. Lexicographic order still matches chronological order.
… pass Deletion asked lsof whether each file was open, and every lsof call rescans every process in the system, so removing a folder cost a process spawn per file: on a Raspberry Pi 4, 300 MAVLink logs took 42s against 0.2s for a single recursive call. Take one snapshot per deletion and reuse it while recursing, falling back to per-file checks when lsof fails. Searching a folder makes lsof exit with 1 whether or not it found open files, so failure is detected from stderr, with -w silencing the warnings about file systems it cannot stat.
The next commit needs the same streaming response for MAVLink logs.
Removing MAVLink logs only answered once the whole folder was gone, which the frontend gave up on. Stream each deletion like remove_log_stream already does.
…stream Clearing around 1GB of MAVLink logs took longer than the 20s timeout, failing with no feedback while deletion kept going on the vehicle. Stream it into the progress UI the service logs already use.
From Willian's intermediate commit 0f366e2 (dropped when pykson save lock was removed for master).
…nd save Clear temp files under the same lock as save() so load() cannot delete a .tmp file while save() is replacing it.
…nect After a Pixhawk reboot the USB device re-enumerates with a new path while the MAVLink router keeps a stale serial handle. Wait for the board to drop and return, then reopen the link on the freshly detected path. On failure, stop the router and clear should_be_running so the stale handle is not left running with its watchdog disarmed.
Serial board restarts wait for USB re-enumeration before reopening the MAVLink link, which can take tens of seconds.
Map tray upload/download speeds from received_B/transmitted_B divided by the linux2rest Sampler interval instead of re-differencing total_* across frontend polls. Show the same probe deltas on NetworkCard.
joaoantoniocardoso
force-pushed
the
1.4-dev-next
branch
from
August 11, 2026 23:12
d15b457 to
4877e2d
Compare
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
joaoantoniocardoso
force-pushed
the
1.4-dev-next
branch
from
August 12, 2026 00:21
e80e63f to
ac16bdd
Compare
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.
This is a simulation branch for 1.4-dev after merging the following PRs: