Azure / Azure/azure-functions-python-worker

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

Aperta
#1,615 7 commenti 0 reazioni 1 assegnatario Rivendicata da @JAdluri Vedi su GitHub
needs-attention :wave:
Lingua principale
Python
Stelle
357
Fork
116
Merge medio
32m
PR unite (30g)
1

Descrizione

### 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')
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.