Skip to content
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

feat(server): Apply quotas per item #636

Merged
merged 4 commits into from
Jun 26, 2020
Merged

feat(server): Apply quotas per item #636

merged 4 commits into from
Jun 26, 2020

Conversation

jan-auer
Copy link
Member

Invokes the rate limiter with correct data categories for all items in the envelope, sharing the same code as the rate limiting fast path.

Based on #635

@jan-auer jan-auer requested a review from a team June 25, 2020 22:36
@jan-auer jan-auer self-assigned this Jun 25, 2020
@jan-auer
Copy link
Member Author

Only look at fd6a970 for now, since the other commit is from #635. This PR will be rebased as soon as the other one is merged.

@jan-auer
Copy link
Member Author

This is ready now.

* master:
  build: Update dependencies (#637)
* master:
  test(pii): Test rough equivalency of custom rule with defaults vs builtin (#627)
# TODO: There are no outcomes emitted for attachments yet. Instead, sleep to allow Relay to
# process the event and cache the rate limit
# outcomes_consumer.assert_rate_limited("static_disabled_quota")
time.sleep(0.2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that is too short for sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hoping to get rid of this very soon. The TODO above is related to this -- we need to wait for outcomes eventually.

Right now, it seems that 200ms is enough for this particular test. If it turns out that this is flakey, we can increase it.

@jan-auer jan-auer merged commit c08e3b0 into master Jun 26, 2020
@jan-auer jan-auer deleted the feat/item-quotas branch June 26, 2020 10:25
jan-auer added a commit that referenced this pull request Jul 2, 2020
* master:
  fix(server): Do not 429 for event-only attachments (#647)
  doc(config): Remove references to advanced data scrubbing (#648)
  fix(server): Never respond with 429 for minidumps (#646)
  docs(config): Update relay end user documentation (#641)
  license: Update BSL change date
  fix: Add missing .NET 4.8 patches (#642)
  feat(server): Emit attachment sizes to Kafka (#644)
  fix(store): Use clock drift normalizer to correct all timestamp issues  (#634)
  feat(server): Emit flags for rate limited attachments (#640)
  feat(server): Enforce attachment size in rate limits (#639)
  feat(server): Apply quotas per item (#636)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants