:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(github): say what to do when a sync runs out of github request budget (#114880)
Tom Owers2e14bd7fa454
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.pyindex 9937e5ce4532..8081a7d52928 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/github/source.py@@ -135,6 +135,11 @@ GITHUB_WEBHOOK_EVENT_CHECKLIST: str = "\n".join(_REPOSITORY_ACCESS_GUIDANCE = "Check the spelling and that your token has read access."+RATE_LIMITED_MESSAGE = (+ "This sync used up the GitHub request limit for your connection before it finished. The next "+ "sync runs on schedule, and if this keeps happening, sync fewer tables or repositories."+)+def _join_validation_failures(failures: list[str]) -> str:"""Join the per-repository failures, with one next step for the whole list rather than one each."""@@ -390,6 +395,14 @@ If automatic creation failed with a permissions error, the fix depends on how yo"Read timed out",}+ def get_retry_exhausted_errors(self) -> dict[str, str]:+ # Without these, a rate limit that outlasts every retry leaves the raw limiter text on the+ # job, which names an internal budget and the installation id rather than a next step.+ return {+ "GitHub egress budget exhausted": RATE_LIMITED_MESSAGE,+ "GitHub API rate limit exceeded": RATE_LIMITED_MESSAGE,+ }+def get_oauth_accounts(self, integration_id: int, team_id: int, search: str | None = None) -> list[IntegrationAccount]: