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

Blob trigger function runs in Azure CLI and does not run in cloud #174

Closed
dimatomp opened this issue Jun 12, 2018 · 8 comments
Closed

Blob trigger function runs in Azure CLI and does not run in cloud #174

dimatomp opened this issue Jun 12, 2018 · 8 comments

Comments

@dimatomp
Copy link

dimatomp commented Jun 12, 2018

A blob trigger with the following Kotlin signature runs on local machine and ignores the created blobs in Azure cloud.

class Function {
    @FunctionName("hello")
    fun hello(
        @BlobTrigger(path = "container/{source}/daemon.lock", connection = "AzureWebJobsStorage", name = "BlobTrigger") @BindingName("source") source: String, 
        context : ExecutionContext) {

Plugin name and version

azure-functions-maven-plugin:1.0.0-beta-1

Plugin configuration in your pom.xml

<configuration>
    <resourceGroup>${functionResourceGroup}</resourceGroup>
    <appName>${functionAppName}</appName>
    <region>${functionAppRegion}</region>
    <pricingTier>B1</pricingTier>
    <appSettings>
        <property>
             <name>FUNCTIONS_EXTENSION_VERSION</name>
             <value>beta</value>
        </property>
    </appSettings>
</configuration>

Expected behavior

The blob trigger runs both on local machine and in Azure cloud.

Actual behavior

The created blobs are ignored by deployed app (or maybe it will throw NoSuchMethodException).

Steps to reproduce the problem

  1. Download and unpack the minimal example: azure-issue-example.zip
  2. Create a local.settings.json with appropriate AzureWebJobsStorage and AzureWebJobsDashboard
  3. mvn package azure-functions:run
  4. Create a blob with path container/<your string>/daemon.lock, observe that the function is triggered
  5. mvn azure-functions:deploy, create App Insights for the function app
  6. Create another blob to trigger the function, observe no invocations (or maybe a failure) in App Insights
@jdneo
Copy link
Member

jdneo commented Jun 13, 2018

@dimatomp Could you please try to set the FUNCTIONS_EXTENSION_VERSION to 2.0.11776-alpha.

You can find this kay-value pair in the Function App's Application Ssettings view

@dimatomp
Copy link
Author

dimatomp commented Jun 13, 2018

@jdneo Thanks, it solved my problem, I will use this workaround for a while.
I have also tried setting FUNCTIONS_EXTENSION_VERSION to 2.0.11776.0 - Azure Portal displayed a warning that a later version of the extension would be used but the issue persisted.

@jdneo
Copy link
Member

jdneo commented Jun 14, 2018

@dimatomp This is due to the service side change recently. Maven tooling is trying to release a fix. I will notice you when it's published. Sorry for the inconvenience.

@jdneo
Copy link
Member

jdneo commented Jun 14, 2018

@dimatomp The new Maven Tooling is released. Please have a try when you have time.

You can find more details here: Azure/app-service-announcements-discussions#50 (comment)

@dimatomp
Copy link
Author

@jdneo I've changed azure-functions-maven-plugin version to 1.0.0-beta-2, updated azure-functions-core-tools to 2.0.1-beta.29, set FUNCTIONS_EXTENSION_VERSION back to beta and re-deployed the example - now Portal does not show any functions in the application.
Is this behaviour reproducible or there is only my fault?

@dimatomp
Copy link
Author

Hmm, but it also finds no functions during package phase - looks like annotation rules have also changed.

@jdneo
Copy link
Member

jdneo commented Jun 15, 2018

@dimatomp I see. Sorry I didn't make it clear. Guess this is because the artifact and package names have been changed. Please take a look at this issue for details: Azure/app-service-announcements#112 (comment).

Basically some of the source code and the dependency in pom.xml need to be changed.

@dimatomp
Copy link
Author

@jdneo I've successfully migrated the app according to these instructions. Thank you very much for help!

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

No branches or pull requests

2 participants