Skip to content

Conversation

@RyanLettieri
Copy link
Contributor

@RyanLettieri RyanLettieri commented Jan 22, 2025

This PR adds in the completion token to the worker.py class for DTS to understand when a task or work item is complete.

This PR also adds in an example of using the DTS backend and updates the README to reflect the necessary steps

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

The code changes look good, though I have feedback on the sample and README.

Signed-off-by: Ryan Lettieri <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
Copy link
Member

@torosent torosent left a comment

Choose a reason for hiding this comment

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

Please add pip install azure-identity

@RyanLettieri RyanLettieri force-pushed the durabletask-scheduler branch from 05af892 to 6050771 Compare January 28, 2025 18:00
Signed-off-by: Ryan Lettieri <[email protected]>
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Haven't finished reviewing the whole thing yet, but have some fairly significant feedback for what I've reviewed so far.

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

The updated design is looking great. A few technical things that we still need to clean up. I haven't reviewed everything quite yet, though.

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

I think we're super close. A few more things to clean up.

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Looks like the tests are failing, but just a couple more things in addition to that.

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

OK, changes look good. I'll sign off after doing some local validation. I may add another commit as well depending on how things go.

Copy link
Member

@torosent torosent left a comment

Choose a reason for hiding this comment

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

LGTM

@berndverst
Copy link
Member

berndverst commented Feb 14, 2025

EDIT: Never mind - I see the pyproject is nested. All good there.

But it feels weird to have a top level pyproject and then another pyproject somewhere in a nested folder. Maybe we could consider rearranging that structure in the future.

@berndverst
Copy link
Member

berndverst commented Feb 14, 2025

durabletask/azuremanaged/internal/access_token_manager.py:28: error: Incompatible types in assignment (expression has type "None", variable has type "datetime")  [assignment]

While this is not strictly necessary - it may be a good idea to use type hints throughout. For example here we have an attribute that has a datetime but also None assigned to it. I ran mypy for type checking which produced the error. So if we were to introduce types (which can help make debugging and reasoning about core correctness easier) we should make this Optional[Datetime].

For now since you don't have any typing at other than the method signature (and neither does durabletask itself) - you can ignore this.

@RyanLettieri RyanLettieri merged commit 151308a into microsoft:main Feb 18, 2025
6 checks passed
@RyanLettieri RyanLettieri deleted the durabletask-scheduler branch February 18, 2025 22:46
acroca pushed a commit to acroca/dapr-durabletask-python that referenced this pull request Jun 17, 2025
* Creation of DTS example and passing of completionToken

Signed-off-by: Ryan Lettieri <[email protected]>

* Adressing review feedback

Signed-off-by: Ryan Lettieri <[email protected]>

* Reverting dapr readme

Signed-off-by: Ryan Lettieri <[email protected]>

* Adding accessTokenManager class for refreshing credential token

Signed-off-by: Ryan Lettieri <[email protected]>

* Adding comments to the example

Signed-off-by: Ryan Lettieri <[email protected]>

* Adding in requirement for azure-identity

Signed-off-by: Ryan Lettieri <[email protected]>

* Moving dts logic into its own module

Signed-off-by: Ryan Lettieri <[email protected]>

* Fixing whitesapce

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating dts client to refresh token

Signed-off-by: Ryan Lettieri <[email protected]>

* Cleaning up construction of dts objects and improving examples

Signed-off-by: Ryan Lettieri <[email protected]>

* Migrating shared access token logic to new grpc class

Signed-off-by: Ryan Lettieri <[email protected]>

* Adding log statements to access_token_manager

Signed-off-by: Ryan Lettieri <[email protected]>

* breaking for loop when setting interceptors

Signed-off-by: Ryan Lettieri <[email protected]>

* Removing changes to client.py and adding additional steps to readme.md

Signed-off-by: Ryan Lettieri <[email protected]>

* Refactoring client and worker to pass around interceptors

Signed-off-by: Ryan Lettieri <[email protected]>

* Fixing import for DefaultClientInterceptorImpl

Signed-off-by: Ryan Lettieri <[email protected]>

* Adressing round 1 of feedback

Signed-off-by: Ryan Lettieri <[email protected]>

* Fixing interceptor issue

Signed-off-by: Ryan Lettieri <[email protected]>

* Moving some files around to remove dependencies

Signed-off-by: Ryan Lettieri <[email protected]>

* Adressing more feedback

Signed-off-by: Ryan Lettieri <[email protected]>

* More review feedback

Signed-off-by: Ryan Lettieri <[email protected]>

* Passing token credential as an argument rather than 2 strings

Signed-off-by: Ryan Lettieri <[email protected]>

* More review feedback for token passing

Signed-off-by: Ryan Lettieri <[email protected]>

* Addressing None comment and using correct metadata

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating unit tests

Signed-off-by: Ryan Lettieri <[email protected]>

* Fixing the type for the unit test

Signed-off-by: Ryan Lettieri <[email protected]>

* Fixing grpc calls

Signed-off-by: Ryan Lettieri <[email protected]>

* Fix linter errors and update documentation

* Specifying version reqiuirement for pyproject.toml

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating README

Signed-off-by: Ryan Lettieri <[email protected]>

* Adding comment for credential type

Signed-off-by: Ryan Lettieri <[email protected]>

---------

Signed-off-by: Ryan Lettieri <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
Co-authored-by: Chris Gillum <[email protected]>
Signed-off-by: Albert Callarisa <[email protected]>
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.

4 participants