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

Add actor state ttl support #704

Merged
merged 6 commits into from
May 1, 2024

Conversation

KentHsu
Copy link
Contributor

@KentHsu KentHsu commented Apr 29, 2024

Description

This PR follows go-sdk's implementation to support actor state TTL feature
Added set_state_ttl method, updated save_state method in state_manager and added more tests
Updated state_change and state_async_provider with TTL and fix test_save_state

Issue reference

Please reference the issue this PR will close: #560

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@KentHsu KentHsu requested review from a team as code owners April 29, 2024 06:18
berndverst
berndverst previously approved these changes Apr 30, 2024
Copy link
Member

@berndverst berndverst left a comment

Choose a reason for hiding this comment

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

看起來不錯。感謝你的貢獻!😄

Copy link
Member

@berndverst berndverst left a comment

Choose a reason for hiding this comment

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

Can you please fix the linter errors? You can run the linter locally with tox -e flake8.

Thanks!

(And it will also help to run the type checker locally tox -e type and tox -e mypy)

@berndverst
Copy link
Member

Apparently the lint changes might be caused by our new autoformatter. Let me see if I can revert that :)

Signed-off-by: Bernd Verst <[email protected]>
@berndverst berndverst force-pushed the add-actor-state-ttl-support branch from a27eb96 to 208484c Compare May 1, 2024 00:07
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.35%. Comparing base (fc0e9d1) to head (208484c).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #704      +/-   ##
==========================================
- Coverage   86.37%   86.35%   -0.02%     
==========================================
  Files          79       82       +3     
  Lines        4094     4193      +99     
==========================================
+ Hits         3536     3621      +85     
- Misses        558      572      +14     

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

@berndverst berndverst merged commit de8b454 into dapr:main May 1, 2024
18 checks passed
@marcduiker
Copy link
Contributor

@holopin-bot @KentHsu Thank you!

Copy link

holopin-bot bot commented May 7, 2024

Congratulations @KentHsu, you just earned a badge! Here it is: https://holopin.io/claim/clvwgbhp1125910fjmiu9udpu8

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

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.

Preview Feature Support: Add Actor State TTL support
3 participants