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

Three cloud example tests: cloud-js-containers, clouse-js-httpserver… #154

Merged
merged 3 commits into from
Oct 14, 2018

Conversation

daveremy
Copy link
Contributor

…, and cloud-ts-url-shortener-cache-http. Cloud-ts-url-shortener-cache-http is currently failing on the assert for reasons I am not sure of so I am going ahead and committing and pushing up to PR to get some feedback.

… and cloud-ts-url-shortener-cache-http. Cloud-ts-url-shortener-cache-http is currently failing on the assert for reasons I am not sure of so I am going ahead and committing and pushing up to PR to get some feedback.
Copy link
Member

@lukehoban lukehoban left a comment

Choose a reason for hiding this comment

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

LGTM as soon as these all pass.

"url-shortener-cache:redisPassword": "s3cr7Password",
"cloud:provider": "aws",
// Use us-west-2 to assure fargate availability
"aws:region": "us-west-2",
Copy link
Member

Choose a reason for hiding this comment

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

Nit - but likely don’t need this anymore - Fargate is in all regions we’re likely to try running these tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, ok, I though I had issues but us-west but i agree it would be better to just use the variable that all the other tests are using. i'll try changing.

Copy link
Member

@lukehoban lukehoban Oct 12, 2018

Choose a reason for hiding this comment

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

Oh - are we running these examples in us-west-1? That region isn’t generally fully up to date - should probably run in Oregon, Ohio, Virginia or Dublin just so we don’t run into regional service availability issues in the future.

// Use us-west-2 to assure fargate availability
"aws:region": "us-west-2",
"cloud-aws:useFargate": "true",
"cloud-aws:functionIncludePaths": "",
Copy link
Member

Choose a reason for hiding this comment

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

Why is this one needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure, it is in the example readme (https://github.com/pulumi/examples/tree/master/cloud-ts-url-shortener-cache-http)

  1. Add the 'www' directory to the uploaded function code so it can be served from the http server:

$ pulumi config set cloud-aws:functionIncludePaths
#or
$ pulumi config set cloud-azure:functionIncludePaths

Copy link
Member

Choose a reason for hiding this comment

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

Hmm - sounds like this might be needed but that the comment in the readme was missing some text. Cc @CyrusNajmabadi.

@@ -233,6 +280,7 @@ func assertHTTPResultWithRetry(t *testing.T, output interface{}, maxWait time.Du
count, sleep := 0, 0
for true {
now := time.Now()
fmt.Println("Getting hostname: " + hostname)
Copy link
Member

Choose a reason for hiding this comment

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

These fmt.Println calls seem to be making output from tests hard to read (not getting prefixed). Should we be using t.Log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this left from some debugging and should be removed. I don't expect the 3rd test to pass right now, it is not on my machine due to the payload not matching expectations. The example works on my machine but running it in the test runner it failes. I am stumped on the issue so I thought I'd PR it so I can share it and perhaps get some insights.

@daveremy
Copy link
Contributor Author

daveremy commented Oct 12, 2018

The CI run failed as I expected but I don't see a link to the logs themselves. On my machine I am getting a failure in the assertion (pulumi update seems to succeed):

examples_test.go:259
Error:  "{"uncaught":{"url":"/index.html","baseUrl":"","originalUrl":"/index.html","version":"v8.10.0"}}" does not contain "<title>Short URL Manager</title>"

Does this look familiar at all? I am stumped on why we are getting this payload rather than the expected web page (which I get when I run the example as specified in the example's readme).

@lukehoban
Copy link
Member

Travis logs are now two clicks away - pretty hard to find unfortunately after recent Travis changes to only use GitHub Checks. But they are there.

cloud-ts-url-shortener-cache-http.  Other minor PR feedback.
@daveremy
Copy link
Contributor Author

Created a bug for the cloud-ts-url-shortener-cache-http example (#155) and commented out the validation with a TODO.

@daveremy daveremy merged commit 0cd79d7 into master Oct 14, 2018
@pulumi-bot pulumi-bot deleted the daveremy/cloud-example-tests branch October 14, 2018 14:57
ramene pushed a commit to ramene/pulumi-kubeflow-ml that referenced this pull request Sep 7, 2019
Three cloud example tests:  cloud-js-containers, clouse-js-httpserver…
ramene pushed a commit to ramene/pulumi-kubeflow-ml that referenced this pull request Sep 13, 2019
Three cloud example tests:  cloud-js-containers, clouse-js-httpserver…
dixler pushed a commit that referenced this pull request Jan 21, 2022
Three cloud example tests:  cloud-js-containers, clouse-js-httpserver…
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.

None yet

2 participants