Closed taisuke-fujimoto closed 4 months ago
same for me, running it with --stacktrace
I see the following stacktrace. I tried both my own project and the repo of @taisuke-fujimoto
Caused by: org.gradle.api.GradleException: Cannot package functions due to error: null
at com.microsoft.azure.plugin.functions.gradle.task.PackageTask.build(PackageTask.java:57)
... 122 more
Caused by: java.lang.NullPointerException
at com.microsoft.azure.toolkit.lib.common.operation.OperationContext.setTelemetryProperties(OperationContext.java:46)
at com.microsoft.azure.plugin.functions.gradle.task.PackageTask.build(PackageTask.java:44)
... 122 more
pricingTier
and region
parameters are either newly required or poorly handled (creating the null exception) if they don't exist.
Region is probably always needed, but pricingTier can be optional if you're using an app service plan instead of consumption plan. I've submitted a PR that will stop this NPE if the pricingTier is not specified.
@Flanker32 Please include in the changelog that the required properties have changed. Also, please update the wiki.
@taisuke-fujimoto @davidsalter @snesm Thank you all for your support. Yes, this should be an regression of the gradle plugin, and we have merged the PR from @davidsalter, which will be shipped in our June release.
@taisuke-fujimoto @davidsalter @snesm We have released functions gradle plugin 1.16.1, which includes the fix for this issue, thanks again for your help!
When updating to Azure Functions Plugin for Gradle 1.15.0,
azureFunctionsPackage
task now fails with the error below.This does not occur before 1.14.0.
Here is a sample repository: https://github.com/taisuke-fujimoto/azure-gradle-plugins-1.15.0-bug
Checked on my PC (Windows 10) and GitHub Actions (Ubuntu latest).