Commit Graph

23 Commits (master)

Author SHA1 Message Date
Jack Huang a84ddaecf1
statsd: fix crash if there is no git repository (#23775)
* fix crash if there is no git repository

* return default

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-02-16 14:30:54 +01:00
Adeeb Shihadeh 3f89834e4e master and forks aren't dirty 2022-01-17 13:51:30 -08:00
Adeeb Shihadeh b63bc89bc9
sentry fixups (#23249)
* set env

* do init in same place

* no sentry for forks

* start session

* start session

* remove that

* val
2022-01-14 15:25:16 -08:00
Robbe Derks 1b49ce6ec4
Statsd (#23413)
* device side of statsd

* need to start it

* enable in manager

* add sleep

* cleanup

* remove aggregates for now and standardize on industry terms

* manager needs main

* need to have a try/except

* atomic_write_on_fs_tmp does not work

* cleaner

* use dump

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* one file at a time

* limit amount of files

* move to influx line protocol and cleanup

* needs to be a list

* fix timezone bug

* actually rate limit

* add to release

* normalized origin

* also log deviceType

* more stats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-10 15:21:48 +01:00
Ewout ter Hoeven 55390d273f
Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-12-16 14:58:17 +01:00
Adeeb Shihadeh 13b4ff504d
selfdrive/version: remove one unnecessary write to .git/ (#23183) 2021-12-14 22:35:18 -08:00
Shane Smiskol b745a14ff7
version.py: make function names more clear (#23216)
* rename a few version functions

* and is_prebuilt

* and some formatting 😊
2021-12-14 12:15:13 +01:00
Willem Melching f7c46c6949
Do not run code on version.py import (#23063)
* Do not run code on version.py import

* fix athena
2021-11-29 19:38:55 +01:00
Adeeb Shihadeh a19738cba8 version.py: set terms and training version 2021-09-11 21:07:41 -07:00
Adeeb Shihadeh 116bb0b524 update tested branches 2021-07-23 15:47:00 -07:00
Greg Hogan ea0f7e2797
athena: version endpoint (#21045)
* athena: version endpoint

* get_version function

* more explicit version validation
2021-05-26 18:33:27 -07:00
Willem Melching f3db94a0c4
Linux tombstones: add stacktrace and upload (#19737)
* Add stacktrace to tombstones

* make sentry output prettier

* Refactor

* Generate upload filename

* Actually move file

* Fix spaces

* copy and upload

* dont delete just yet

Co-authored-by: Comma Device <device@comma.ai>
2021-01-18 13:29:01 +01:00
Adeeb Shihadeh 0040ac987a add type hints to selfdrive/version.py 2020-09-19 14:55:27 -07:00
Adeeb Shihadeh 0394b8b921 fix get_git_remote not returning a value 2020-08-12 13:50:51 -07:00
Willem Melching c3a4558026
Don't check dirty on prebuilt release (#2014)
* dont check dirty on prebuilt release

* cleanup

* Command cleanup

* Only log dirty comma branch

* Less whitespace

* Consistentcy

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-12 11:38:38 +02:00
Adeeb Shihadeh ede5b632b5 fix tested branch detection 2020-07-20 13:59:10 -07:00
Adeeb Shihadeh ccf6b80c7e
Cleanup startup event handling (#1748)
* cleanup startup event

* always show permanent

* lowest

* update refs
2020-06-19 16:16:48 -07:00
Adeeb 367155168a
Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
2020-06-03 16:13:34 -07:00
Willem Melching 4695b2daa9 default values in version.py, fixes #1187 2020-03-03 15:21:34 -08:00
Willem Melching c770f54103 Fix dirty files reporting 2020-02-03 15:12:59 -08:00
Willem Melching 1de0b9c233 Fix version.py in case of no branch 2020-01-28 16:18:26 -08:00
Willem Melching b552a627e1 cleanup version.py 2020-01-28 15:55:24 -08:00
George Hotz 2f9379a139 selfdrive/*.py 2020-01-17 11:03:42 -08:00