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

Wait for service to come up before tearing it down #257

Merged
merged 2 commits into from
Mar 12, 2019

Conversation

CyrusNajmabadi
Copy link
Contributor

No description provided.

// export just the hostname property of the container frontend
exports.hostname = pulumi.interpolate `http://${listener.endpoint.hostname}`;
// expose some APIs meant for testing purposes.
let api = new awsx.apigateway.API("containers", {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed?

Unfortunately - I don't think we should put anything in the examples that is overtly for testing purposes. The examples really do need to stay focused on being user-facing examples. If we can find ways to make them more testable while still being great purely as examples - we should do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gotcha... the main issue here is one of timing. it looks like there's an issue with terraform where they can end up doing things badly if destroy happens quickly after create: hashicorp/terraform#2902

They identify a potential problem being that the service should not be destroyed here before rolepolicies it depends on are destroyed. However, in our case, becaues we're using awsvpc we don't pass along roles/policies to our service.

This was a attempt at a cludgy workaround by at least having some validation wait until the service was up and running properly before tearing it down. I'm not quite sure the best way to actually handle this. Note: i don't really mind having the API here. It doesn't seem unreasonable given that the example if launching an nginx instance and pointing to some html.

@CyrusNajmabadi
Copy link
Contributor Author

I'm going to merge in for now to help with test stability. I'm also opening a tracking issue of a better way to deal with this general issue.

@CyrusNajmabadi CyrusNajmabadi merged commit 705ef3e into master Mar 12, 2019
@pulumi-bot pulumi-bot deleted the testValidation branch March 12, 2019 08:02
ramene pushed a commit to ramene/pulumi-kubeflow-ml that referenced this pull request Sep 7, 2019
ramene pushed a commit to ramene/pulumi-kubeflow-ml that referenced this pull request Sep 13, 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.

2 participants