Azure / Azure/azure-functions-host

Azure Function V.2 (PowerShell) occasionally running on old application configuration and old code after deployment

Open
#7,750 2 comments 0 reactions 1 assignee Claimed by @v-bbalaiagar View on GitHub
needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#### Investigative information

Please provide the following:

- Timestamp: 2021-10-07 15:03:38.124
- Function App version: 2.0
- Function App name: ---
- Function name(s) (as appropriate): ---
- Invocation ID: 2f73df2c-f3b4-468a-9520-efc39e5f82a0
- Region: West Europe

#### Repro steps

Provide the steps required to reproduce the problem:

I do not have identified any repro steps yet as the issue shows only occasionally

#### Expected behavior

After I deploy a new version of my PowerShell Azure Function App, functions start to run with new code and configuration.

#### Actual behavior

After I deploy a new version of my PowerShell code to my Function App via VSCode, some instances continue to run with old app configuration (even 1-2 weeks old) and sometimes also old code (some hours old).
This was detected by logging all environment variables with `Get-ChildItems env: | Out-String` in order to find changed application settings and logging a version string of the deployment for finding old code.

Code is deployed by turning function off, deploying via VS Code & turning it on again. Waiting up to 10 minutes before restarting the Function App does not change anything. Deployment consistently shows as "successful" in the portal, local log however shows
`WARNING: Deployment succeeded, but failed to list http trigger urls.`

Settings:
`WEBSITE_RUN_FROM_PACKAGE= 0`
`SCM_DO_BUILD_DURING_DEPLOYMENT = false`

#### Known workarounds

None

#### Related information

Provide any related information

* Programming language used: PowerShell Core

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.