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

Functional test script update to wait for the service to start up after the deployment #7799

Merged
merged 1 commit into from Jan 9, 2020

Conversation

@agr
Copy link
Contributor

agr commented Jan 7, 2020

Progress on NuGet/Engineering#2863

App service deployment reports success way before the service initialization completes successfully and is able to serve requests. This breaks our tests that encounter 502 responses and fail.
This change adds a delay and a response test to the test run script to make sure we run tests against the working service.

$galleryUrl = $configuration.$baseUrlPropertyName
$response = $null
Write-Host "$(Get-Date -Format s) Sleeping before querying the service";
Start-Sleep -Seconds 120

This comment has been minimized.

Copy link
@shishirx34

shishirx34 Jan 7, 2020

Contributor

why wait for 2 mins if you are going to wait until non-502 below. Can't we simply wait on non-502? i.e. if the service wakes up before 2 mins we are good, likely won't, but future improvements might(?).

This comment has been minimized.

Copy link
@agr

agr Jan 9, 2020

Author Contributor

I've seen situations when by the time script runs old version is still being served for the URLs being tested. Azure support claims it shouldn't happen, but I've definitely run into the check passing, followed by tests getting 502's. Delay is an attempt to mitigate that.

This comment has been minimized.

Copy link
@joelverhagen

joelverhagen Jan 9, 2020

Member

Can we hit an endpoint and poll until we see a release label (or some other stamp indicating the new deployment is live)?

This comment has been minimized.

Copy link
@zhhyu

zhhyu Jan 9, 2020

Contributor

Maybe it's better that we also pass the configuration to set up this parameter? I wonder this time may not be a stable one, and we may need to tune this parameter later, or use other better approaches.

This comment has been minimized.

Copy link
@agr

agr Jan 9, 2020

Author Contributor

It would need a mechanism to pass the deployment label to Cloud services, which we don't currently have. And inventing one sounds unreasonable given that we move off them. We can optimize that later, when we don't have to support cloud service.

Copy link
Member

joelverhagen left a comment

Consider polling a endpoint that returns "release label" until the expected value appears. That would avoid the arbitrary "wait for 2 minutes"

@agr agr merged commit 6dc57ef into dev Jan 9, 2020
2 checks passed
2 checks passed
NuGetGallery - CI #66814 succeeded
Details
license/cla All CLA requirements met.
Details
@agr agr deleted the agr-ft-script branch Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.