Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

tests: Log network interfaces before and after destroy #2157

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

mxinden
Copy link
Contributor

@mxinden mxinden commented Oct 17, 2017

For better upstream Terraform debugging we would like to log the network
interfaces related to the VPC. For further details see:
hashicorp/terraform-provider-aws#1051

@erikkn This change will add something along the lines of this to the test log:

{
    "NetworkInterfaces": 
           ...
}

The goal would be to be able to analyse this with the Elastic search project. Should I log any particular keyword before or after so we can extract it from the logs?

@coreosbot
Copy link

Can one of the admins verify this patch?

s-urbaniak
s-urbaniak previously approved these changes Oct 17, 2017
Copy link
Contributor

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

I'll defer the actual implementation review to @alexsomesan, but if it does what it is supposed to do, I have no objection once green ;-)

describe_network_interfaces
end

def describe_network_interfaces
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 afraid such debug sections will be forgotten around the code once the issues get fixed.
Do you think it makes sense to gate these sections with an environment variable flag so that they only run while that var is set? That way we can also grep the tests code for that var name to discover any stale debug statements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexsomesan Would a comment with a keyword like DEBUG be enough? This way we can grep for it in the code base.

@mxinden
Copy link
Contributor Author

mxinden commented Oct 20, 2017

It fails on the second go, as in the best case there are no network interfaces no more. I will look into it.

@squat
Copy link
Contributor

squat commented Oct 30, 2017

@alexsomesan @mxinden is this ready?

@mxinden
Copy link
Contributor Author

mxinden commented Oct 30, 2017

@squat Added one small refactoring. I will request for review once ready.

@alexsomesan Any opinion on #2157 (comment) ?

@mxinden
Copy link
Contributor Author

mxinden commented Oct 31, 2017

@squat @alexsomesan Could you give this another review?

@s-urbaniak
Copy link
Contributor

@mxinden taking over, as INST-288 has been priorized

For better upstream Terraform debugging we would like to log the network
interfaces related to the VPC. For further details see:
hashicorp/terraform-provider-aws#1051
@mxinden
Copy link
Contributor Author

mxinden commented Nov 9, 2017

ok to test

@mxinden
Copy link
Contributor Author

mxinden commented Nov 10, 2017

@s-urbaniak @alexsomesan Tests are all green. Can you approve once again, so I can merge?

@s-urbaniak s-urbaniak merged commit 7bee15d into coreos:master Nov 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants