Repository navigation
feat(python-timefreeze): a /health route for readiness probes - #108
Merged
Merged
Conversation
keploy's python-linux CI lane replays this app with a fixed --delay 30: the app has no route a readiness probe can GET for a 2xx (/ is a 404, and every item route needs a token), so keploy test --health-url, which waits for a 2xx, cannot be used. On a loaded runner an app slower than 30 s to serve gets its tests fired before it is up.
GET /health answers 200 {"status": "ok"} once the app serves. It needs no token and touches no state, so a probe recorded as a test case replays the same. apis.txt lists it.
Signed-off-by: slayerjain <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
python-timefreeze has no route a readiness probe can GET for a 2xx:
/returns 404, and every item route needs a token. So keploy's python-linux CI lane (keploy/enterprise.ci/scripts/python-linux.sh) can't usekeploy test --health-url, and replays with a fixed--delay 30instead. On a loaded runner, an app that takes longer than 30 s to start gets its tests fired before it is serving.This adds
GET /health, which returns 200{"status": "ok"}once the app serves. It needs no token and touches no state, so if a probe gets recorded as a test case, it replays the same.apis.txtlists it.The enterprise lane change that uses it follows. It needs this merged first, because CI clones samples-python
main.Tested locally:
GET /healthreturns 200, and/registeris unchanged.