fix(compute/deploy): service availability #875
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes the following modifications to the service availability check...
--status-check-codeto be used as the 'expected status code' within the service availability check.Screenshots
In the first screenshot, we can see the service availability check (eventually) received a non-500 status code, which signified the service was deployed to/available from the user's nearest Fastly POP...
When running the
fastly compute deploycommand a second time after we already deployed the first time, we see there is no service availability check executed...In the following screenshot, we can see the service availability check 'in-flight' (i.e. running) and that it contains a timeout which helps users to see that the CLI has not stalled...
In the following screenshot, we can see what happens when a timeout is reached. In the default case we're looking for a non-500 and so the WARNING message indicates this...
Whereas the next screenshot demonstrates how the WARNING message changes when the user sets the
--status-check-codeflag, which tells the CLI the user expects a specific status code from the endpoint being checked...Finally, the following screenshot demonstrates a contrived example where a user expects their application to return a 500 by setting
--status-check-codeand thus the service availability check finishes almost immediately (but this doesn't mean the service is available and has returned an explicit 500, it's more likely in this scenario that the app hasn't reached the user's nearest POP and so the lookup has failed with a "No service available")...