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 Mocks #750

Merged
merged 35 commits into from
Jan 2, 2025
Merged

Add Actor Mocks #750

merged 35 commits into from
Jan 2, 2025

Conversation

lor1113
Copy link
Contributor

@lor1113 lor1113 commented Nov 1, 2024

New merge request made due to manually copying changes into a new branch being seemingly the only way to avoid weird git diff issues.

Description

Added Mock Actor capability.

NOTE: Due to not being able to get dapr-docs running in its own dev container despite repeated attempts (I am simply not a frontend coder so i don't know how to debug all the weird errors it was spitting out), I have not been able to actually view the new documentation within a running instance of the website. I have written it nonetheless using the same templating as the others, as well as basic markdown syntax, but it would be appreciated if someone who has a develop version of the docs website working on their machine could just give it a quick look to make sure it's not somehow broken.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #737

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

Release Note

RELEASE NOTE: ADD Mock actors for unit testing actor methods

@lor1113 lor1113 requested review from a team as code owners November 1, 2024 21:57
@lor1113 lor1113 mentioned this pull request Nov 1, 2024
3 tasks
Copy link
Contributor

@elena-kolevska elena-kolevska left a comment

Choose a reason for hiding this comment

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

I'm sorry I haven't gotten to this PR yet, we're all really busy with the 1.15 release.
I noticed you renamed one of the docs files. I think we should revert that change, because this .md is shown directly in the dapr docs: https://docs.dapr.io/developing-applications/sdks/python/python-actor/.
Also, please move the new docs you added in the existing page.

Signed-off-by: Lorenzo Curcio <[email protected]>
@lor1113
Copy link
Contributor Author

lor1113 commented Nov 11, 2024

@elena-kolevska

The file was renamed such that it would be able to have sub-files, like how the main "Extensions" page under the Python SDK documentation is called "index.md" (https://docs.dapr.io/developing-applications/sdks/python/python-sdk-extensions/) with the idea that the mock actor documentation could be confined to a sub-file for brevity.

Requested changes have been made regardless. It's now simply appended to the end of the current actor documentation.

Signed-off-by: Lorenzo Curcio <[email protected]>
@lor1113
Copy link
Contributor Author

lor1113 commented Nov 19, 2024

This should fix the formatting and type issues (with some type:ignores, but I don't think there's a better way without significant work), I also re-ran the tests to make sure they didn't break since I last checked them (worth noting that I do actually get some tests breaking, some random grpc client ones, possibly because I'm just running directly on windows and not using a dev container since it kept breaking for me). All the actor tests + the new ones I added run OK at least.

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 87.43455% with 24 lines in your changes missing coverage. Please review.

Project coverage is 86.08%. Comparing base (bffb749) to head (d095086).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
dapr/actor/runtime/mock_state_manager.py 85.00% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #750      +/-   ##
==========================================
- Coverage   86.63%   86.08%   -0.55%     
==========================================
  Files          84       89       +5     
  Lines        4473     4972     +499     
==========================================
+ Hits         3875     4280     +405     
- Misses        598      692      +94     

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

Copy link
Contributor

@elena-kolevska elena-kolevska left a comment

Choose a reason for hiding this comment

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

Looks great @lor1113!
I suggested some text cleanup in the docs (thank you for writing such a detailed guide).
As you had noticed before, there's a bug in the try_add_state method of the state manager, and I already sent a pr here: #756.
Feel free to update your mock to follow the same logic.

Two requests: please add a unit test for the mock state manager and an example for using a mock in the examples directory, that also serves as our suite of integration tests.

Again, great work!

dapr/actor/runtime/mock_actor.py Outdated Show resolved Hide resolved
daprdocs/content/en/python-sdk-docs/python-actor.md Outdated Show resolved Hide resolved
daprdocs/content/en/python-sdk-docs/python-actor.md Outdated Show resolved Hide resolved
daprdocs/content/en/python-sdk-docs/python-actor.md Outdated Show resolved Hide resolved
daprdocs/content/en/python-sdk-docs/python-actor.md Outdated Show resolved Hide resolved
daprdocs/content/en/python-sdk-docs/python-actor.md Outdated Show resolved Hide resolved
daprdocs/content/en/python-sdk-docs/python-actor.md Outdated Show resolved Hide resolved
daprdocs/content/en/python-sdk-docs/python-actor.md Outdated Show resolved Hide resolved
@@ -69,6 +70,9 @@ def __init__(self, actor: 'Actor'):
self._type_name = actor.runtime_ctx.actor_type_info.type_name

self._default_state_change_tracker: Dict[str, StateMetadata] = {}
self._mock_state: Dict[str, Any]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you don't add this, then because of the type hinting problems mentioned earlier, the _mock_state, _mock_reminders and _mock_timer variables won't be correctly type hinted by the IDE, and will show up as white unknown variables.

With those type hint stubs
image

Without

image

Yes the code would still run just fine, but it's not very nice, no?

Type hinting the MockStateManager is of no use, because (as you can see in the image) it thinks the _state_manager variable it is dealing with is an ActorStateManager instead of MockStateManager.

In my view adding these stubs to ActorStateManager is harmless (at least, I cannot think of a scenario where they might cause problems or be undesirable) so I think they're worth having.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm leaning more towards removing the _mock arguments from the main code, and rely on good documentation (which @lor1113 already did) for awareness of the properties' existence. What do you think @berndverst ?

dapr/actor/runtime/mock_state_manager.py Outdated Show resolved Hide resolved
Lorenzo Curcio and others added 4 commits December 3, 2024 10:35
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
This reverts commit 254ad17.

Signed-off-by: Lorenzo Curcio <[email protected]>
Fixing bug in try_add_state as mentioned in PR dapr#756

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
lor1113 and others added 5 commits December 3, 2024 10:37
Whoops missed this

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Copy link
Contributor

@elena-kolevska elena-kolevska left a comment

Choose a reason for hiding this comment

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

here's the fix for the examples test and a few other suggestions. Looking through the other changes now.

examples/demo_actor/demo_actor/test_demo_actor.py Outdated Show resolved Hide resolved
examples/demo_actor/README.md Outdated Show resolved Hide resolved
tests/actor/test_mock_state_manager.py Outdated Show resolved Hide resolved
lor1113 and others added 4 commits December 3, 2024 19:47
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
didnt see this earlier whoops

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
**The `_on_activate` method will not be called automatically the way it is when Dapr initializes a new Actor instance. You should call it manually as needed as part of your tests.**

The `__init__`, `register_timer`, `unregister_timer`, `register_reminder`, `unregister_reminder` methods are all overwritten by the MockActor class that gets applied as a mixin via `create_mock_actor`. If your actor itself overwrites these methods, those modifications will themselves be overwritten and the actor will likely not behave as you expect.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we suggest a workaround here? For example, creating their own mock actor wrapper, using our mock.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a bit hard to think about how to suggest a workaround here, as by definition if someone is overriding those methods they're already doing something pretty out-of-the-box where it's hard to suggest a generic fix. But I did add in something in the latest commit, see if you approve.

### Usage and Limitations

**The `_on_activate` method will not be called automatically the way it is when Dapr initializes a new Actor instance. You should call it manually as needed as part of your tests.**
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this by design, so users can have more control _on_activate? If yes, please mention that.

The actor `_runtime_ctx` variable is set to None. All the normal actor methods have been overwritten such as to not call it, but if your code itself interacts directly with `_runtime_ctx`, it will likely break.

The actor _state_manager is overwritten with an instance of `MockStateManager`. This has all the same methods and functionality of the base `ActorStateManager`, except for using the various `_mock` variables for storing data instead of the `_runtime_ctx`. If your code implements its own custom state manager it will be overwritten and your code will likely break.
Copy link
Contributor

@elena-kolevska elena-kolevska Dec 3, 2024

Choose a reason for hiding this comment

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

your code will likely break

This can sound a bit scary to users :) Let's say "tests may fail" instead.
There was another instance of the same phrasing, I think, I'd update that one too.

examples/demo_actor/README.md Outdated Show resolved Hide resolved
@@ -69,6 +70,9 @@ def __init__(self, actor: 'Actor'):
self._type_name = actor.runtime_ctx.actor_type_info.type_name

self._default_state_change_tracker: Dict[str, StateMetadata] = {}
self._mock_state: Dict[str, Any]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm leaning more towards removing the _mock arguments from the main code, and rely on good documentation (which @lor1113 already did) for awareness of the properties' existence. What do you think @berndverst ?

@elena-kolevska elena-kolevska changed the title Mock Actor merge attempt 2 (see desc) Add Actor Mocks Jan 2, 2025
@elena-kolevska elena-kolevska merged commit aafb900 into dapr:main Jan 2, 2025
14 of 15 checks passed
@elena-kolevska
Copy link
Contributor

Great work @lor1113 , thank you for your contribution and resiliency while working on getting it merged.

@lor1113 lor1113 deleted the mock-actors-3 branch January 6, 2025 20:55
elena-kolevska added a commit to famarting/python-sdk that referenced this pull request Jan 9, 2025
* Moved files to new branch to avoid weird git bug

Signed-off-by: Lorenzo Curcio <[email protected]>

* requested documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* forgot to move file back to starting point

Signed-off-by: Lorenzo Curcio <[email protected]>

* result of ruff format

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed minor formatting issues, fixed type issues

Signed-off-by: Lorenzo Curcio <[email protected]>

* minor test fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixes try_add_state

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Revert "fixes try_add_state"

This reverts commit 254ad17.

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_state_manager.py

Fixing bug in try_add_state as mentioned in PR dapr#756

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_actor.py

Whoops missed this

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* minor error in docs

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed and added more unit tests. Added example

Signed-off-by: Lorenzo Curcio <[email protected]>

* unittest fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* concentrated some tests

Signed-off-by: Lorenzo Curcio <[email protected]>

* removed unnecessary type hint

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

didnt see this earlier whoops

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* now requires #type: ignore

Signed-off-by: Lorenzo Curcio <[email protected]>

* small docs change

Signed-off-by: Elena Kolevska <[email protected]>

* examples test fix

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
@marcduiker
Copy link
Contributor

@holopin-bot @lor1113 Thank you! Here's a digital badge as a small token of appreciation.

Copy link

holopin-bot bot commented Jan 10, 2025

Congratulations @lor1113, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cm5qyo48950770clbbkopawl8

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!

elena-kolevska added a commit that referenced this pull request Jan 14, 2025
* Bump codecov/codecov-action from 4 to 5 (#753)

      Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: Elena Kolevska <[email protected]>

* update durabletask to use fork

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* add purge workflow function

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support reuse id policy

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support set custom status

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/tests/test_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* update test, grpc version and lint

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Adds missing arguments in FakeTaskHubGrpcClient

Signed-off-by: Elena Kolevska <[email protected]>

* linter

Signed-off-by: Elena Kolevska <[email protected]>

* remove alpha for workflow stable release (#760)

Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Replace deprecated tox.ini option (#762)

This option was replaced in 2020, deprecated, and eventually removed in
tox 4. The correct option already appears elseware in this tox.ini file.

This fix is necessary to run `tox -e doc` per the README.md
instructions on tox 4.

Signed-off-by: Eric Searcy <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Add Actor Mocks (#750)

* Moved files to new branch to avoid weird git bug

Signed-off-by: Lorenzo Curcio <[email protected]>

* requested documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* forgot to move file back to starting point

Signed-off-by: Lorenzo Curcio <[email protected]>

* result of ruff format

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed minor formatting issues, fixed type issues

Signed-off-by: Lorenzo Curcio <[email protected]>

* minor test fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixes try_add_state

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Revert "fixes try_add_state"

This reverts commit 254ad17.

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_state_manager.py

Fixing bug in try_add_state as mentioned in PR #756

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_actor.py

Whoops missed this

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* minor error in docs

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed and added more unit tests. Added example

Signed-off-by: Lorenzo Curcio <[email protected]>

* unittest fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* concentrated some tests

Signed-off-by: Lorenzo Curcio <[email protected]>

* removed unnecessary type hint

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

didnt see this earlier whoops

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* now requires #type: ignore

Signed-off-by: Lorenzo Curcio <[email protected]>

* small docs change

Signed-off-by: Elena Kolevska <[email protected]>

* examples test fix

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Fixes try_add_state in actor state manger (#756)

Signed-off-by: Elena Kolevska <[email protected]>

* Integration test for http invocation (#758)

Signed-off-by: Elena Kolevska <[email protected]>

* fixes missing state store in test (#759)

Signed-off-by: Elena Kolevska <[email protected]>

* Mark workflows API functions as deprecated  (#749)

* workflows, remove deprecated functions

Signed-off-by: Fabian Martinez <[email protected]>

* revert changes to example

Signed-off-by: Fabian Martinez <[email protected]>

* update warning messages

Signed-off-by: Fabian Martinez <[email protected]>

* Typos

Signed-off-by: Elena Kolevska <[email protected]>

* fixes linter

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Removes support for 3.8 and adds 3.13 to test version matrix (#763)

Signed-off-by: Elena Kolevska <[email protected]>

* Updates dapr email to dapr.io (#764)

Signed-off-by: Elena Kolevska <[email protected]>

* Reverts grpc bump

Signed-off-by: Elena Kolevska <[email protected]>

* Updates protos and fixes grpc-tools for protos generation (#766)

* Updates protos and fixes grpc-tools for protos generation

Signed-off-by: Elena Kolevska <[email protected]>

* bumps grpcio tools version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>

* Bump dapr/durabletask version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Eric Searcy <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
Co-authored-by: Eric Searcy <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
elena-kolevska pushed a commit to elena-kolevska/python-sdk that referenced this pull request Jan 14, 2025
* Bump codecov/codecov-action from 4 to 5 (dapr#753)

      Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: Elena Kolevska <[email protected]>

* update durabletask to use fork

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* add purge workflow function

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support reuse id policy

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support set custom status

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/tests/test_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* update test, grpc version and lint

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Adds missing arguments in FakeTaskHubGrpcClient

Signed-off-by: Elena Kolevska <[email protected]>

* linter

Signed-off-by: Elena Kolevska <[email protected]>

* remove alpha for workflow stable release (dapr#760)

Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Replace deprecated tox.ini option (dapr#762)

This option was replaced in 2020, deprecated, and eventually removed in
tox 4. The correct option already appears elseware in this tox.ini file.

This fix is necessary to run `tox -e doc` per the README.md
instructions on tox 4.

Signed-off-by: Eric Searcy <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Add Actor Mocks (dapr#750)

* Moved files to new branch to avoid weird git bug

Signed-off-by: Lorenzo Curcio <[email protected]>

* requested documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* forgot to move file back to starting point

Signed-off-by: Lorenzo Curcio <[email protected]>

* result of ruff format

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed minor formatting issues, fixed type issues

Signed-off-by: Lorenzo Curcio <[email protected]>

* minor test fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixes try_add_state

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Revert "fixes try_add_state"

This reverts commit 254ad17.

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_state_manager.py

Fixing bug in try_add_state as mentioned in PR dapr#756

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_actor.py

Whoops missed this

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* minor error in docs

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed and added more unit tests. Added example

Signed-off-by: Lorenzo Curcio <[email protected]>

* unittest fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* concentrated some tests

Signed-off-by: Lorenzo Curcio <[email protected]>

* removed unnecessary type hint

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

didnt see this earlier whoops

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* now requires #type: ignore

Signed-off-by: Lorenzo Curcio <[email protected]>

* small docs change

Signed-off-by: Elena Kolevska <[email protected]>

* examples test fix

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Fixes try_add_state in actor state manger (dapr#756)

Signed-off-by: Elena Kolevska <[email protected]>

* Integration test for http invocation (dapr#758)

Signed-off-by: Elena Kolevska <[email protected]>

* fixes missing state store in test (dapr#759)

Signed-off-by: Elena Kolevska <[email protected]>

* Mark workflows API functions as deprecated  (dapr#749)

* workflows, remove deprecated functions

Signed-off-by: Fabian Martinez <[email protected]>

* revert changes to example

Signed-off-by: Fabian Martinez <[email protected]>

* update warning messages

Signed-off-by: Fabian Martinez <[email protected]>

* Typos

Signed-off-by: Elena Kolevska <[email protected]>

* fixes linter

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Removes support for 3.8 and adds 3.13 to test version matrix (dapr#763)

Signed-off-by: Elena Kolevska <[email protected]>

* Updates dapr email to dapr.io (dapr#764)

Signed-off-by: Elena Kolevska <[email protected]>

* Reverts grpc bump

Signed-off-by: Elena Kolevska <[email protected]>

* Updates protos and fixes grpc-tools for protos generation (dapr#766)

* Updates protos and fixes grpc-tools for protos generation

Signed-off-by: Elena Kolevska <[email protected]>

* bumps grpcio tools version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>

* Bump dapr/durabletask version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Eric Searcy <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
Co-authored-by: Eric Searcy <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
# Conflicts:
#	ext/dapr-ext-workflow/setup.cfg
elena-kolevska added a commit to elena-kolevska/python-sdk that referenced this pull request Jan 14, 2025
* Bump codecov/codecov-action from 4 to 5 (dapr#753)

      Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: Elena Kolevska <[email protected]>

* update durabletask to use fork

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* add purge workflow function

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support reuse id policy

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support set custom status

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/tests/test_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* update test, grpc version and lint

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Adds missing arguments in FakeTaskHubGrpcClient

Signed-off-by: Elena Kolevska <[email protected]>

* linter

Signed-off-by: Elena Kolevska <[email protected]>

* remove alpha for workflow stable release (dapr#760)

Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Replace deprecated tox.ini option (dapr#762)

This option was replaced in 2020, deprecated, and eventually removed in
tox 4. The correct option already appears elseware in this tox.ini file.

This fix is necessary to run `tox -e doc` per the README.md
instructions on tox 4.

Signed-off-by: Eric Searcy <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Add Actor Mocks (dapr#750)

* Moved files to new branch to avoid weird git bug

Signed-off-by: Lorenzo Curcio <[email protected]>

* requested documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* forgot to move file back to starting point

Signed-off-by: Lorenzo Curcio <[email protected]>

* result of ruff format

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed minor formatting issues, fixed type issues

Signed-off-by: Lorenzo Curcio <[email protected]>

* minor test fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixes try_add_state

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Revert "fixes try_add_state"

This reverts commit 254ad17.

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_state_manager.py

Fixing bug in try_add_state as mentioned in PR dapr#756

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_actor.py

Whoops missed this

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* minor error in docs

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed and added more unit tests. Added example

Signed-off-by: Lorenzo Curcio <[email protected]>

* unittest fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* concentrated some tests

Signed-off-by: Lorenzo Curcio <[email protected]>

* removed unnecessary type hint

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

didnt see this earlier whoops

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* now requires #type: ignore

Signed-off-by: Lorenzo Curcio <[email protected]>

* small docs change

Signed-off-by: Elena Kolevska <[email protected]>

* examples test fix

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Fixes try_add_state in actor state manger (dapr#756)

Signed-off-by: Elena Kolevska <[email protected]>

* Integration test for http invocation (dapr#758)

Signed-off-by: Elena Kolevska <[email protected]>

* fixes missing state store in test (dapr#759)

Signed-off-by: Elena Kolevska <[email protected]>

* Mark workflows API functions as deprecated  (dapr#749)

* workflows, remove deprecated functions

Signed-off-by: Fabian Martinez <[email protected]>

* revert changes to example

Signed-off-by: Fabian Martinez <[email protected]>

* update warning messages

Signed-off-by: Fabian Martinez <[email protected]>

* Typos

Signed-off-by: Elena Kolevska <[email protected]>

* fixes linter

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Removes support for 3.8 and adds 3.13 to test version matrix (dapr#763)

Signed-off-by: Elena Kolevska <[email protected]>

* Updates dapr email to dapr.io (dapr#764)

Signed-off-by: Elena Kolevska <[email protected]>

* Reverts grpc bump

Signed-off-by: Elena Kolevska <[email protected]>

* Updates protos and fixes grpc-tools for protos generation (dapr#766)

* Updates protos and fixes grpc-tools for protos generation

Signed-off-by: Elena Kolevska <[email protected]>

* bumps grpcio tools version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>

* Bump dapr/durabletask version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Eric Searcy <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
Co-authored-by: Eric Searcy <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
elena-kolevska added a commit that referenced this pull request Jan 14, 2025
* Removes support for 3.8 and adds 3.13 to test version matrix (#763)

Signed-off-by: Elena Kolevska <[email protected]>

* Updates protos and fixes grpc-tools for protos generation (#766)

* Updates protos and fixes grpc-tools for protos generation

Signed-off-by: Elena Kolevska <[email protected]>

* bumps grpcio tools version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>

* Add DaprInternalError.as_json_safe_dict for actors (#765)

The FastAPI and Flask extensions for actors serialise the value of
any raised DaprInternalError to JSON, which fails if the error
contains bytes in its `_raw_response_bytes` field.

This change adds a new `as_json_safe_dict` method and uses it in
place of the `as_dict` method in the FastAPI and Flask extensions.

Two unit tests for the `as_json_safe_dict` method are included.

Signed-off-by: Billy Brown <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* workflows: update durabletask dependency (#757)

* Bump codecov/codecov-action from 4 to 5 (#753)

      Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: Elena Kolevska <[email protected]>

* update durabletask to use fork

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* add purge workflow function

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support reuse id policy

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* support set custom status

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/tests/test_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Update ext/dapr-ext-workflow/dapr/ext/workflow/dapr_workflow_client.py

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* update test, grpc version and lint

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Adds missing arguments in FakeTaskHubGrpcClient

Signed-off-by: Elena Kolevska <[email protected]>

* linter

Signed-off-by: Elena Kolevska <[email protected]>

* remove alpha for workflow stable release (#760)

Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Replace deprecated tox.ini option (#762)

This option was replaced in 2020, deprecated, and eventually removed in
tox 4. The correct option already appears elseware in this tox.ini file.

This fix is necessary to run `tox -e doc` per the README.md
instructions on tox 4.

Signed-off-by: Eric Searcy <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Add Actor Mocks (#750)

* Moved files to new branch to avoid weird git bug

Signed-off-by: Lorenzo Curcio <[email protected]>

* requested documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* forgot to move file back to starting point

Signed-off-by: Lorenzo Curcio <[email protected]>

* result of ruff format

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed minor formatting issues, fixed type issues

Signed-off-by: Lorenzo Curcio <[email protected]>

* minor test fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixes try_add_state

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Revert "fixes try_add_state"

This reverts commit 254ad17.

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_state_manager.py

Fixing bug in try_add_state as mentioned in PR #756

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update dapr/actor/runtime/mock_actor.py

Whoops missed this

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* minor error in docs

Signed-off-by: Lorenzo Curcio <[email protected]>

* fixed and added more unit tests. Added example

Signed-off-by: Lorenzo Curcio <[email protected]>

* unittest fix

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* concentrated some tests

Signed-off-by: Lorenzo Curcio <[email protected]>

* removed unnecessary type hint

Signed-off-by: Lorenzo Curcio <[email protected]>

* Update daprdocs/content/en/python-sdk-docs/python-actor.md

didnt see this earlier whoops

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* Update examples/demo_actor/README.md

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>

* documentation changes

Signed-off-by: Lorenzo Curcio <[email protected]>

* now requires #type: ignore

Signed-off-by: Lorenzo Curcio <[email protected]>

* small docs change

Signed-off-by: Elena Kolevska <[email protected]>

* examples test fix

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Fixes try_add_state in actor state manger (#756)

Signed-off-by: Elena Kolevska <[email protected]>

* Integration test for http invocation (#758)

Signed-off-by: Elena Kolevska <[email protected]>

* fixes missing state store in test (#759)

Signed-off-by: Elena Kolevska <[email protected]>

* Mark workflows API functions as deprecated  (#749)

* workflows, remove deprecated functions

Signed-off-by: Fabian Martinez <[email protected]>

* revert changes to example

Signed-off-by: Fabian Martinez <[email protected]>

* update warning messages

Signed-off-by: Fabian Martinez <[email protected]>

* Typos

Signed-off-by: Elena Kolevska <[email protected]>

* fixes linter

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

* Apply suggestions from code review

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

* Removes support for 3.8 and adds 3.13 to test version matrix (#763)

Signed-off-by: Elena Kolevska <[email protected]>

* Updates dapr email to dapr.io (#764)

Signed-off-by: Elena Kolevska <[email protected]>

* Reverts grpc bump

Signed-off-by: Elena Kolevska <[email protected]>

* Updates protos and fixes grpc-tools for protos generation (#766)

* Updates protos and fixes grpc-tools for protos generation

Signed-off-by: Elena Kolevska <[email protected]>

* bumps grpcio tools version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>

* Bump dapr/durabletask version

Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Eric Searcy <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
Co-authored-by: Eric Searcy <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>

---------

Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Billy Brown <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Eric Searcy <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Billy Brown <[email protected]>
Co-authored-by: Fabian Martinez <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hannah Hunter <[email protected]>
Co-authored-by: Eric Searcy <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
Co-authored-by: Lorenzo Curcio <[email protected]>
@elena-kolevska elena-kolevska added this to the v1.15 milestone Jan 28, 2025
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.

[FEATURE REQUEST] Mock actor objects for using testing
3 participants