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(subs): retry + timeout on save #863

Merged
merged 4 commits into from
Oct 3, 2024
Merged

feat(subs): retry + timeout on save #863

merged 4 commits into from
Oct 3, 2024

Conversation

michael-0acf4
Copy link
Contributor

Port and improve retry/timeout.

Migration notes

N/A

  • The change comes with new or modified tests
  • Hard-to-understand functions have explanatory comments
  • End-user documentation is updated to reflect the change

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 76.92%. Comparing base (ee0b2c4) to head (d1e8d8a).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/typegate/src/runtimes/substantial/types.ts 0.00% 4 Missing ⚠️
src/typegate/src/runtimes/substantial/agent.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #863      +/-   ##
==========================================
- Coverage   77.08%   76.92%   -0.17%     
==========================================
  Files         148      149       +1     
  Lines       17509    17720     +211     
  Branches     1721     1729       +8     
==========================================
+ Hits        13497    13631     +134     
- Misses       3993     4066      +73     
- Partials       19       23       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michael-0acf4 michael-0acf4 marked this pull request as ready for review October 2, 2024 15:51
@michael-0acf4 michael-0acf4 merged commit bbef981 into main Oct 3, 2024
19 of 21 checks passed
@michael-0acf4 michael-0acf4 deleted the retry-logic branch October 3, 2024 10:17
michael-0acf4 added a commit that referenced this pull request Oct 4, 2024
Follow up of #863
When multiple start occurs for redis, some schedules can happen
**exactly** at the same time resulting into the same identifier (and
leading to an inconsistent state).

This solution simply combines the `schedule` with the run_id making it
unique instead of using it as is.

```gql
mutation AllAtOnce {
  a: start_retry(kwargs: { .. }) # => calls add_schedule( ... date ...)
  b: start_retry(kwargs: { .. })
  c: start_retry(kwargs: { .. })
  d: start_retry(kwargs: { .. }) 
  e: start_retry(kwargs: { .. })
  f: start_retry(kwargs: { .. })
 # ..
}
```

#### Migration notes

None

- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
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