Repository navigation
Thanks to our contributors for this release: @csandrew-dev, @drkr-sl, @mactesting12, and @WardsParadox!
Note
This release has MySQL storage backend schema changes. Please apply the changes in the schema.00005.sql file if you have an existing MySQL backend installation.
New
- Native Go struct parsing of status reports: #180
- Status reports are now parsed against the generated Apple DDM status structures in
ddm/statusinstead of being walked loosely with jsonpath/fastjson; the 62 documented status items come for free. - Status reports now travel through a
ddm.StatusHandler/ddm.StatusHandlerFuncyou can wrap (e.g. aroundstorage.NewStatusStoreHandler); see the package godoc for examples. - korylprince/go-adm is our code generator
- Status reports are now parsed against the generated Apple DDM status structures in
- PostgreSQL storage backend: #179
- See the Operations Guide on using
-storage pgsqlfor more information.
- See the Operations Guide on using
- SQL storage backends: connection pool tuning options: #168, #184
conn_max_lifetime,conn_max_idle_time, andmax_open_connsstorage options for bothmysqlandpgsqlbackends.- See the Ops Guide on storage options for more info.
Changed
- (API) Status report parsing now validates against the generated Apple DDM schemas: #180
- Status values are still walked leniently from the raw bytes; only declaration status and report errors go through the generated structures. This also fixes phantom errors from loose coercion (e.g.
"active": "true"becomingfalse). - Notably: reports whose JSON types do not match the generated structures are now rejected (HTTP 500, nothing stored); but unknown/missing keys and
nullstill pass.
- Status values are still walked leniently from the raw bytes; only declaration status and report errors go through the generated structures. This also fixes phantom errors from loose coercion (e.g.
- (API) Package relocations for the status report write/read type models: #180
ddm.*write/read types moved tostorage.*(e.g.ddm.DeclarationStatus→storage.DeclarationStatus,ddm.StatusValue→storage.StatusValue/StoredStatusValue);ddm.ParseStatus()→storage.ParseStatusReport();ddm.ParseStatusUsingMux/RegisterStatusHandlersremoved.http/ddm.StatusReportHandler→http/ddm.NewStatusReportHandler(takes addm.StatusHandler);StatusStorer.StoreDeclarationStatusnow takes*storage.StatusReport.
- MySQL storage backend
- status reports and errors are now append-only: #178
- Both tables gain an auto-increment
id;row_countis dropped.schema.00005.sqlmigrates existing rows. delete_errors=Nnow keeps the newest N errors (rather than the last N reports' worth); a single report can contain many errors.- A missing report now returns HTTP 404 instead of 500.
- Both tables gain an auto-increment
- (API)
storage.WithoutStatusReports()option to disable saving status reports altogether: 0d8bc5c WithErrorDeletiondocs clarified to count errors, not reports: #178- retry transactions on transient lock errors: #185
- Replaces the internal tx helper with NanoMDM's
Txn, which retries deadlocks and lock-wait timeouts with jittered backoff;WithTxnOptionstunes it. The status-values upsert now runs in a transaction too.
- Replaces the internal tx helper with NanoMDM's
- status reports and errors are now append-only: #178
Fixed
- storage: shadowed errors from
Multideclaration items: 85f7965 - MySQL storage backend
- kv storage backend: unstable declarations token from map iteration: #170
- notifier: