Azure / Azure/azure-functions-python-worker

[Bug] Only TimerTrigger function get warning "Auth level is not applied to non http function app"

Open
#1,615 7 comments 0 reactions 1 assignee Claimed by @JAdluri View on GitHub
needs-attention :wave:
Dominant language
Python
Stars
357
Forks
116
Avg merge
32m
Merged PRs (30d)
1

Description

### Expected Behavior

No warning was received.

### Actual Behavior

I get a warning that "Auth level is not applied to non-http function app", when I have not set any Auth level and only using timer triggered functions.

The full warning is: "Auth level is not applied to non http function app. Ref: https://docs.microsoft.com/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=in-process%2Cfunctionsv2&pivots=programming-language-python#http-auth"

### Steps to Reproduce

1. Create a repo with AZ function for python v2 with a single Timer trigger function

### Relevant code being tried

```shell

```

### Relevant log output

```shell

```

### requirements.txt file

```shell

```

### Where are you facing this problem?

Production Environment (explain below)

### Function app name

_No response_

### Additional Information

I think the issue is linked to this code: https://github.com/Azure/azure-functions-python-library/blob/39363d876db17d77b5747f4ce3878305dab235cf/azure/functions/decorators/function_app.py#L3637

The issue I think is

```python

# self._require_auth_level is None

if not self._require_auth_level:
self._require_auth_level = any(
function.is_http_function() for function in functions)

# self._require_auth_level is False since no HTTP functions

if not self._require_auth_level:
# This is triggered, but I do not think it should be?
logging.warning(
'Auth level is not applied to non http '
'function app. Ref: '
'https://docs.microsoft.com/azure/azure-functions/functions'
'-bindings-http-webhook-trigger?tabs=in-process'
'%2Cfunctionsv2&pivots=programming-language-python#http-auth')
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.