Repository navigation
Conversation
- Add parse_limit to services/data/db_utils.py: empty or missing _limit keeps the default of 50 and values above 500 are capped as before, while non-integer, zero and negative values raise ValueError - Use it in all 9 paginated metadata service listings (flows, runs, steps, tasks, run and task metadata, run, step and task artifacts), returning 400 "Invalid limit" instead of a 500 with a traceback for e.g. _limit=abc, and instead of a silent empty page for _limit=0 or _limit=-1 - Make decode_cursor reject cursors that decode to non-object JSON or whose cursor keys hold null or non-scalar values, so these return 400 "Invalid cursor" instead of raising TypeError in the handlers - Add unit tests for parse_limit and decode_cursor, and an integration test that sends invalid _limit and _cursor values to every paginated route Closes Netflix#503
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.
Closes #503