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

Retry policy support for v2 programming model #1268

Merged
merged 15 commits into from
Jul 6, 2023
Merged

Conversation

gavin-aguiar
Copy link
Contributor

@gavin-aguiar gavin-aguiar commented Jun 20, 2023

Description

Added support for retry policy for v2 programming model.
Retrieving the values for retry policy from the decorator, converting it to a protobuf message and sending it to the host.

Fixes #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@gavin-aguiar gavin-aguiar force-pushed the gaaguiar/retry_context branch from f58aca0 to 92efc8c Compare June 22, 2023 01:18
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #1268 (4567d9a) into dev (6872fc0) will decrease coverage by 52.09%.
The diff coverage is 57.14%.

❗ Current head 4567d9a differs from pull request most recent head e3821f6. Consider uploading reports for the commit e3821f6 to get more accurate results

@@             Coverage Diff             @@
##              dev    #1268       +/-   ##
===========================================
- Coverage   84.40%   32.31%   -52.09%     
===========================================
  Files          34       34               
  Lines        1904     1925       +21     
  Branches      366      281       -85     
===========================================
- Hits         1607      622      -985     
- Misses        228     1302     +1074     
+ Partials       69        1       -68     
Flag Coverage Δ
unittests 32.31% <57.14%> (-52.04%) ⬇️

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

Impacted Files Coverage Δ
azure_functions_worker/dispatcher.py 19.39% <0.00%> (-69.78%) ⬇️
azure_functions_worker/protos/__init__.py 100.00% <ø> (ø)
azure_functions_worker/loader.py 33.33% <30.00%> (-51.38%) ⬇️
azure_functions_worker/bindings/retrycontext.py 100.00% <100.00%> (+20.00%) ⬆️
azure_functions_worker/constants.py 100.00% <100.00%> (ø)

... and 21 files with indirect coverage changes

@gavin-aguiar gavin-aguiar marked this pull request as ready for review July 5, 2023 23:11

return retry_protos


def process_indexed_function(functions_registry: functions.Registry,
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a test which validates the json being generated?

self.assertEqual(protos.max_retry_count, 1)
self.assertEqual(protos.retry_strategy, 1)
self.assertEqual(protos.delay_interval.seconds, 1)

Copy link
Member

Choose a reason for hiding this comment

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

❤️

@gavin-aguiar gavin-aguiar merged commit 0f52efc into dev Jul 6, 2023
@gavin-aguiar gavin-aguiar deleted the gaaguiar/retry_context branch July 6, 2023 21:59
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