fix(master): review fixes for drift restore and accept (#10)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-- true from a successful job until the next inventory write for the row: the
|
||||
-- True from a successful job until the next inventory write for the row. The
|
||||
-- agent's upsert arrives a debounce interval after job.result, and until then
|
||||
-- desired_ref is newer than actual_ref without the service having drifted.
|
||||
ALTER TABLE services ADD COLUMN awaiting_inventory boolean NOT NULL DEFAULT false;
|
||||
|
||||
-- move suggestions look up Compose rows by project + service across agents
|
||||
-- Move suggestions look up Compose rows by project and service across agents.
|
||||
CREATE INDEX services_by_compose_name ON services (compose_project, compose_service) WHERE kind = 'compose';
|
||||
|
||||
@@ -259,8 +259,8 @@ func (s *Store) SetPollError(ctx context.Context, ids []int64, msg string) error
|
||||
}
|
||||
|
||||
// SetLastTagDigest sets last_tag_digest; see model.Service.LastTagDigest. The
|
||||
// poller calls it, and FinishJob sets the same column after a tag job.
|
||||
// Inventory writes never change it.
|
||||
// poller and jobs.RestoreDesired call it, and FinishJob sets the same column
|
||||
// after a tag job. Inventory writes never change it.
|
||||
func (s *Store) SetLastTagDigest(ctx context.Context, id int64, digest string) error {
|
||||
if _, err := s.pool.Exec(ctx,
|
||||
`UPDATE services SET last_tag_digest = $2 WHERE id = $1`, id, digest); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user