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

Azure Functions Runtime 2.0 breaking change release discussion #50

Closed
fabiocav opened this issue May 30, 2018 · 28 comments
Closed

Azure Functions Runtime 2.0 breaking change release discussion #50

fabiocav opened this issue May 30, 2018 · 28 comments

Comments

@fabiocav
Copy link
Member

Discussion issue for announcement Azure/app-service-announcements#112

@oluatte
Copy link

oluatte commented May 30, 2018

Thanks for the early announcement, it really is helpful. I take it you'll post an update there or here for when the change actually goes into effect?

@fabiocav
Copy link
Member Author

Indeed! We'll keep this issue updated as the release moves along.

@nicenemo
Copy link

I changed to the new jar,dropped the serverless part from the package name. It compiles.
If I run it I am greeted with:

[5/31/2018 8:42:39 AM] Generating 0 job function(s)
[5/31/2018 8:42:39 AM] Starting Host (HostId=dia-1766564453, Version=2.0.11280.0, ProcessId=3800, Debug=False, Attempt=0)
[5/31/2018 8:42:39 AM] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
[5/31/2018 8:42:39 AM] Job host started
Listening on http://localhost:7071/
Hit CTRL-C to exit...
`...

The classes containing my functions are public and the methods that are Azure Functions are public too!
Where is that config object I am suppoed to call UseTimers() on? judging from the casing, it is a .NET related message.

@paulbatum
Copy link
Member

I think this is expected since we're still in the process of doing this release. Your local tools don't have the breaking changes yet.

@pragnagopa
Copy link
Member

@jdneo -Here is the current release tracking issue: Azure/app-service-announcements#112. Please post here once maven plugin is updated.

@jdneo
Copy link

jdneo commented Jun 12, 2018

Hi everyone, I have some questions about this change:

  • After the service side updated the runtime. For a new provisioned Function App, if the user set the FUNCTIONS_EXTENSION_VERSION to beta. Which minor version will be used, or, will the minor version set to the version that is after the current updating we are doing?

  • If the user has an existing Function App with the version before this update, Let’s say: 2.0.11776.0 (beta), and the user deploys a new function with the new package names, then this function could not work correctly, right?

  • Currently using Github announcement issue to track the status is fine, but is there any ETA for current update? This can help us to do the planning.

  • Besides using the Github issue to announce this breaking change, is there any other way user can know this? I’m afraid not all the customers will check the announcement issue.

@pragnagopa
Copy link
Member

@jdneo - The workaround for pinning the runtime version is temporary until maven plugin is updated. Once maven plugin is released, users need to update existing Java functions to use the new package name and redeploy.

@paulbatum
Copy link
Member

@jdneo

  1. With the extension version set to "beta", you'll get the latest version of V2 that is deployed to that particular region.
  2. Yes it won't work in that case - this change was neither forward nor backward compatible.
  3. The update to Azure is now complete.
  4. Github is the main announcement channel for V2 changes

@reff134-projects
Copy link

reff134-projects commented Jun 12, 2018

We're currently experiencing an interesting issue after trying to use this version of the runtime. Pinning our runtime version to 2.0.11776 has us back up and running for now.

We're using Entity Framework to communicate with our database which has been fine until now. After updating to this runtime version we started receiving the following exception when trying to use our repository in an HTTP triggered function.

System.InvalidOperationException: The property 'CustomModel.CustomProperty' is of type 'Nullable' which is not supported by current database provider. Either change the property CLR type or ignore the property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.

We haven't finished updating our EF NuGet packages to 2.1.0 which might be why we're seeing this error, but I thought I'd note this here in case anyone else is experiencing this issue. I'll be deploying a new version of our function app with updated packages to see if that fixes our problem. Expect an update here soon.

@fabiocav
Copy link
Member Author

@Macros185 it is possible that is a breaking change with EF, as you'll automatically be bumped to 2.1 if you're targeting a lower minor version. That behavior should be consistent outside of Functions as well, so it should repro in other environments under the same conditions if that is the case.

@mathursharp
Copy link

When is the expected release of azure-functions maven plugin updated to consume azure-functions-library.jar ?

@jdneo
Copy link

jdneo commented Jun 13, 2018

@mathursharp The release for Maven tooling is under going. The ETA should be before the end of this week.

@mathursharp
Copy link

@jdneo until then what should be the dependencies version and run time version to be used.
Can you please point out the version for java azure-function dependency which will work with latest run time ( 2.0.11857) and the current maven plugin.

@jdneo
Copy link

jdneo commented Jun 13, 2018

I'm afraid you have to pin the version to 2.0.11776.0 before the new maven tooling is released. We are already in the verification process. It should be published very soon.

@gvacaguzman
Copy link

Hi, I am having an issue, I created a new function and change all the updated specified in this link. It seems that package the function without any issue, but when I try to run it it shows me that "No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.)."

The current function is the one that creates following this link

My environment is an Ubuntu 18.04 LTS 64-bit

I was using my environment since beta 2

@pragnagopa
Copy link
Member

@gvacaguzman - maven plugin has not been updated yet. For now, you need to pin you runtime by updating the app setting FUNCTIONS_EXTENSION_VERSION to 2.0.11776-alpha.

@gvacaguzman
Copy link

gvacaguzman commented Jun 13, 2018

@pragnagopa I already change it and didnt work :(. Do you have any little example in java that is running correctly? I want to discard that the problem is my environment

@pragnagopa
Copy link
Member

@gvacaguzman - Your existing Java function should keep working with the previous version of functions runtime. Please note that java functions with that use new package names are only compatible with current release of the runtime. If you are still having an issue with existing java functions without any code changes, let me know.

@gvacaguzman
Copy link

@pragnagopa I already test it in different ubuntu environments and the issue is still. Attached is the function I am using that was working with old version
unpackage.zip

Please take a look at it and let me know if you found the issue. Thanks in advance

@pragnagopa
Copy link
Member

You are using azure-functions-java-library which is only compatible with the current release 2.0.11857. Please revert to using azure-functions-java-core to use Java functions with runtime version: 2.0.11776-alpha

@pragnagopa
Copy link
Member

pragnagopa commented Jun 13, 2018

Also, here is a work around to use the latest runtime with the deployed java functions:

  • If you have pinned the runtime version, set the app setting FUNCTIONS_EXTENSION_VERSION to beta
  • Update pom.xml
  • Add
<dependency>
            <groupId>com.microsoft.azure.functions</groupId>
            <artifactId>azure-functions-java-library</artifactId>
            <version>1.0.0-beta-4</version>
 </dependency>
  • Delete
<dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-functions-java-core</artifactId>
            <version>1.0.0-beta-3</version>
</dependency>
  • run mvn clean package
  • Update jar file in the deployed Azure Function
    • Goto Kudu console on your function app
    • Copy jar from {functionDirectory}\target\azure-functions{functionName}{youjar}.jar to D:\home\site\wwwroot
    • Delete azure-functions-java-core-1.0.0-beta-3.jar from D:\home\site\wwwroot{functionaname}\lib

Note: Please do not use maven plugin to deploy until we have released an update

@gvacaguzman
Copy link

I used, the second approach and after all the steps in the test view the error says:
Status: 502 Bad Gateway
The specified CGI application encountered an error and the server terminated the process.
Logs:
2018-06-13T21:49:10 Welcome, you are now connected to log-streaming service.
2018-06-13T21:49:17.848 [Information] Executing 'Functions.hello' (Reason='This function was programmatically called via the host APIs.', Id=f2941b57-e37a-4119-8a9a-6461fa74ff7c)
2018-06-13T21:49:45.704 [Error] Timeout value of 00:05:00 exceeded by function 'Functions.hello' (Id: 'f6a82c30-5a37-4d41-a5a4-6b0d4cef39ed'). Initiating cancellation.
2018-06-13T21:49:46.020 [Error] Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.hello.
2018-06-13T21:49:46.116 [Error] Executed 'Functions.hello' (Failed, Id=f6a82c30-5a37-4d41-a5a4-6b0d4cef39ed)
2018-06-13T21:50:01.968 [Information] Executing 'Functions.hello' (Reason='This function was programmatically called via the host APIs.', Id=5556f217-a7d6-4198-bd93-541c176e321f)
2018-06-13T21:51:10 No new trace in the past 1 min(s).
2018-06-13T21:52:10 No new trace in the past 2 min(s).
2018-06-13T21:53:10 No new trace in the past 3 min(s).
2018-06-13T21:54:10 No new trace in the past 4 min(s).
2018-06-13T21:55:01.987 [Error] Timeout value of 00:05:00 exceeded by function 'Functions.hello' (Id: '5556f217-a7d6-4198-bd93-541c176e321f'). Initiating cancellation.
2018-06-13T21:55:02.758 [Error] Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.hello.
2018-06-13T21:55:02.898 [Error] Executed 'Functions.hello' (Failed, Id=5556f217-a7d6-4198-bd93-541c176e321f)
2018-06-13T21:56:10 No new trace in the past 1 min(s).
2018-06-13T21:56:49.822 [Information] Executing 'Functions.hello' (Reason='This function was programmatically called via the host APIs.', Id=0ef3135c-42d3-44f1-899a-9cf69dd53c1c)
2018-06-13T21:58:10 No new trace in the past 1 min(s).
2018-06-13T21:59:10 No new trace in the past 2 min(s).
2018-06-13T22:00:10 No new trace in the past 3 min(s).
2018-06-13T22:01:10 No new trace in the past 4 min(s).
2018-06-13T22:01:49.843 [Error] Timeout value of 00:05:00 exceeded by function 'Functions.hello' (Id: '0ef3135c-42d3-44f1-899a-9cf69dd53c1c'). Initiating cancellation.
2018-06-13T22:01:50.393 [Error] Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.hello.
2018-06-13T22:01:50.478 [Error] Executed 'Functions.hello' (Failed, Id=0ef3135c-42d3-44f1-899a-9cf69dd53c1c)

@jdneo
Copy link

jdneo commented Jun 14, 2018

New version of The Maven Tooling has been released:

  • Maven Azure Functions plugin: 1.0.0-beta-2
  • Maven Azure Functions Archetype: 1.11

The newest version of the maven Toolings is compatible with the newest service side runtime. You can find more details about what parts have been changed here: Azure/app-service-announcements#112 (comment)

Please note that it will take 2~3 days for Maven Central to update the newest version number. If you want to generate the newest Maven Azure Functions Archetype, please explicitly specify the version in your command, for example:

mvn archetype:generate -DarchetypeGroupId=com.microsoft.azure -DarchetypeArtifactId=azure-functions-archetype -DarchetypeVersion=1.11

For those people who still want to stick to the previous version of the service side runtime, please check the FUNCTIONS_EXTENSION_VERSION value in the plugin setting of the pom.xml. You can simply remove it and set the value in the Azure Portal by yourself or specify it to: 2.0.11776-alpha. For example:

<plugins>
    <plugin>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-functions-maven-plugin</artifactId>
        <configuration>
            ...
            <appSettings>
                <property>
                    <name>FUNCTIONS_EXTENSION_VERSION</name>
                    <value>2.0.11776-alpha</value>
                </property>
            </appSettings>
        </configuration>
    </plugin>
<plugins>

Please note that this version will remain available until June 30th.

@reff134-projects
Copy link

Any updates on when this runtime will be released for local testing? We've made the necessary NuGet package updates on our end and deployed to our test environment to confirm that it works with the new runtime, but we can't officially merge our code changes until we have the ability to run these functions locally.

@pragnagopa
Copy link
Member

Azure Functions Core Tools version 2.0.1-beta.29 is released as well. Please update to the latest core tools. To install v2 with npm:

npm i -g azure-functions-core-tools@core --unsafe-perm true

You find more info here: https://github.com/Azure/azure-functions-core-tools

@fabiocav
Copy link
Member Author

This also provides some information on how you can use the NPM installed tools with VS: https://github.com/Azure/azure-functions-vs-build-sdk/wiki/How-to-manually-update-the-Azure-Functions-Core-Tools

@reff134-projects
Copy link

@fabiocav That's actually nice to know. I had already used npm and tested locally that way, but the rest of the team would like to be able to debug this straight from VS. Thanks for the info!

@fabiocav
Copy link
Member Author

Closing this discussion as the deployment was completed and a new deployment cycle has started.

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

No branches or pull requests

9 participants