m-lab / etl-gardener

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

Eliminate Job as map key #375

Closed stephen-soltesz closed 2 years ago

stephen-soltesz commented 2 years ago

This change updates the gardener tracker interface in a way that preserves external compatibility with the JobsAPI and the Saver output format. This change eliminates the use of the Job type as a go map key throughout the tracker package. Now the tracker maintains two private maps (jobStatus and jobState) which use a new Key type as the map key. Also, the tracker methods now accept Key parameters. This change will enable additional configuration information to be placed in the Job or JobWithTarget object without breaking compatibility with the parser.

With the gardener tracker no longer using the Job as key, next we can:

This change is Reviewable

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.7%) to 71.324% when pulling 790960bbbfdedab35173cb8ceac422fbee115821 on sandbox-soltesz-jobkey into 7400130672b1cfaf9d4411664dda2c31c0fac031 on master.

stephen-soltesz commented 2 years ago

Thank you!