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

[BUG] Functions no longer callable from logic apps after migrating to V2 model (python) #1439

Open
ManelBH opened this issue Mar 5, 2024 · 6 comments
Assignees

Comments

@ManelBH
Copy link

ManelBH commented Mar 5, 2024

Investigative information

  • Timestamp: 2024-03-05 11:00:00
  • Core Tools version: 4.0.5455

Repro steps

1 - Define a function using the V2 python model and blueprints:

import azure.functions as func
import logging

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)

@app.route()
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    logging.info('Python HTTP trigger function processed a request.')

    name = req.params.get('name')
    if not name:
        try:
            req_body = req.get_json()
        except ValueError:
            pass
        else:
            name = req_body.get('name')

    if name:
        return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
    else:
        return func.HttpResponse(
            "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
            status_code=200)

  1. Deploy the function.
  2. I verify http_trigger shows in the function app in Azure
  3. Try to call the function from a logic app using the "Azure Functions" action

Expected behavior

I can select the "http_trigger" method just like with the V1 model.

Actual behavior

The list of available methods is empty

image

Contents of the requirements.txt file:

azure-functions

Notes:

The same behaviour is observed when using blueprints:

import azure.functions as func
import logging

bp = func.Blueprint()

@bp.route()
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    ...

app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
app.register_blueprint(bp)
@ManelBH ManelBH changed the title [BUG] Functions no longer available to logic apps after migrating to V2 model (python) [BUG] Functions no longer callable from logic apps after migrating to V2 model (python) Mar 5, 2024
@bhagyshricompany bhagyshricompany self-assigned this Mar 11, 2024
@bhagyshricompany
Copy link

Thanks for reporting will check and update.

@bhagyshricompany
Copy link

bhagyshricompany commented Mar 15, 2024

Hi @ManelBH are you trying like this.seems working fine.if not please mention all the steps.Thanks
ref:https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-scenario-function-sb-trigger
image

@ManelBH
Copy link
Author

ManelBH commented Mar 15, 2024

Hi @bhagyshricompany, I'm using Consumption Logic Apps.

@bhagyshricompany
Copy link

ok will update.

@bhagyshricompany
Copy link

@gavin-aguiar pls comment and validate.Thanks

@ManelBH
Copy link
Author

ManelBH commented Aug 28, 2024

Any news?

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