Skip to content

fix(events): Remove old rate hack#80617

Merged
wmak merged 2 commits intomasterfrom
wmak/fix/update-rate-functions
Nov 13, 2024
Merged

fix(events): Remove old rate hack#80617
wmak merged 2 commits intomasterfrom
wmak/fix/update-rate-functions

Conversation

@wmak
Copy link
Copy Markdown
Member

@wmak wmak commented Nov 12, 2024

  • Rates used to depend on a hack at the endpoint level where interval was passed as an argument for generating charts, this updates all the rate functions to just grab interval from the builder
  • This also fixes a bug where equations on rates wouldn't work since the rate function wouldn't have the rate passed in since its hidden inside an equation

- Rates used to depend on a hack at the endpoint level where interval
  was passed as an argument for generating charts, this updates all the
  rate functions to just grab interval from the builder
- This also fixes a bug where equations on rates wouldn't work since the
  rate function wouldn't have the rate passed in since its hidden inside
  an equation
@wmak wmak requested a review from a team as a code owner November 12, 2024 20:10
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 12, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #80617       +/-   ##
===========================================
+ Coverage   51.35%   78.36%   +27.00%     
===========================================
  Files        7176     7208       +32     
  Lines      317343   318790     +1447     
  Branches    43732    43920      +188     
===========================================
+ Hits       162979   249822    +86843     
+ Misses     153242    62605    -90637     
- Partials     1122     6363     +5241     

interval = args["interval"]
return Function(
"divide",
[Function("count", []), Function("divide", [interval, 60])],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Cant you divide interval by 60 here before passing it through?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ah shoot missed this, i'll follow up

@wmak wmak merged commit a035564 into master Nov 13, 2024
@wmak wmak deleted the wmak/fix/update-rate-functions branch November 13, 2024 20:51
@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Nov 14, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ KeyError: 'interval' /api/0/organizations/{organization_id_or_slug}/... View Issue

Did you find this useful? React with a 👍 or 👎

wmak added a commit that referenced this pull request Nov 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants