m-lab / etl-gardener

Gardener provides services for maintaining and reprocessing mlab data.
Apache License 2.0
13 stars 5 forks source link

Add v2 saver struct format #400

Closed stephen-soltesz closed 2 years ago

stephen-soltesz commented 2 years ago

This change adds a new saver struct format that will a) allow us to migrate from v1 to v2 seamlessly, b) separates the JobMap type into the same two types used natively by the tracker.Tracker.

After this change, the Tracker will attempt to load from the v1 struct, but will write state in the v2 saver struct format. On restarts, the Tracker will attempt to load both, but will prefer the one with the later SaveTime, which should always be the v2 type until we remove the v1 logic entirely.

This change is part of https://github.com/m-lab/etl-gardener/issues/349


This change is Reviewable

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 3527


Changes Missing Coverage Covered Lines Changed/Added Lines %
tracker/tracker.go 51 52 98.08%
<!-- Total: 54 55 98.18% -->
Files with Coverage Reduction New Missed Lines %
ops/actions.go 2 40.13%
tracker/tracker.go 3 90.18%
<!-- Total: 5 -->
Totals Coverage Status
Change from base Build 3523: 0.02%
Covered Lines: 1544
Relevant Lines: 2080

💛 - Coveralls