-
Notifications
You must be signed in to change notification settings - Fork 64
Validate Bundles V2 usage in initialization script #238
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
Conversation
@anthonychu , Just making sure you're ok with this approach. I found it a bit cleaner than doing it in |
…zure-functions-durable-python into dajusto/validate-bundles
…zure-functions-durable-python into dajusto/validate-bundles
Sorry for the messy git history here, I accidentally creating this branch with |
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.
Mostly good, a few nits.
azure/durable_functions/__init__.py
Outdated
# We do a best-effort attempt to detect bundles V1 | ||
# This is the string hard-coded into the bundles V1 template in VSCode | ||
if version_range == "[1.*, 2.0.0)": | ||
message = "Bundles V1 is deprecated. Please update to Bundles V2 in your `host.json`."\ |
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.
small tweak: "Durable Python does not support Bundles V1."
The current statement makes it seem like Bundles V1 are deprecated functions wide.
return | ||
# We do a best-effort attempt to detect bundles V1 | ||
# This is the string hard-coded into the bundles V1 template in VSCode | ||
if version_range == "[1.*, 2.0.0)": |
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.
I think some small subset of customers may have more specific version ranges, like "[1.2, 2.0.0)" due to pinning during regressions. It's an edge case, but we may want to ask @narensoni if we should cover it.
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.
I'll merge this for now, since it's better than nothing, but track this follow-up here: #247
Can you also update the template's code's(The one which is automatically getting generated when we select template while creating az function) host.json to use "version": "[2.*, 3.0.0)". By default it is V1 and it took me a while to figure out that. |
Hi @tmathew1000! Ah yes, this is something we're actively working on. Unfortunately, the I'm looking to improve this state of affairs, ideally by allow a |
Bundles V1 is deprecated so I'm adding a step in the initialization file of the module that throws an exception whenever bundles V1 is detected. The result looks as follows:
I also changed the
setup.py
to have an explicit UTF-8 encoding, since now we've added emojis to the README. Without this, it now fails to parse the README, which is necessary for publishing the package