-
Notifications
You must be signed in to change notification settings - Fork 105
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
Supporting PyStein programming model in the Worker #965
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@gavin-aguiar i see merge conflict, lint check failed |
YunchuWang
reviewed
Feb 16, 2022
YunchuWang
reviewed
Feb 16, 2022
YunchuWang
reviewed
Feb 16, 2022
gavin-aguiar
force-pushed
the
gaaguiar/new-prg-model
branch
from
February 16, 2022 20:16
d1f4a7a
to
7712112
Compare
YunchuWang
reviewed
Feb 16, 2022
YunchuWang
reviewed
Feb 16, 2022
YunchuWang
reviewed
Feb 16, 2022
YunchuWang
reviewed
Feb 16, 2022
vrdmr
reviewed
Feb 17, 2022
vrdmr
changed the title
Gaaguiar/new prg model
Supporting PyStein programming model in the Worker
Feb 17, 2022
YunchuWang
reviewed
Feb 17, 2022
YunchuWang
reviewed
Feb 17, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
YunchuWang
reviewed
Apr 21, 2022
gavin-aguiar
force-pushed
the
gaaguiar/new-prg-model
branch
from
April 25, 2022 23:14
7908b08
to
aafd082
Compare
gavin-aguiar
force-pushed
the
gaaguiar/new-prg-model
branch
from
April 25, 2022 23:28
5dc2fe4
to
bca60c9
Compare
…into gaaguiar/new-prg-model
gavin-aguiar
force-pushed
the
gaaguiar/new-prg-model
branch
from
April 25, 2022 23:49
bb4964b
to
1563d7e
Compare
gavin-aguiar
commented
Apr 27, 2022
azure_functions_worker/dispatcher.py
Outdated
bindings=binding_protos, | ||
raw_bindings=indexed_function.get_raw_bindings()) | ||
|
||
fx_metadata_results.append(function_metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entire function is in a try catch in the caller function. All errors will be logged
vrdmr
approved these changes
Apr 27, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Getting Started
Currently, the Python programming model is in the alpha release.
To try out the new programming model, download PyStein Custom Core Tools. Note that downloading the file will not overwrite the existing core tools in your device.
Installation & Setup
local.settings.json
, the flag forAzureWebJobsFeatureFlags
is set toEnableWorkerIndexing
.func
from the unzipped path directly<path_to_core_tools>/func host start
local.settings.json
.E.g. For Windows:
func host start
.C:\Users\test_user\Downloads\CoreTools-PyStein-win\CoreTools-New-Prg-Model\func
Set-Alias
in Powershell) the func to this folder. Note that this will impact your existing core tools if you don't reset it when you are done testing.Set-Alias -Name func -Value C:\Users\test_user\Downloads\CoreTools-PyStein-win\CoreTools-New-Prg-Model\func
Notes & Limitations
View http-only-example, examples-non-http for the new programming model.
Specification
Reference specification of the decorator is available at ProgModelSpec.pyi at Azure library repo.
Our Goals
The current Python programming model in Azure Functions has limitations that sometimes prevents a customer from having a smooth onboarding experience. This includes the facts that there are too many files present, that the Function App structure can be confusing, and that file configuration follows Azure specific concepts rather than what Python frameworks.
To overcome these challenges, the Azure Functions Python team ideated a new programming model which eases the learning experience for new and existing customers. Specifically, the new programming model involves a single .py file (
function_app.py
) and will no longer require thefunction.json
file. Furthermore, the triggers and bindings usage will be decorators, simulating an experience similar to Flask.Triggers & Bindings
At this time, the new Programming model supports HTTP, Timer, Event Hub, Queue, Service Bus, and Cosmos DB. The following are examples of the implementation with the new programming model.
HTTP
Event Hub
Queue
Service Bus
Cosmos DB
Storage Blobs
What's Next
View http-only-example, examples-non-http for the new programming model.
Let us know your feedback in the GitHub discussion.
Upcoming Features
Fixes #
PR information
Quality of Code and Contribution Guidelines