Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky GetLastExecutedPlanStatus #959

Merged
merged 4 commits into from
Oct 18, 2019
Merged

Fix flaky GetLastExecutedPlanStatus #959

merged 4 commits into from
Oct 18, 2019

Conversation

alenkacz
Copy link
Contributor

@alenkacz alenkacz commented Oct 17, 2019

What this PR does / why we need it:
馃う鈥嶁檧 pointers in for-cycle. Again.

Look at like 167, where I take pointer of p. Then in the second iteration I was comparing p and lastExecuted, which was &p which was the same thing.

Fixes #947

@@ -159,7 +159,8 @@ func (i *Instance) GetLastExecutedPlanStatus() *PlanStatus {
return activePlan
}
var lastExecutedPlan *PlanStatus
for _, p := range i.Status.PlanStatus {
for n, _ := range i.Status.PlanStatus {
p := i.Status.PlanStatus[n]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the fix

Copy link
Member

@nfnt nfnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alenkacz alenkacz merged commit 3481feb into master Oct 18, 2019
@alenkacz alenkacz deleted the av/for-cycle-flake branch October 18, 2019 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestGetLastExecutedPlanStatus looks flakey
2 participants