Skip to content

Commit

Permalink
squash! squash! Check that a promotion isn't invoked repeatedly
Browse files Browse the repository at this point in the history
This replaces the check that the target env is running the latest
revision, with a check that the promotion has been triggered. We may
in practice want to do both -- perhaps some other process noticed the
promotion was pending, and effected it.
  • Loading branch information
squaremo committed Nov 23, 2023
1 parent 37bd56e commit e3b40a6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions controllers/leveltriggered/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,6 @@ func (r *PipelineReconciler) promoteLatestRevision(ctx context.Context, pipeline
return err
}

func checkAnyTargetHasRevision(env *v1alpha1.EnvironmentStatus, revision string) bool {
for _, target := range env.Targets {
if target.Revision == revision {
return true
}
}

return false
}

func checkAllTargetsRunRevision(env *v1alpha1.EnvironmentStatus, revision string) bool {
for _, target := range env.Targets {
if target.Revision != revision {
Expand Down

0 comments on commit e3b40a6

Please sign in to comment.