deis / workflow-manager-api

Deis Workflow Manager API
MIT License
5 stars 0 forks source link

ref(data): Rewrite CheckinAndSetCluster using gorm #127

Closed arschles closed 8 years ago

arschles commented 8 years ago

The rewrite also enabled removing code that was no longer used

Contributes to #48

Still TODO:

vdice commented 8 years ago

code LGTM; it looks like some new (or at least altered) functionality was introduced -- do units need to be updated/enhanced?

arschles commented 8 years ago

@vdice thanks. the semantics of the CheckInAndSetCluster are the same (either create or update a cluster record), but the function was misnamed (due to me misunderstanding its purpose in an earlier patch).

Additionally, the upsertCluster function was added to house the logic that CheckInAndSetCluster used to have, so that the new implementation of CheckInAndSetCluster could start a transaction, call upsertCluster, and then rollback or commit the transaction depending on the result of upsertCluster.

As a result of the above, I don't believe unit tests need to be updated. TestClusterRoundTrip should cover creating (and then updating) a cluster.