Skip to content

Commit

Permalink
Don't patch ansibleee if the job has completed
Browse files Browse the repository at this point in the history
This would avoid running completed jobs for any changes to
AEE spec including the runner image.
  • Loading branch information
rabi committed Jul 25, 2024
1 parent a60b6be commit c548231
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/dataplane/util/ansible_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ func AnsibleExecution(
if err != nil && !k8serrors.IsNotFound(err) {
return err
}

// Don't patch and re-run jobs if the job status is already completed.
if ansibleEE != nil && ansibleEE.Status.JobStatus == ansibleeev1.JobStatusSucceeded {
return nil
}

if ansibleEE == nil {
ansibleEE = &ansibleeev1.OpenStackAnsibleEE{
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit c548231

Please sign in to comment.