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

fix: enable missed return types for generic #1485

Merged
merged 6 commits into from
May 29, 2024

Conversation

hallvictoria
Copy link
Contributor

@hallvictoria hallvictoria commented Apr 23, 2024

Description

Implicit output is now enabled for generic bindings, so the worker needs to support returning the same python types as it did when implicit output wasn't enabled. The other types that have been returned include:

  • dict
  • list
  • int
  • double
  • bool

TypedData only supports string, json, bytes, stream, http, int, double, collection types, and model_binding_data. Therefore, types that are not supported (dict, list, bool), are converted to supported types (json, json, int respectively).

Added E2E tests for all supported return types to check if the functions are executing correctly and unit tests to test the return values.

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

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 44.55%. Comparing base (cd13c6a) to head (8359a44).
Report is 1 commits behind head on dev.

Current head 8359a44 differs from pull request most recent head 419d951

Please upload reports for the commit 419d951 to get more accurate results.

Files Patch % Lines
azure_functions_worker/bindings/datumdef.py 0.00% 10 Missing ⚠️
azure_functions_worker/bindings/generic.py 0.00% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #1485       +/-   ##
===========================================
+ Coverage   31.65%   44.55%   +12.90%     
===========================================
  Files          36       36               
  Lines        2306     2325       +19     
  Branches      336      346       +10     
===========================================
+ Hits          730     1036      +306     
+ Misses       1574     1206      -368     
- Partials        2       83       +81     
Flag Coverage Δ
unittests 44.55% <0.00%> (+12.90%) ⬆️

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

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

@hallvictoria hallvictoria marked this pull request as ready for review April 29, 2024 14:51
@hallvictoria hallvictoria merged commit 8214d0c into dev May 29, 2024
61 checks passed
@hallvictoria hallvictoria deleted the hallvictoria/generic-tests branch May 29, 2024 15:50
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.

3 participants