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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preconditions Script Checks Billing Account Format #117

Conversation

trotttrotttrott
Copy link
Contributor

Preconditions script checks that billing account is in the correct format. This will make the program fail faster should an obviously incorrect value be passed as the billing account.

In addition, this changes the json.dumps call to json.dump in the main method. This was failing with a TypeError since only dump accepts a second positional argument of a file-like object to write to.

json.dump accepts file object as second argument and writes to it.
There's no need to call `print` since it's writing to stdout.
This will make the program fail faster should an obviously incorrect
value be passed as the billing account.
@trotttrotttrott trotttrotttrott changed the title Feature/preconditions checks billing acct fmt Preconditions Script Checks Billing Account Format Jan 17, 2019
aaron-lane
aaron-lane previously approved these changes Jan 18, 2019
Copy link
Contributor

@aaron-lane aaron-lane left a comment

Choose a reason for hiding this comment

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

Tested with preconditions.sh --billing_account FOO.

@trotttrotttrott
Copy link
Contributor Author

@morgante I believe this is ready to merge. I just resolved a conflict with master. Doing so dismissed @aaron-lane's review, however, the changes that were previously approved are the same.

Copy link
Contributor

@adrienthebo adrienthebo left a comment

Choose a reason for hiding this comment

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

This change looks good. There are unrelated issues causing tests/CI to fail, so for the sake of best practices we should resolve that first - once done let's get this merged.

@adrienthebo adrienthebo merged commit df2788d into terraform-google-modules:master Jan 23, 2019
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.

4 participants