Maxime Desroches
47ed90c6cf
Reapply "Mypy: Got passing on macos ( #34591 )" ( #35126 ) ( #35153 )
...
* Mypy: Got passing on macos (#34591 )
* Mypy: Got mypy passing on macos
* common/realtime.py refactor
* Mypy: mypy passing on darwin
* Refactor: Removed else: pass statement
* Refactor: Removed unnecessary check
* added xattr to pyproject
* loggerd: switched to xatter module
* loggerd: removed unused module in xattr_cache.py
* UV: update uv.lock
* Update system/athena/athenad.py
* athenad: fixed blank lines
* loggerd: refactor of xattr_cache
* cleanup
---------
* fix getxattr no attribute on macOS
* try fixing missing ENOATTR on Linux
---------
Co-authored-by: Andrei Radulescu <andi.radulescu@gmail.com>
Co-authored-by: BrainLess <116778989+BrainLessPea@users.noreply.github.com>
4 days ago
Maxime Desroches
aa1b790708
revert agnos 12
4 days ago
Andrei Radulescu
bbf37ae5c7
Reapply "Mypy: Got passing on macos ( #34591 )" ( #35126 )
...
* Mypy: Got passing on macos (#34591 )
* Mypy: Got mypy passing on macos
* common/realtime.py refactor
* Mypy: mypy passing on darwin
* Refactor: Removed else: pass statement
* Refactor: Removed unnecessary check
* added xattr to pyproject
* loggerd: switched to xatter module
* loggerd: removed unused module in xattr_cache.py
* UV: update uv.lock
* Update system/athena/athenad.py
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
* athenad: fixed blank lines
* loggerd: refactor of xattr_cache
* cleanup
---------
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
* fix getxattr no attribute on macOS
* try fixing missing ENOATTR on Linux
---------
Co-authored-by: BrainLess <116778989+BrainLessPea@users.noreply.github.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
4 days ago
Trey Moen
e785026a98
feat(athenad): priority uploads ( #34856 )
...
Today, Firehose uploads and user-requested uploads from Connect are treated the same. This is not ideal behavior if the user wants to upload routes immediately for a bug report and the queue is full of uploads for Firehose. The workaround is to clear the queue and retry the upload from Connect.
This PR adds an optional `priority` to requested file uploads in `athenad`. By default, all requests are marked `Low`. However, if the caller wishes to mark their uploads as "more important," then the upload queue will prioritize those requests when uploading.
The only caveat to this PR is that we won't reorder files currently being uploaded. Most connections are quick enough to finish uploading max 4 files before polling the new high-priority items in the queue.
Closes https://github.com/commaai/openpilot/issues/34836
**Verification**
Added test case to insert upload tasks with differing priorities. Polling the queue produces items in the correct order (smallest # to largest).
PR to mark Connect uploads as high priority: https://github.com/commaai/connect/pull/557
---------
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2 months ago
Adeeb Shihadeh
701868d5cd
firehose auto start + stats ( #34747 )
...
* don't need that
* stats
* lil more
* lil more
* cleanup
* tweaks
---------
Co-authored-by: Comma Device <device@comma.ai>
2 months ago
Adeeb Shihadeh
27b5a727e3
Revert "Mypy: Got passing on macos ( #34591 )"
...
This reverts commit b09b48130e
.
3 months ago
BrainLess
b09b48130e
Mypy: Got passing on macos ( #34591 )
...
* Mypy: Got mypy passing on macos
* common/realtime.py refactor
* Mypy: mypy passing on darwin
* Refactor: Removed else: pass statement
* Refactor: Removed unnecessary check
* added xattr to pyproject
* loggerd: switched to xatter module
* loggerd: removed unused module in xattr_cache.py
* UV: update uv.lock
* Update system/athena/athenad.py
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
* athenad: fixed blank lines
* loggerd: refactor of xattr_cache
* cleanup
---------
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
3 months ago
Dean Lee
27c11eb597
athena upload: streaming file upload ( #34559 )
...
streaming file upload
3 months ago
Adeeb Shihadeh
9bc35c0919
Revert "athena upload: reduce memory usage and improve efficiency with streaming ( #34528 )"
...
This reverts commit 4c65f51a55
.
3 months ago
Dean Lee
4c65f51a55
athena upload: reduce memory usage and improve efficiency with streaming ( #34528 )
...
* reduce memory usage and improve upload efficiency with streaming
* space
3 months ago
Adeeb Shihadeh
a5dd2ab2aa
athena: upload logs in parallel ( #34509 )
...
Co-authored-by: Comma Device <device@comma.ai>
3 months ago
Adeeb Shihadeh
79e52ea83d
FIREHOSE mode v0.1 ( #34496 )
...
* add toggle
* athena
* fix mypy
3 months ago
Shane Smiskol
cd6d9fee3f
Revert "athenad: fix thread safety issues in upload handing" ( #34224 )
...
Revert "athenad: fix thread safety issues in upload handing (#34199 )"
This reverts commit dcb3113c4b
.
5 months ago
Dean Lee
dcb3113c4b
athenad: fix thread safety issues in upload handing ( #34199 )
...
* fix thread safety issues in upload handing
* remove cancelled_uploads
* remove None from current upload items & atomic updates
5 months ago
Shane Smiskol
015aadd48c
Revert "athenad: fix thread safety issues in upload handing" ( #34198 )
...
Revert "athenad: fix thread safety issues in upload handing (#34084 )"
This reverts commit 7c101a40c8
.
5 months ago
Dean Lee
7ec6a47c1e
athenad: optimize network state check in upload callback ( #34185 )
...
optimize network state check in upload callback
5 months ago
Dean Lee
7c101a40c8
athenad: fix thread safety issues in upload handing ( #34084 )
...
* fix thread safety issues in upload handing
* remove cancelled_uploads
5 months ago
Dean Lee
43807746ff
athenad: fix memory leak by closing Response objects ( #34101 )
...
* fix memory leak by closing Response
* use with
5 months ago
Dean Lee
adb9560870
athenad: move last_scan outside the loop ( #34099 )
...
move last_scan outside the loop
6 months ago
Dean Lee
b737e8472f
athenad: explicitly delete socket in getMessage ( #34098 )
...
explicitly delete socket in getMessage
6 months ago
Dean Lee
957d39a5b6
athenad: close websocket before starting next loop iteration ( #34085 )
...
explicitly close websocket before starting next loop iteration
6 months ago
Adeeb Shihadeh
9ad2333546
athena: migrate old termux SSH port to new one
7 months ago
Adeeb Shihadeh
53f514cbd3
athena: update SSH port ( #33804 )
7 months ago
Shane Smiskol
7b67994a05
use zstandard library ( #33110 )
...
* use zstandard
* run 10
* bye bye
* this was a little overzealous
* clean up
old-commit-hash: 1b3b5ab758
10 months ago
Shane Smiskol
b0a8b3bc9d
uploader: compress with zstd ( #32736 )
...
* zstd uploader
* fix that
* fix name of function
* comment
* log failed
* fix comma_api_source for routes with both bz2 and zst rlogs
* TODO
* 10-14 achieves almost no benefit on qlogs in a few cases, but takes 2x the time
* these aren't written out
* regen: specify any list of sources
ooh this is pretty nice
* regen and process replay
* damn, actually we don't need all this (cool tho)
Revert "regen: specify any list of sources"
This reverts commit ceb0b4abed
.
* just let it auto resolve
* fix athenad/uploader tests
* zst here too
* TODOs
* yes
* Revert "TODOs"
This reverts commit 8c7da1dbd0
.
* Revert "zst here too"
This reverts commit 23b0023ddf
.
* Revert "just let it auto resolve"
This reverts commit f296d62424
.
* Revert "regen and process replay"
This reverts commit 0768330e96
.
* revert readme
* not in save_log either
* lfg
* Revert "lfg"
This reverts commit 3718559c6c
.
old-commit-hash: 7dec7c39be
10 months ago
Shane Smiskol
5fdbd73ba3
athenad: log failed upload items
...
old-commit-hash: add958bb08
10 months ago
Adeeb Shihadeh
3b8ed67aa3
remove navigation ( #32773 )
...
* remove navigation
* lil more
* fix cabana
* revert for now
* fix docs
* move that over
* lock
* rm assets
old-commit-hash: e491c9d964
11 months ago
Adeeb Shihadeh
18970afb0e
athena: move to system/ ( #32488 )
...
* athena: move to system/
* slash
old-commit-hash: 3279dbeff7
12 months ago
Shane Smiskol
f2c0eb2388
athenad: set TOS field for proxy WebSocket ( #32337 )
...
set TOS
old-commit-hash: d7d3111212
1 year ago
Shane Smiskol
2dc96b6ee8
athenad: set a timeout on proxy WebSocket receive ( #32336 )
...
* useless
* Revert "useless"
This reverts commit 28f0bb9e97
.
* this forever hangs you disconnect (or 2 hours)
* same timeout as the global websocket
* Revert "same timeout as the global websocket"
This reverts commit 0bd0cb8a38
.
* setting the timeout affects the entire websocket and disconnects, not just recv timeout
* fix that
* fix test
old-commit-hash: 09aeab3f77
1 year ago
Justin Newberry
1548b673e0
use build_metadata everywhere we used to use get_version, get_commit, etc ( #31941 )
...
* use build_metadata
* fix normailzed
* also normalized
* and here
* fix diff
* and that one
* cleanup
old-commit-hash: effee900c4
1 year ago
Justin Newberry
a5bc36ea9d
move git commands to common/git.py ( #31921 )
...
move git into common/git.py
old-commit-hash: 4fbc8a3896
1 year ago
Cameron Clough
a09300385b
mypy: use implicit-optional ( #31590 )
...
* mypy: set implicit-optional = true
* find and replace '| None = None' -> '= None' in function args
old-commit-hash: 80da3aee14
1 year ago
Cameron Clough
9bd90112d0
use pyupgrade to update to new typing syntax ( #31580 )
...
* add pyupgrade hook
* run pyupgrade (pre-commit run -a)
* ruff --fix
* Revert "add pyupgrade hook"
This reverts commit 56ec18bb6b
.
* revert changes to third_party/
* manual type fixes
* explicit Optional wrapping capnp objects
old-commit-hash: 995250ae49
1 year ago
Shane Smiskol
04bcb2f0b5
athenad: check end_event while uploading files ( #31541 )
...
* check end_event while uploading, throw abort exception if we need to shut down/restart
* fix
* draft test
stash
* Revert - there's no easy way to know if it breaks early in upload loop
or not yet
This reverts commit ad893687e1
.
* todo for now
old-commit-hash: 3009a51c06
1 year ago
Shane Smiskol
e31385f1ab
athenad: fix test timeouts and comments ( #31540 )
...
* these pass in 0.5s since server sends ping on connect
* comments
* unused
* fix
* fix these too
* check end_event while uploading, throw abort exception if we need to shut down/restart
* Revert "check end_event while uploading, throw abort exception if we need to shut down/restart"
This reverts commit f0b822fca9
.
* more tol for lte connection
old-commit-hash: c0e172e0c0
1 year ago
Greg Hogan
14e12980f5
simplify git remote is comma check ( #31284 )
...
* simplify git remote is comma check
* cast to str
* eliminate default and always return string
* add type annotation for cache decorator
* fix up default handling
old-commit-hash: 7affba06d8
1 year ago
Greg Hogan
b7edab29e6
athenad: return normalized origin in getVersion() ( #31283 )
...
old-commit-hash: 9ab374f3b0
1 year ago
Adeeb Shihadeh
6124ecf1c1
uploader: restrict qcam upload on metered connctions ( #31047 )
...
* uploader: restrict qcam upload on metered connctions
* route requesting
* rename
* str
* cleanup
* strip dongle
* upload bookmarked segments
---------
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2280ac50b7
1 year ago
Adeeb Shihadeh
e9e1d4559b
Update Python packages and pre-commit hooks ( #31003 )
...
* Update Python packages and pre-commit hooks
* fix
---------
Co-authored-by: jnewb1 <jnewb1@users.noreply.github.com>
old-commit-hash: a8afaf39d4
1 year ago
Adeeb Shihadeh
8d11c3b742
Update Python packages and pre-commit hooks ( #30597 )
...
* Update Python packages and pre-commit hooks
* fix
---------
Co-authored-by: jnewb1 <jnewb1@users.noreply.github.com>
old-commit-hash: 46f3fdc090
1 year ago
Adeeb Shihadeh
ffc40a2fd1
athena: cleanup unused methods
...
old-commit-hash: ea94a6d89f
1 year ago
Shane Smiskol
fa6bc55834
athenad: use `socket` constant ( #30663 )
...
Update athenad.py
old-commit-hash: 90c2aee6c3
1 year ago
Adeeb Shihadeh
59eb2988de
swaglog.py goes in common/ ( #30631 )
...
* swaglog.py goes in common/
* all of these go in release
* we'll even include the pyx
old-commit-hash: 35f819c823
1 year ago
Justin Newberry
661132be5a
Pytest: more post-test path cleanup ( #30556 )
...
* test cleanup
* missed this one
* remove that
* static class
old-commit-hash: 4086795c29
1 year ago
Adeeb Shihadeh
47ce76ae1f
athena: remove primeActivated endpoint ( #30542 )
...
old-commit-hash: 07e75c7cb8
1 year ago
Dean Lee
3a637fe455
athenad: fix memory leak in `_do_upload()` ( #30237 )
...
* fix memory leak
* test: stash
* clean up
* clean up
* ruff
* rm
* add py memory profiler
* test compress and no compress
* proper test
* comment
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 61288dfe06
2 years ago
Adeeb Shihadeh
61eb6f4f66
finish hardware move to system/ ( #30140 )
...
* finish hardware move to system/
* fix release
* couple more
old-commit-hash: c347096c3e
2 years ago
Shane Smiskol
13381ed446
services: capitalize constant service list ( #30005 )
...
* rename
* bump
* Apply suggestions from code review
old-commit-hash: 7f073483bb
2 years ago
Justin Newberry
759ab03b03
Ruff: disallow non-openpilot imports ( #29841 )
...
old-commit-hash: 110cfef1c2
2 years ago