Skip to content

Extra error handling for things that don't match the regex. #1149

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

Merged
merged 2 commits into from
Mar 3, 2018

Conversation

nat-henderson
Copy link
Contributor

Fixes #1136 - there was an issue with the URL returned and an IndexOutOfBounds panic from this function - seems like it can really only be this issue.

@nat-henderson nat-henderson requested a review from danawillow March 3, 2018 00:15
@nat-henderson
Copy link
Contributor Author

Running affected tests now.

@@ -368,6 +368,9 @@ func flattenNodePool(d *schema.ResourceData, config *Config, np *container.NodeP
for _, url := range np.InstanceGroupUrls {
// retrieve instance group manager (InstanceGroupUrls are actually URLs for InstanceGroupManagers)
matches := instanceGroupManagerURL.FindStringSubmatch(url)
if len(matches) < 4 {
return nil, fmt.Errorf("Error reading instance group manage URL '%s'", url)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: '%s' is equivalent to %q

@nat-henderson
Copy link
Contributor Author

All container tests passed.

@nat-henderson nat-henderson merged commit e8ffe89 into hashicorp:master Mar 3, 2018
@nat-henderson nat-henderson deleted the node-pool-regex branch March 3, 2018 01:14
@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_container_cluster crash
2 participants