Commit Graph

68 Commits

Author SHA1 Message Date
Adeeb Shihadeh ad96d0d130 move athena tests to github actions (#22475)
* move athena tests to actions

* run

* fix timeout
old-commit-hash: de7a9e01160399228c30795769dc1ec6039cb8f4
2021-10-07 13:22:14 -07:00
Adeeb Shihadeh e9cd2a5561 need a jwt for those tests
old-commit-hash: f7bd264db888e2250a425c2a9249fc37ba539818
2021-08-19 15:48:26 -07:00
Adeeb Shihadeh 4da8cf4f31 athena: hardcode jwt for tests
old-commit-hash: 7e3d00206697ed552f8b3ae7018dd2c879906ee2
2021-08-19 14:19:14 -07:00
Greg Hogan 6cbe7f0749 athena: change test tearDown to setUp (#21935)
old-commit-hash: 1d64c18e499ee4ca51d8fca126488861e9943d4f
2021-08-14 22:27:22 -07:00
Greg Hogan b143411521 athena: split data into multiple frames (#21918)
old-commit-hash: a6debb999c1a4cd8e82ce71bdfb128d76f2923ef
2021-08-13 08:38:36 -07:00
Greg Hogan 9357587ace athena: add prefix param to listDataDirectory (#21906)
* athena: add prefix param to listDataDirectory

* only traverse directories that match prefix

* tests
old-commit-hash: 2dff84121e6966088c4941470a3d9fce12234d8f
2021-08-13 12:14:20 +02:00
Willem Melching dad760624a athena: return current upload status in listUploadQueue (#21903)
* return current upload item in listUploadQueue

* update progress on read

* move to file helpers

* use dict instead of global
old-commit-hash: 28823917ea87edebf66f568f15f965028b0a2ff5
2021-08-13 11:51:08 +02:00
Willem Melching 705988abb5 api_get: keep same api (#21838)
old-commit-hash: 267a0b343b0ad607ee0cddcf62de5e18966d4390
2021-08-03 15:33:41 +02:00
Dean Lee ceb40d8384 api: use API_HOST env variable everywhere (#21814)
* api base url to global constant

* update api/__init__.py
old-commit-hash: 543e019f715a7e485c7402d1e145dc8e81d43611
2021-08-03 13:49:49 +02:00
Willem Melching dd824ffe34 athenad: retry failed and timed out uploads (#21745)
* retry failed uploads

* test cleanup

* update comment

* also catch SSL error

* use defaults

* sleep in chunks
old-commit-hash: d5b6746ac55ec2947a7e7d14c12035168b73505d
2021-07-29 11:13:59 +02:00
Adeeb Shihadeh e8161a42ee athena: detect no prime (#21718)
* detect no prime

* show in sidebar

* revert timeout

* clear ping param

* fix typo

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 7b94cf0ca79e570dd217f164b0a0ca163566eea9
2021-07-26 13:50:58 -07:00
Greg Hogan 88f6e9e1d2 athenad: fix log sort (#21703)
* athenad: fix log sort

* add test for logs to send

* use temp dir for logs

* fix changing SWAGLOG_DIR

* better way to patch SWAGLOG_DIR

* fix grammar
old-commit-hash: 0964871239aed73d34ac7730d62d60139ecb1236
2021-07-24 20:11:29 -07:00
Joost Wooning f3a8d2a385 athena: primeActivated response (#21670)
old-commit-hash: d4e0e8c6cf97a4d0dd4bd6f6b105a59922c28c33
2021-07-22 13:48:27 +02:00
Adeeb Shihadeh 444649d4f6 show registration debug info after 60s (#21679)
* show registration debug info after 60s

* little nicer

* larch

* aarch

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 987abb31ddd7affb18f9d93153eb00cf3bfb9c23
2021-07-21 23:30:02 -07:00
Willem Melching 4c85b400c9 athena: primeActivated endpoint (#21623)
old-commit-hash: 51ee3be91a9290c4415c91e2a0b7ddb28c15d34f
2021-07-16 14:38:46 +02:00
Willem Melching cf2f6b964d Athena getNetworks method (#21597)
* add iwlist scan

* return using athena

* add lte

* add last one too

* unused

* add release files

* more compact

* typo

* remove debug code

* different file

* array

* rebase mistake
old-commit-hash: a7aa22253bf607c6cc3087b3e0471d6d1b52126b
2021-07-14 16:16:45 +02:00
Adeeb Shihadeh d38c75a726 more athena logging (#21558)
old-commit-hash: 49e316a34bc8fc025a8c8e71f8a91c32557ac976
2021-07-11 21:18:28 -07:00
Willem Melching 56b8bd1717 Athena: increase timeouts (#21316)
* fix typo in thread name

* bump send/upload timeout to 30 seconds
old-commit-hash: fc569694e9960d91dad8ed82b7d546b6b96b1c46
2021-06-17 19:20:41 +02:00
Willem Melching 6f757fdd60 Fetch mapbox token from API (#21136)
* delay widget creation until going onroad

* let athena fetch mapbox token

* only tici

* add token

* cleaner

* rename slots

* that was missing
old-commit-hash: 21be4434998476669c807c3d1ba9b25c1cbc495f
2021-06-07 12:14:08 +02:00
Greg Hogan 0401206b6b athenad: send log files one at a time (#21092)
old-commit-hash: 1a7b0dfb3c90d31668aefcb615cc7d38e03cd61b
2021-06-01 15:49:01 -07:00
Willem Melching a8c569f2da Add more logging to athena threads (#21086)
* add more logging to athena threads

* add debug to local proxy

* log athena method calls

* data is a json string
old-commit-hash: a065eb694242046c0863ba96a604e63aff2eabbe
2021-05-31 12:15:31 +02:00
Willem Melching 345d9abe7c Disable Sentry exceptions from athena (#21085)
old-commit-hash: 6a04baffc452c808635b145d40099a7e5dc34e05
2021-05-31 11:07:22 +02:00
Greg Hogan a86a549b5d athena: version endpoint (#21045)
* athena: version endpoint

* get_version function

* more explicit version validation
old-commit-hash: ea0f7e27979fc2e39909c778b75f138fd3113a3b
2021-05-26 18:33:27 -07:00
Willem Melching a46e3c5cb4 athena: log before trying to connect
old-commit-hash: 8f3e395a1fb65f812a0782b9808a9cac1c5b862c
2021-05-25 17:47:20 +02:00
Willem Melching c02d7a1061 athenad: set timeout when creating websocket
old-commit-hash: 466f5f091e23afdf899f4c7c40722b4ce7b544f2
2021-05-21 13:20:48 +02:00
Willem Melching f923f47b98 athenad: reconnect after not receiving ping (#20974)
* athenad: reconnect after not receiving ping

* make sidebar timeout longer than timeout in athena

* whitespace
old-commit-hash: f9f84fe8a2540dd87b05d93cb8234707d8bbe21b
2021-05-20 13:57:46 +02:00
Willem Melching efa94a89ff Mapbox widget (#20751)
* squash mapbox stuff

* only hacks for pc

* no hack there

* only update when needed

* get destination from param

* no need for user agent

* add athena method

* change nav path color

* layout cleanups

* margin top

* add build scripts

* rename header file

* set pitch

* fix icon blinking

* keep both options

* draw on top to fix last blinking

* only recomput with gps

* fix include

* put map in onroadwidget

* update mapbox plugin to allow specifying directions url

* cycle through views

* dynamic resize

* only when present

* add map_helpers

* whitespace

* small fixes

* let scons decide

* update setup files

* implicit dependency

* fix alerts

* Update selfdrive/ui/SConscript

* move clearLayout to util.h

* only build when map.cc present

* move maps to own folder

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 86aefbe7667f0693402c1883d286ce331e9d6215
2021-05-17 14:57:07 +02:00
Willem Melching 236b691572 athenad: catch WebSocketException
old-commit-hash: f59c6d379d62ded119f342dfbba7c79f48e39ea2
2021-05-12 16:03:56 +02:00
Willem Melching b401941961 athenad: catch connection/timeoutError
old-commit-hash: 75c0594cdb274dee2785433328c884d45708aca8
2021-05-12 16:01:31 +02:00
Adeeb Shihadeh 8002b848b6 offroad alert for unregistered devices (#20870)
* offroad alert for unregistered devices

* update tests

* add param

* fix stretch
old-commit-hash: b93ccc465dbc8b847b65f7d062182465344dac4d
2021-05-11 03:18:45 -07:00
Adeeb Shihadeh c9d5447edd registration unit tests (#20792)
* start tests

* more test

* done
old-commit-hash: 5b764ab47760f6b8b751cff074b245b988650051
2021-05-01 17:16:58 -07:00
Adeeb Shihadeh 4c461b3f7f disable sentry for devices without a dongle ID (#20729)
* disable sentry for devices without a dongle ID

* import pc

* unused
old-commit-hash: 47ad2a485f927134ee2f93c497b1b6cb831def30
2021-04-23 11:29:38 -07:00
Willem Melching c0ca2ce743 Switch to new sentry_sdk (#20690)
* remove unused crash.install

* use sentry_sdk in crash.py

* athena crashes dont rely on excepthook

* make default crash handler work

* make it work in athena

* fixup tombstoned
old-commit-hash: ea0e61187298c9c02238ad673f5932f08aa6f0c7
2021-04-22 15:24:35 +02:00
Greg Hogan f0b9176bd7 logging cleanup (#20502)
* switch some uploader messages to debug log

* use allow_sleep

* log when not request or response

* test both with params and without params
old-commit-hash: 1e3f8b014ef63f5e3d0a3f7622a03892dd8958b2
2021-03-26 17:36:01 -07:00
Greg Hogan cf30e8c904 fix athena calls that do not use params
old-commit-hash: b88ca985d673dfec1b2e4e61ad06bc4caf5fddd1
2021-03-25 17:58:49 -07:00
Greg Hogan 183d9f98a1 log to file and send through athena (#20250)
* log to file and send through athena

* rename logging level

* pass thru log formatter

* logMessage is TEXT

* send queue always strings

* switch to xattr and lower priority queue

* enable cloud logging for devices

* time or size based log rotation

* basename -> dirname

* remove HARDWARE.get_cloudlog_enabled

* fix errors

* fix another exception

* xattrs need to be bytes

* sending works

* cleanup files at start

* add id and adjust formatting

* do not send active log file

* better names

* separate log formatters

* fix formatter super init

* fix log file order

* ensure file always has file formatter

* i see why there was no formatter

* apply same formatting to cpp log msgs

* apply same formatting to cpp log msgs

* update queue names in tests

* strip deprecated keys in STATUS_PACKET

* strip DEPRECATED from dict recursively

* athena log queue test

* instanceof instead of type

* isinstance instead of type

* use super

* remove logentries

* last_scan param unused

* comment about special log msg attr names

* add dict_helpers.py to release files

* use monotonic time and counter for log rotation

* update for adjusted log file naming

* use monotonic clock for tracking last log file scan
old-commit-hash: 3d48bd934d6c84a5352c2a1d56e6f93ed59e28c4
2021-03-25 13:30:09 -07:00
Willem Melching c0098cec09 Manager cleanup (#20231)
* move manager in folder

* inital refactor

* call start

* small cleanup

* add comments

* use self.signal()

* order shouldnt matter

* newlines

* add helpers

* newlines

* add process config

* split out build part of manager

* this should fix most tests

* no sensord on pc

* dont start athena

* remove comment

* fix old athena test

* fix inject model

* fix test car models

* should be not none

* fix helpers exitcode

* ignore manage_athenad

* Use time.monotonic()

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* combine init, remove spinner

* move manager test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5a3b51130649356b14b24e3c82e014b3a0be95a8
2021-03-05 11:03:23 +01:00
Adeeb Shihadeh 05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46b8153314a8420611b6479dd6f70dfc
2021-02-16 21:39:32 -08:00
Adeeb Shihadeh 43d680c9c5 add device type to clouglog ctx (#19890)
* add device type to clouglog ctx

* remove is_eon

* str
old-commit-hash: c9679222aebfcbf0dcce7ac00d2e03d19101a81f
2021-01-22 20:02:48 -08:00
Adeeb Shihadeh ebce6a6f56 athena fixups (#19791)
* fix leak

* assert raises

* no q

* guess the queue did something
old-commit-hash: 7c82bac27e2cdbf60ef735bc2d25e948c8381936
2021-01-16 15:36:10 -08:00
Adeeb Shihadeh 5bbe4f3d52 manager tests + make all processes exit cleanly (#19595)
* manager tests

* logcatd exits cleanly

* sigint

* boardd

* multiple dbus connections hangs for some reason

* clocksd proclogd

* network type from thermal

* fix tests

* fix android logcatd

* fix mac

* fix mac proclogd

* move on device athena tests

* build first

* build first

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ffa7e0cbdb0859751685caae1321d3ccf732fed9
2020-12-29 22:32:03 -08:00
Adeeb Shihadeh 87b1a8bd15 increase athena test timeout
old-commit-hash: 63cdf2a70cdcb9f5107de9e2fa4a5b0640b0ccc2
2020-12-19 16:13:29 -08:00
Adeeb Shihadeh b950cab874 HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
old-commit-hash: 8674b023bab2b44405139ceec5785a389f837682
2020-12-16 21:30:23 -08:00
Greg Hogan 120858b241 athenad: add getNetworkType (#19517)
old-commit-hash: 7a121862a8b68173e48a1b9b4838c960564e7cad
2020-12-15 23:25:52 -08:00
Willem Melching 16fe1bb2ad Hardware abstraction class (#2080)
* hardware abstraction class

* De Morgan

* Rename pc hardware class

* Fix sound card in controlsd

* Pc get sim info

* fix hardware in test

* two more

* No more random imei on android

* no randomness on android

* Need to return something that looks like imei for registration to work

* Return proper network strength

* Unused import

* Bug fixes + gpsd is only android
old-commit-hash: c7152d54192605c833912b69cf85514ac2e1b1fc
2020-08-26 14:57:17 +02:00
Adeeb 9027018368 Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
old-commit-hash: 367155168a0c9fb698c8248a5c28c66c2987ae65
2020-06-03 16:13:34 -07:00
Willem Melching a56e2b01f8 Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
old-commit-hash: 843a64c72fb94397a1edf814fa66044c8d92acbf
2020-06-02 16:29:32 -07:00
Willem Melching 2b60ee9531 Run mypy commit hook (#1591)
* run mypy commit hook

* fix mypy errors
old-commit-hash: 3d08dcc3b27936cb14c0eae63605be9a6c077380
2020-05-28 15:05:04 -07:00
William 798e1a8908 Shebang Fix (#1477)
* Shebang Fix

Per George's "I'd merge a PR replacing the 4 python3.7 with python3" on Discord. George updated Python to 3.8.2 for webcam tools, which broke manager from launching. Instead of chasing the exact version, it seems more reasonable to fall back to 3.

* More Python3.7's
old-commit-hash: aef01f4bdfc03929a7ad046e867ef975f81b7b59
2020-05-08 18:08:11 -07:00
George Hotz 6fbcde48e5 Using lgtm.com and fixing found alerts (#1452)
* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
old-commit-hash: 1295cfe06cd80a2c2f40e0af97697ee818037f08
2020-05-02 12:07:34 -07:00