Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Oct 10, 2019

Fix a bug from 37a7f49 (#2214), where failFast=false lead to all deleteEC2Subnet errors being ignored. Luckily we have failFast: true for them, so no exposed change, but fixing this bug protects us from exposing it if we toggle failFast in the future.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 10, 2019
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not sure what this assignment wants to achieve, err is from DescribeSubnets call

Copy link
Member Author

Choose a reason for hiding this comment

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

We only enter this loop when err from DescribeSubnets was nill. This commit just recycles that variable for the first deleteEC2Subnet error.

Copy link
Member Author

Choose a reason for hiding this comment

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

Aaand I need to return err at tge end ;).

Copy link
Member Author

Choose a reason for hiding this comment

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

Aaand I need to return err at [the] end ;).

Done with cdb8e0cdd->013ff7a70.

Copy link
Contributor

Choose a reason for hiding this comment

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

So this captures first failure, eats it and returns that , while all following errors are only logged at debug.

This is a weird behavior.. do we have a problem if we just collect them and report all at the end?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a weird behavior.. do we have a problem if we just collect them and report all at the end?

Sure, but we're just going to log it and throw the error out later.

Copy link
Member Author

Choose a reason for hiding this comment

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

What I have now is very similar to the existing lastError log-and-forget pattern we have here, etc.. How extensively do you want me to rewrite this package?

Copy link
Contributor

Choose a reason for hiding this comment

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

What I have now is very similar to the existing lastError log-and-forget pattern we have here, etc

Yeah, I was looking at other functions. So let's keep this behavior consistent at least with existing for now.

But maybe can we use the lastError, err like others compared to this err shadowing, err2 to be more readable.

Copy link
Member Author

Choose a reason for hiding this comment

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

But maybe can we use the lastError...

Rerolled to use lastError with 013ff7a70 -> 58524d5.

Copy link
Contributor

@abhinavdahiya abhinavdahiya Oct 11, 2019

Choose a reason for hiding this comment

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

This eats the first error all together ;) maybe that's fine as that's what other places do

@wking wking force-pushed the fail-slow-error-logging branch from cdb8e0c to 013ff7a Compare October 11, 2019 00:37
Fix a bug from 37a7f49 (pkg/destroy/aws: Delete subnets by VPC,
2019-08-13, openshift#2214), where failFast=false lead to all deleteEC2Subnet
errors being ignored.  Luckily we have 'failFast: true' for them, so
no exposed change, but fixing this bug protects us from exposing it if
we toggle failFast in the future.
@wking wking force-pushed the fail-slow-error-logging branch from 013ff7a to 58524d5 Compare October 11, 2019 04:31
@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 11, 2019
@openshift-ci-robot
Copy link
Contributor

@wking: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 58524d5 link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 3f77881 into openshift:master Oct 11, 2019
@wking wking deleted the fail-slow-error-logging branch October 11, 2019 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants