feat(api): Project key creation rate limit params#15077
Merged
markstory merged 2 commits intogetsentry:masterfrom Oct 29, 2019
Merged
feat(api): Project key creation rate limit params#15077markstory merged 2 commits intogetsentry:masterfrom
markstory merged 2 commits intogetsentry:masterfrom
Conversation
markstory
reviewed
Oct 15, 2019
|
|
||
| class RateLimitSerializer(serializers.Serializer): | ||
| count = EmptyIntegerField(min_value=0, required=False, allow_null=True) | ||
| window = EmptyIntegerField(min_value=0, max_value=60 * 60 * 24, required=False, allow_null=True) |
Member
There was a problem hiding this comment.
Could we import/reuse this serializer from the project_key_details endpoint? Perhaps this serializer and the ones defined in project_key_details could be moved to a module together?
Contributor
Author
There was a problem hiding this comment.
This is indeed a bad case of copy-paste.
I'll take a look at the codebase and try to find some instances of shared serializers to try and stay consistent
Contributor
Author
|
🆙 Moved the serializers to |
markstory
approved these changes
Oct 28, 2019
Member
markstory
left a comment
There was a problem hiding this comment.
Looks good. Just waiting on CI rebuilds to pass.
Contributor
Author
|
Thanks a lot! |
markstory
added a commit
that referenced
this pull request
Oct 30, 2019
This reverts commit 0f003ed.
markstory
added a commit
that referenced
this pull request
Oct 30, 2019
markstory
added a commit
that referenced
this pull request
Oct 31, 2019
markstory
added a commit
that referenced
this pull request
Nov 13, 2019
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #12657
This PR adds support for providing rate limit options (count and window) during project key creation.
This was previously only possible when updating a key.
Please note that this is my first time contributing to Sentry! I tried to follow the guidelines but I may have missed something, so please consider this PR as more of a draft to raise interest 🙏