Skip to content

Provisioner CompleteJob should do all db operations in a transaction #17694

@Emyrk

Description

@Emyrk

func (s *server) CompleteJob(ctx context.Context, completed *proto.CompletedJob) (*proto.Empty, error) {

Is a 600 line function that does a lot of db mutations. No transaction is used, so partial db mutations can be applied.

This function should be refactored into smaller functions, and do all it's work in a tx.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions