-
Notifications
You must be signed in to change notification settings - Fork 85
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(infraflow): report last error for wait functions #970
Conversation
@hown3d Thank you for your contribution. |
Thank you @hown3d for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
40318ac
to
7e2bc83
Compare
The current verify-error was due to the commit on master this PR was based on, should be good after a rebase. While you're at it/in case you're up for it, the release note currently is not right (
the inner |
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
7e2bc83
to
bc0fea0
Compare
if _, ok := err.(gophercloud.ErrDefault409); !ok { | ||
return err | ||
} | ||
} | ||
if _, ok := err.(gophercloud.ErrDefault409); !ok { | ||
return err | ||
if err == nil { | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this look better:
if _, ok := err.(gophercloud.ErrDefault409); !ok {
return err
}
continue
}
return nil
It's not entirely on this PR for the style change but it looks more readable in my opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/test |
Testrun: e2e-rms84 +---------------------+-----------------------------+-----------+----------+ | NAME | STEP | PHASE | DURATION | +---------------------+-----------------------------+-----------+----------+ | infrastructure-test | infrastructure-test | Succeeded | 11m39s | | infrastructure-test | infrastructure-test-flow | Succeeded | 11m8s | | infrastructure-test | infrastructure-test-migrate | Succeeded | 11m20s | | infrastructure-test | infrastructure-test-recover | Succeeded | 13m20s | | bastion-test | bastion-test | Succeeded | 10m45s | +---------------------+-----------------------------+-----------+----------+ |
How to categorize this PR?
/area quality
/kind enhancement
/platform openstack
What this PR does / why we need it:
Adds the last error seen for Wait functions to the returned error if a context is done.
If a user adds servers into the network created by the extension and attaches a floating IP to it, openstack will report with an 409 error which is explicitly filtered out in the functions. If a timeout occurs and the context is canceled, infraflow will only report context canceled in the infrastructure
status.lastError
field. Therefore is hard to understand why the task failed in the first place.Example of the new error format:
Special notes for your reviewer:
Replace
time.Sleep
functions with atime.Ticker
and use select.Release note: