-
Notifications
You must be signed in to change notification settings - Fork 470
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
Support validation parameters for service:check #953
Conversation
packages/apollo/package.json
Outdated
@@ -60,6 +60,7 @@ | |||
"heroku-cli-util": "^8.0.9", | |||
"listr": "^0.14.1", | |||
"lodash": "^4.17.10", | |||
"moment": "^2.24.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use something lighter than moment like date-fns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked for anything to support durations with the ease-of-use + granularity that ISO 8601 gives us and no love, + discussed offline. Going to leave as is. If having moment gets too heavy, we can write a duration parser.
885b61c
to
e1f4974
Compare
* validationPeriod - the duration (from now) to validate the service against * queryCountThreshold - minimum number of requests within the requested time window for a query to be considered * queryCountThresholdPercentage - number of requests within the requested time window for a query to be considered, relative to total request count.
Throw errors from the response if we have them, then throw the generic error if no data is provided. Previously, the order of these were swapped, meaning that if a specific error came back from the server, we would still throw the generic error.
e1f4974
to
1399b04
Compare
This PR adds functionality for 3 new flags in the service:check command:
Also included in this PR - better error messaging:
EngineClient
, so that errors reported from the service will be thrownwith priority over the generic "noServiceError" when data isn't present.
TODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.