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

[Discussion] Azure Functions Runtime 2.0 preview breaking changes #64

Closed
fabiocav opened this Issue Aug 11, 2018 · 111 comments

Comments

Projects
None yet
@fabiocav
Copy link
Member

fabiocav commented Aug 11, 2018

Discussion for the upcoming Azure Functions Runtime breaking change release

@AHWafaey

This comment has been minimized.

Copy link

AHWafaey commented Aug 11, 2018

Thanks for the update but we faced an issue to migrate existing resource groups which were built based on a previous runtime version 2.0.11933-alpha to 2.0.11946.0. The migration of existing Azure Java functions towards that runtime version was not working and we had to rollback due to that.

although building a new resource group with a new java function based on latest runtime was working properly.

As such, the question is -- Does it require removing the whole app and rebuilding it from scratch is the a correct solution? or is it enough only to update the function app settings?

///Thx

@fabiocav

This comment has been minimized.

Copy link
Member Author

fabiocav commented Aug 11, 2018

Just updating the app setting is sufficient. If done now, this will leave you in the same state you’re currently in, but will avoid the automatic update to the next, breaking, release.

@willmorgan

This comment has been minimized.

Copy link

willmorgan commented Aug 12, 2018

How do we install the storage bindings?

If we're already using the storage SDK in our Node apps' codebase, does it make sense to simply abandon the bindings altogether and read/write to the storage account programmatically, using the SDK?

@jeffhollan

This comment has been minimized.

Copy link
Member

jeffhollan commented Aug 13, 2018

@willmorgan once the bits get released the process will be the same to install in app as other extensions we have today. Ideally you should be able to open up your project locally and just run func extensions install and it will pull down right packages for you.

That said, nothing the binding does that you couldn't do with just SDK. So if you prefer to just use SDK in code you can.

@nzthiago

This comment has been minimized.

Copy link
Member

nzthiago commented Aug 13, 2018

Nice! What is the expected timeline for it to roll out everywhere?

@willmorgan

This comment has been minimized.

Copy link

willmorgan commented Aug 13, 2018

once the bits get released the process will be the same to install in app as other extensions we have today.

@jeffhollan What's the ETA on the extensions being released? Will there be adequate time to test between the extension release, and the removal of the built-in bindings?

@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Aug 13, 2018

@willmorgan from the announcement:

Version 2.0.11961-alpha will be available for 30 days after the deployment completes

So you'll have plenty of time. We don't have the exact date where it will be released, but it is coming soon.

@paulbatum

This comment has been minimized.

Copy link
Member

paulbatum commented Aug 13, 2018

The updated extensions will be on NuGet slightly before we begin deployment.

@TurtleBeach

This comment has been minimized.

Copy link

TurtleBeach commented Aug 13, 2018

You guys seem to do your best to confuse with releases. Friday evening (8:30 EDT) you published a notice about an imminent release; I came in Saturday intending to pin to 2.0.11933 and found that 2.0.11946 was already running in EAST US. Now you say pin to 2.0.11961 and it is NOT running in EAST US, I am leery of pinning to a future version, since I have already been burned multiple times on unclear functionality in releases. And acknowledging it is my ignorance, I still have no idea what you mean when you reference function extensions and what has to be done. I have Java functions. I can debug locally. I can deploy. I can monitor them. I am about to launch a site that relies on the functions. Where does an "extension" come in? What is going to break when suddenly 2.0.11961 gets pushed out. Could you not at minimum (a) tell us now that you will specifically tell us x (1? 2?) days before you plan to start rolling out a release; and then (b) not start the rollout before then. I understand I am and have been working with "preview" (for one year, I also note) - but that should not be taken as a free pass to do whatever you feel like when you start pushing this stuff out.
/Rant

@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Aug 14, 2018

@TurtleBeach the 'imminent' release was 2.0.11961-alpha, and it is in fact deployed everywhere now (it was fully deployed on Friday night). That release does not have any breaking changes over the previous one (2.0.11946-alpha). If you have an app that says it's running an older build, try restarting it.

And while we don't know the exact day of the next release that has the breaking changes, the point of the announcement is that if you pin yourself to 2.0.11961-alpha, you will be safe, and will then have plenty of time to get ready for the breaking release once it comes.

Does that help clear the confusion?

@TurtleBeach

This comment has been minimized.

Copy link

TurtleBeach commented Aug 14, 2018

Why does the Azure portal tell me my functions in EAST US are running 2.0.11946??
FUNCTIONS_EXTENSION_VERSION is set to beta.

@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Aug 14, 2018

@TurtleBeach please see my previous response which covers that (i.e. try restarting it).

@TurtleBeach

This comment has been minimized.

Copy link

TurtleBeach commented Aug 14, 2018

OK. Restart gets the runtime up to 2.0.11961. But I trust you see my frustration. Friday night I'm told to expect an update. Saturday morning I see that all my functions, which were on 2.0.11933 transitioned to 2.0.11946. Now you tell me that Friday everything supposedly went to 2.0.11961. What happened in between, and how am I supposed to divine that? But I do appreciate the clarification now and I will pin everything to 11961.

@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Aug 14, 2018

Yep, I hear you. I think most of the confusion comes from the fact that an app does not get a new version until it restarts, either explicitly by user or via platform upgrade. So you can end up running an older build for a while. I assume that's what happened to you on Friday. Your app was still running 2.0.11933, and got restarted before we deployed 2.0.11961. So it ended up with 2.0.11946, which had actually been there for a little while (and appeared to you like it was a brand new build).

@TurtleBeach

This comment has been minimized.

Copy link

TurtleBeach commented Aug 14, 2018

One final observation - after I pin to 2.0.11961-alpha, the portal now reports "A newer version is available (~2)". Am I to ignore that, and leave functions pinned to 2.0.11961-alpha, or should the pinned version be -beta?

@paulbatum

This comment has been minimized.

Copy link
Member

paulbatum commented Aug 14, 2018

Ignore the portal for now. If you use the syntax "beta' or "~2" you wont be pinned anymore. Unfortunately the portal does not fully understand pinning and will show confusing messages like this one.

@pablocastillaquintas

This comment has been minimized.

Copy link

pablocastillaquintas commented Aug 14, 2018

Hi!

How can I change the version in the VS tools?

Thanks

@flowest

This comment has been minimized.

Copy link

flowest commented Aug 15, 2018

I'd like to know how long Azure Functions v1 runtime will be supported?
Upgrading from v1 to v2 is not that easy, right? (because v1 is using .NET Framework, v2 is using .NET Core etc.)

@MisinformedDNA

This comment has been minimized.

Copy link

MisinformedDNA commented Aug 15, 2018

Version 2.0.11961-alpha will be available for 30 days after the deployment completes

So you'll have plenty of time. We don't have the exact date where it will be released, but it is coming soon.

30 days is not "plenty of time", especially if you are breaking a bunch of stuff.

Will you also be sending out an email to all Function v2 users so they know about this?

@MisinformedDNA

This comment has been minimized.

Copy link

MisinformedDNA commented Aug 15, 2018

@flowest I think they promised at least one year of v2 in GA, before v1 deprecation.

@paulbatum

This comment has been minimized.

Copy link
Member

paulbatum commented Aug 15, 2018

@flowest for some discussion of this topic see here. Doesn't make much sense to discuss it here.

@MisinformedDNA V2 is in preview and we have real world constraints that limit how long we can keep older versions available in Azure. I do not understand your assertion about the time window for these upgrades. I hope you agree that us releasing these previews, despite the pain of breaking changes and their frequency, is better than going dark for extended periods of time with no releases.

@justinyoo

This comment has been minimized.

Copy link

justinyoo commented Aug 15, 2018

Hi, a couple of questions:

  1. Do you plan to roll out this release to Australia on/after Aug 18th?
  2. Does this release include the container deployment scenario through Azure Portal, which currently experiencing UI/UX bug?
@paulbatum

This comment has been minimized.

Copy link
Member

paulbatum commented Aug 15, 2018

  1. Yes (it will be after aug 18th)
  2. This release does not relate to container deployment or UX, so the answer is probably no. If there is a github issue tracking the problem and you can link me to it, I can comment further.
@kenturley

This comment has been minimized.

Copy link

kenturley commented Aug 16, 2018

Hello, I have my function app pinned at 2.0.11857-alpha. This was because a subsequent release broke the ability to return message text in HTTP responses. Example: return new BadRequestObjectResult("Missing one or more required fields"); --pinning to 11857 was the documented workaround.

I have two questions,

  1. Is that behavior fixed in 2.0.11961-alpha such that I can pin to that more recent version?

  2. Should I be concerned that 11857 will be deprecated? Am I at risk by still being on it?

Thank you.

@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Aug 16, 2018

@kenturley Yes, that issues was fixed a while back. I highly suggest that you try to pin yourself to 2.0.11961-alpha and verify that all is well. You are definitely at risk by being pinned to that older build.

Generally, pinning is always meant to be temporary to help transition to the next build. So if you need to be pinned, you should always be actively looking at what it takes for you to run on the latest version and unpin yourself.

@kenturley

This comment has been minimized.

Copy link

kenturley commented Aug 16, 2018

@davidebbo Okay.... We'll work on getting ourselves upgraded. Thank you for the quick reply.

@berndverst

This comment has been minimized.

Copy link

berndverst commented Aug 17, 2018

You can run this bash script to update all affected function apps in the current subscription. Switch subscriptions via az account list and az account set --subscription XXXXX

#!/bin/bash

APPS=$(az functionapp list --query "[].{group: resourceGroup, name: name}" --output tsv)

IFS=$'\n'
for APP in $APPS
do
  GROUP=$(echo $APP | cut -f 1)
  NAME=$(echo $APP | cut -f 2)
  VERSION=$(az functionapp config appsettings list -g $GROUP -n $NAME --query "[?name == 'FUNCTIONS_EXTENSION_VERSION'].value" --output tsv)

  if [ "$VERSION" = "~2" ] || [ "$VERSION" = "~beta" ] || [ "$VERSION" = "beta" ]; then
    echo "Function app $NAME with version $VERSION in group $GROUP is being updated."
    $(az functionapp config appsettings set -n $NAME -g $GROUP --settings FUNCTIONS_EXTENSION_VERSION=2.0.11961-alpha)
    echo "Restarting function app $NAME in group $GROUP."
    $(az functionapp restart -n $NAME -g $GROUP)
  fi

done
@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Aug 17, 2018

@berndverst nice, thanks for sharing!

@pvto

This comment has been minimized.

Copy link

pvto commented Sep 3, 2018

We have an issue with nodejs app deployed from VSTS. The app stopped working over weekend.

As per instructions, we updated host.json, added app setting FUNCTIONS_WORKER_RUNTIME=node, and finally added functions-extensions/extensions.csproj file to enable queueTrigger input.

Deployment indicates success, but now all functions have disappeared from under the app. With Kudu console, I can see that code is still deployed, but the functions don't appear to be functioning any more.

Probably missing something obvious here. However we can't figure out what to do next.

@pvto

This comment has been minimized.

Copy link

pvto commented Sep 3, 2018

We got missing functions fixed by moving extensions.csproj from functions-extensions/ to app root folder.

An incompatible toolage version with "func extensions install" seems to cause this.

@klesouza

This comment has been minimized.

Copy link

klesouza commented Sep 4, 2018

@brettsam I've update SDK also installed the new required packages for Storage extensions. (I can see using the console everything is in there)
I can run locally using the latest version perfectly fine.
I've tried stopping the function app, updating my zip URL, killing all process running and then starting my function app again, but I keep getting the same message.
Not sure how to fix it.

@brettsam

This comment has been minimized.

Copy link
Member

brettsam commented Sep 4, 2018

@mieliespoor -- we likely won't move to Microsoft.Extensions.Logging 2.2.0 until there is a non-preview release. As of now, I see 2.1.1 as the latest release on nuget.

@brettsam

This comment has been minimized.

Copy link
Member

brettsam commented Sep 4, 2018

@paulroub -- in reference to your AppInsights exception. Are you running this on Windows? If you disable the SnapshotCollector in host.json with this, does it work?

{
    "version": "2.0",
    "logging": {
        "applicationInsights": {
            "snapshotConfiguration": {
                "isEnabled":  false
            }
        }
    }    
}
@paulroub

This comment has been minimized.

Copy link

paulroub commented Sep 4, 2018

@brettsam No, our local testing is on macOS. Tried disabling the snapshots just in case, but nothing changes.

@brettsam

This comment has been minimized.

Copy link
Member

brettsam commented Sep 4, 2018

@paulroub -- Thanks for trying that. I assume that you're enabling App Insights locally with APPINSIGHTS_INSTRUMENTATIONKEY? If you remove that, does your host start up? I've opened up Azure/azure-webjobs-sdk#1877 to track this, so please follow along there (I'll likely have some more questions).

@mieliespoor

This comment has been minimized.

Copy link

mieliespoor commented Sep 4, 2018

@brettsam I uninstalled the reference and even installed v2.1.0, but then in both cases I get this error:
System.Private.CoreLib: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Azure/azure-functions-host#3511 (comment)

@arkiaconsulting

This comment has been minimized.

Copy link

arkiaconsulting commented Sep 5, 2018

I had an error saying that "queueTrigger" was not registered (.Net). I installed locally the pre-release NuGet for storage, redeploy, and voilà. check here

@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Sep 5, 2018

There are too many distinct things being discussed in this thread, and it's hard to track/respond properly. Please open a separate issue on https://github.com/Azure/azure-functions-host for each distinct issue that you are having (you can post a link from here). We will get to all of them. Thanks!

@shurane

This comment has been minimized.

Copy link

shurane commented Sep 7, 2018

I'm not sure this necessitates a separate issue, so posting here. I only see versions being removed and how to pin to a specific alpha version on app-service-announcements#129 and app-service-announcements#132.

How do we target the latest (or 'stable' when that is eventually reached) version of v2? Should we have FUNCTIONS_EXTENSION_VERSION target beta, ~2? Or should the attribute be removed entirely?

@davidebbo

This comment has been minimized.

Copy link
Contributor

davidebbo commented Sep 7, 2018

@shurane it should be set to ~2.

@klesouza

This comment has been minimized.

Copy link

klesouza commented Sep 10, 2018

I reported that was getting errors about the extensions not being registered even after following all the steps described in the docs.
Function (...) Error: The binding type(s) 'queueTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
Today I found out what was missing, in case someone else still has the same problem:

Because I was packing my function inside a docker container to generate to zip file, it wasn't generating the extensions.json file. I had to add the package Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator manually to my project and it's working now.

@dabutvin

This comment has been minimized.

Copy link
Member

dabutvin commented Sep 10, 2018

Is there a date that 2.0.11961-alpha will no longer be available? From following this thread it looks like 9/30/2018. Just wanted to check and make sure. Thanks :)

@paulbatum

This comment has been minimized.

Copy link
Member

paulbatum commented Sep 10, 2018

@dabutvin yup thats correct.

@brandonh-msft

This comment has been minimized.

Copy link
Member

brandonh-msft commented Sep 11, 2018

When will the VS for Mac extension be updated? Is there something special users need to do to get it?

@numb3rss

This comment has been minimized.

Copy link

numb3rss commented Sep 11, 2018

Hello,

I'm also experiencing issues adding an Event Grid subscription to my azure function in the portal.

{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "Url validation",
"message": "The attempt to validate the provided endpoint https://__.azurewebsites.net/runtime/webhooks/EventGrid failed. For more details, visit https://aka.ms/esvalidation."
}
]
}
}

I can't validate my subscriber endpoint, however i update my url manually like @jmsalvo suggested before. It is also related here : Azure/app-service-announcements#129.

Here is my url endpoint : https://___.azurewebsites.net/runtime/webhooks/EventGrid?functionName=*********&code=*********

I tried many scenariis, i check 'Subscribe to all event types' first and then uncheck and specify event type. But deployment failed all the time. What am I doing wrong ?

Thanks.

@jeffhollan

This comment has been minimized.

Copy link
Member

jeffhollan commented Sep 11, 2018

@brandonh-msft VS for mac team working on it this sprint. They are hopeful they can get it into VS for Mac 7.6 but if not would be in Mac 7.7 preview 3

@brian-toniq

This comment has been minimized.

Copy link

brian-toniq commented Sep 20, 2018

Has the logging logic changed? I used to be able to see the exception details when a function failed, but now I only see a general error message that it failed. I have changed the host.json file to the new logging structure and tried various combinations but I still can't get it to log the exception detail.

@brettsam

This comment has been minimized.

Copy link
Member

brettsam commented Sep 20, 2018

@brian-toniq -- are you referring to the logs in the Portal? If so, that was a bug with our FileLogger that we just fixed (Azure/azure-functions-host#3486). Unfortunately it didn't make the cutoff for our very next release, but it will be available shortly.

@brian-toniq

This comment has been minimized.

Copy link

brian-toniq commented Sep 20, 2018

@brettsam Yes I am referring to logs in Portal, sorry I should have been more clear. Thanks for the further info and good to hear that a fix will be available soon.

@chethanrajp

This comment has been minimized.

Copy link

chethanrajp commented Sep 25, 2018

  1. While Deploying Azure Function App, we got below Error.
    'System.InvalidOperationException: Runtime keys are stored on blob storage.
    This API doesn't support this configuration. Please change Environment variable AzureWebJobsSecretStorageType value to 'Files'.

We tried with following changes:
Added AzureWebJobsSecretStorageType to “Files” in azureDeploy.json file (Image-1). Function Deployment got succeeded in VSTS, But while running the function getting (Image-2) error.

1
2

@fabiocav

This comment has been minimized.

Copy link
Member Author

fabiocav commented Nov 2, 2018

@chethanrajp those errors do not seem related to the keys. If you're still experiencing this, can you please open an issue on https://github.com/Azure/azure-functions-host/issues with the details requested there for investigation?

@fabiocav fabiocav closed this Nov 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment