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

fix(batch-exports): Do not allow backfills in the future #24517

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

tomasfarias
Copy link
Contributor

@tomasfarias tomasfarias commented Aug 21, 2024

Problem

Users sometimes create backfills in the future, sometimes up to the year 3000. PostHog forecasting analytics ™️ are coming soon, until then, there are no events in the future to backfill. So, let's not allow any backfills beyond now + 1 batch period.

Changes

  • Raise validation error if requesting a backfill beyond now + 1 batch period.
  • Show a lemon toast in the frontend too:
    image

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

Added a unit test.

@tomasfarias tomasfarias requested a review from a team August 21, 2024 22:47
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

Size Change: 0 B

Total Size: 1.08 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.08 MB

compressed-size-action

@tomasfarias tomasfarias enabled auto-merge (squash) August 22, 2024 13:34
@tomasfarias tomasfarias merged commit dcf38bb into master Aug 22, 2024
93 checks passed
@tomasfarias tomasfarias deleted the fix/do-not-allow-backfills-in-future branch August 22, 2024 13:37
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.

3 participants