Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Zipdeploy over REST API does not update files - caching problem #2913

Closed
vivek-555 opened this issue Dec 5, 2018 · 3 comments
Closed

Zipdeploy over REST API does not update files - caching problem #2913

vivek-555 opened this issue Dec 5, 2018 · 3 comments

Comments

@vivek-555
Copy link

vivek-555 commented Dec 5, 2018

Repro steps.

your project built successfully on your dev machine but failed on Azure?

No

please write down your build tools and their versions (ie Msbuild 15.1.0.0)

We do not compile we run js

Project structures.

Can't share as it is a company project but can provide the summary below:
It is an Azure Function project with different NPM packages as dependencies. Below is host.json file:

host.json

{
  "version": "2.0",
  "extensions": {
    "serviceBus": {
      "maxConcurrentCalls": 1,
      "prefetchCount": 100,
      "autoRenewTimeout": "00:05:00"
    }
  },
  "functions": [
    "http-test-function1",
    "http-test-function2",
     "servicebus-test-function1",
     "servicebus-test-function2"
  ],
  "functionTimeout": "00:10:00",
  "fileWatchingEnabled": false,
  "tracing": {
    "consoleLevel": "verbose"
  },
  "logger": {
    "categoryFilter": {
      "defaultLevel": "verbose",
      "categoryLevels": {
        "Host.Results": "verbose",
        "Function": "verbose",
        "Host.Aggregator": "verbose"
      }
    }
  }
}

function.json

{
  "disabled": false,
  "bindings": [
    {
      "authLevel": "function",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req",
      "route": "v0/http-test-function1",
      "methods": ["post"]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "$return"
    }
  ]
}

The log/error given by the failure.

No error is logged.

Debug your Azure website remotely.

The Azure Functions works fine the problem happens only when we deploy(using Azure DevOps) because it is not able to replace the build completely(may be it is using some kind of caching of old data).

Mention any other details that might be useful.

We use Azure DevOps's release pipeline to roll out new build. The build is created perfectly i.e it has all the code and all the updated npm packages. The problem comes when Kudu tries to replace the old build with the new one because it is unable to replace certain packages(which is recently updated) may be because of Efficient File Copyof ZipDeploy(we use kudu REST to deploy) it is unable to completely update the target.
Is there a way we could replace all the files? by setting some flag forcing Kudu to replace completely. Below are 3 cases through which we tried to resolve the issue:

CASE 1) We tried deleting the files of the npm package

  • We did npm install and zip folder in Azure DevOps.
  • We verified that the produced artifact is containing the latest version of npm package
  • Redeployed over REST API(Kudu)
  • We then checked the files through App Service Kudu portal.
    Result: Old file version is loaded although zip file does not contain it.

CASE 2) We then tried deleting the whole npm package

  • We did npm install and zip folder in Azure DevOps.
  • We verified that the produced artifact is containing the latest version of npm package
  • Redeployed over REST API(Kudu)
  • We then checked the files through App Service Kudu portal.
    Result: Again old file version is loaded.

CASE 3) We then tried deploying from local machine through REST API
Result: New version of file is loaded.

Question: Is there a flag we could send while using REST to completely replace the file instead of efficiently trying to update the package ?

@vivek-555 vivek-555 changed the title Zipdeploy over REST API does not update files Zipdeploy over REST API does not update files[updated] Dec 6, 2018
@vivek-555 vivek-555 changed the title Zipdeploy over REST API does not update files[updated] Zipdeploy over REST API does not update files - caching problem Dec 20, 2018
@rochapablo
Copy link

No one?!

@suwatch
Copy link
Member

suwatch commented Dec 13, 2019

We can help taking a look.

  • Is the site in that state (eg. case 1) or 2) or 3)?). Better yet try repro one now (choose any case).
  • Share sitename.
  • Describe what folder path was deleted but still showing on Kudu Portal.
  • What is WEBSITE_RUN_FROM_PACKAGE settings?
  • When in UTC when you deploy?
  • DevOps log?

@jvano
Copy link
Member

jvano commented Apr 29, 2024

Hi

If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

This way we can better track and assist you on this case

Thanks,

Joaquin Vano
Azure App Service

@jvano jvano closed this as completed Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants