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

Adding V2 programming model support for Dapr Extension #181

Merged
merged 34 commits into from
Aug 31, 2023

Conversation

ASHIQUEMD
Copy link
Contributor

@ASHIQUEMD ASHIQUEMD commented Jun 1, 2023

This PR adds Python V2 programming model support for Dapr bindings and triggers.

Triggers

  1. daprBindingTrigger
  2. daprServiceInvocationTrigger
  3. daprTopicTrigger

Bindings

  1. daprStateInput
  2. daprSecret
  3. daprState
  4. daprInvoke
  5. daprPublish
  6. daprBinding

Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
@ASHIQUEMD ASHIQUEMD changed the title [WIP] Adding daprServiceInvocation trigger Adding V2 programming model support for Dapr Jun 8, 2023
@ASHIQUEMD ASHIQUEMD marked this pull request as ready for review June 8, 2023 15:21
@ASHIQUEMD ASHIQUEMD changed the title Adding V2 programming model support for Dapr Adding V2 programming model support for Dapr Extension Jun 8, 2023
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
ASHIQUEMD and others added 12 commits June 19, 2023 16:37
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #181 (e1adfe4) into dev (88f96d3) will increase coverage by 0.43%.
The diff coverage is 98.85%.

❗ Current head e1adfe4 differs from pull request most recent head 5f4ea2d. Consider uploading reports for the commit 5f4ea2d to get more accurate results

@@            Coverage Diff             @@
##              dev     #181      +/-   ##
==========================================
+ Coverage   90.70%   91.13%   +0.43%     
==========================================
  Files          55       57       +2     
  Lines        3183     3360     +177     
  Branches      822      841      +19     
==========================================
+ Hits         2887     3062     +175     
- Misses        219      220       +1     
- Partials       77       78       +1     
Flag Coverage Δ
unittests 91.10% <98.85%> (+0.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
azure/functions/__init__.py 100.00% <ø> (ø)
azure/functions/decorators/__init__.py 100.00% <ø> (ø)
...ure/functions/decorators/dapr/dapr_function_app.py 97.61% <97.61%> (ø)
azure/functions/decorators/constants.py 100.00% <100.00%> (ø)
azure/functions/decorators/dapr/dapr.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

azure/functions/decorators/dapr_function_app.py Outdated Show resolved Hide resolved
azure/functions/decorators/dapr_function_app.py Outdated Show resolved Hide resolved
azure/functions/decorators/dapr.py Outdated Show resolved Hide resolved
azure/functions/__init__.py Outdated Show resolved Hide resolved
azure/functions/decorators/dapr_function_app.py Outdated Show resolved Hide resolved
azure/functions/decorators/dapr_function_app.py Outdated Show resolved Hide resolved
tests/decorators/test_dapr.py Show resolved Hide resolved
ASHIQUEMD and others added 10 commits July 17, 2023 18:23
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Signed-off-by: MD Ashique <noorani.ashique5@gmail.com>
Copy link
Member

@vrdmr vrdmr left a comment

Choose a reason for hiding this comment

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

LGTM

self.assertEqual(app.auth_level, AuthLevel.FUNCTION)
self.assertEqual(app.app_script_file, SCRIPT_FILE_NAME)

def test_register_dapr_blueprint_app_auth_level(self):
Copy link
Member

Choose a reason for hiding this comment

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

You should also add an explicit test on the DaprBlueprint - if the get_functions are returning the right set of functions.

bp.get_functions or similar request would be available.

Copy link
Member

Choose a reason for hiding this comment

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

This can be done in another PR.

@gavin-aguiar gavin-aguiar merged commit eb7cc86 into Azure:dev Aug 31, 2023
7 checks passed
@ASHIQUEMD ASHIQUEMD deleted the dapr-python-v2-support branch September 29, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants