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: use dagster retry mechanism #2184

Merged
merged 5 commits into from
Sep 24, 2024
Merged

Conversation

Jabolol
Copy link
Contributor

@Jabolol Jabolol commented Sep 23, 2024

This PR updates failed queries to use Dagster's retry mechanism instead of failing silently, adjusts the data fetching to reduce nodes to 500 per query—since the Open Collective API returns 503 errors for larger queries—which seems sensible based on local testing and will require further triage, and changes the write disposition to "merge" to prevent duplicates in the dataset.

Copy link

vercel bot commented Sep 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kariba-network ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 10:06pm
oso-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 10:06pm

Copy link

@oso-prs oso-prs bot left a comment

Choose a reason for hiding this comment

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

Auto-approved! please merge responsibly 😄

@oso-prs
Copy link

oso-prs bot commented Sep 23, 2024

Test deployment unnecessary, no dbt files have been changed.

@Jabolol
Copy link
Contributor Author

Jabolol commented Sep 23, 2024

  • Added a debounced retry mechanism to handle rate limiting and data retrieval failures.
  • On encountering a 429 status, the mechanism waits 65 seconds for the rate limit to reset before retrying the request.
  • For 503 errors (which occur when Open Collective fails to return a large dataset), the mechanism retries with progressively smaller payloads: first with 1000 nodes, then 500, 250, and finally 125.
  • If all retry attempts fail, the task is marked as failed, allowing Dagster to retry it later.

@ravenac95
Copy link
Member

@Jabolol I don't think this is an issue because we have concurrency limits but this doesn't currently handle issues with concurrent connections to open collective. I think that should be fine for now, but I am stating it as a sanity check because if multiple clients hit a 429 nearly simultaneously and the rate limits are by API key, I'm not sure if their api has issues with all of those clients retrying again at approximately the same time.

@Jabolol Jabolol added this pull request to the merge queue Sep 24, 2024
Merged via the queue into main with commit c328ee8 Sep 24, 2024
8 checks passed
@Jabolol Jabolol deleted the jabolol/asset-retry-mechanism branch September 24, 2024 14:33
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.

2 participants