Share via

ADO Pipeline built WebApp not reflecting changes made

Nicholas Ferguson 20 Reputation points
2025-08-13T19:16:29.5366667+00:00

First, I just need to say that I'm new to deploying in Azure. I imagine I'm making a simple mistake, but for the life of me, I can't figure out what it is.

The Setup--

I'm deploying an app via the App Service. I previously had it set up so that when I committed something to my main branch, it would automatically build my express + react app and it'd be up and running. However, I found over the many publications, Azure would sometimes just fail for no reason. My assumption is some sort of internal timeout. The only thing in the deployment logs would be a broken up line about a broken pipeline. Because of this, I found some articles that mentioned that for bigger apps, it's better to build in an ADO pipeline and deploy the resulting files directly. I've since built my pipeline and it mostly works. The app launches, but many of the requests for the react app chunks were failing. I modified the code to make sure that my express server was correctly serving things, but nothing was changing. I then decided to test and change the chunk names to use hashes (instead of number indicators). After pushing this update, I can still see the requests failing for the old filenames. I added some pipeline debugging and can confirm that the zip file I'm uploading has the correct content. I can also confirm that the WEBSITE_RUN_FROM_PACKAGE variable is set.

I'm at a loss for what might be causing this or where to look. It seems that when WEBSITE_RUN_FROM_PACKAGE is set to 1, /site/wwwroot folder isn't updated, so I can't really rely on that to confirm.

I'm not sure what logging might be helpful here. Happy to edit this with updated information if anyone has any advice on what might clue me/us in on what's happening.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


Answer accepted by question author
  1. Siva Nair 835 Reputation points Microsoft External Staff Moderator
    2025-08-14T09:09:06.9733333+00:00

    Hi Nicholas Ferguson

    That means your app isn’t actually being served from /site/wwwroot at all — which is exactly what happens when WEBSITE_RUN_FROM_PACKAGE is set.

    Where your stale chunks could still come from

    Given you’ve confirmed the correct build is in the package:

    1. Front Door / Azure CDN
      • These will happily serve an old index.html or JS chunks even if Azure App Service has the new ones.
      • Purge it after deploy.
    2. App Service static file caching
      • Even with WEBSITE_DYNAMIC_CACHE=0, App Service can still serve cached static files from its own layer or from an Application Gateway in front.
    3. Service Worker (React PWA)
      • If your app was created with CRA and service workers were once enabled, an old worker can serve stale chunks from the user’s local cache regardless of Azure settings.

    Next steps to actually clear it

    1. Purge any upstream CDN cache
      • If you have Azure Front Door/CDN:
             az afd endpoint purge \
               --resource-group <RG> \
               --profile-name <FDProfile> \
               --endpoint-name <Endpoint> \
               --content-paths "/*"
        
    2. Force index.html to always refresh
      • In Express:
             if (path.endsWith('index.html')) {
               res.setHeader('Cache-Control', 'no-store');
             }
        
    3. Kill any service worker
      • Temporarily add this to your React index.js:
             if ('serviceWorker' in navigator) {
               navigator.serviceWorker.getRegistrations().then(regs => {
                 regs.forEach(reg => reg.unregister());
               });
             }
        
        Optional: Turn off RUN_FROM_PACKAGE If you want full manual control over /site/wwwroot during troubleshooting:
             Remove `WEBSITE_RUN_FROM_PACKAGE`
        
                   Redeploy normally
        
                         Now you can truly delete & confirm files in Kudu.
        

    Your files are updating — they’re just being served from the mounted ZIP, and an upstream cache or service worker is handing out old chunks. The only way to fully prove this is to download the live package and purge all layers of caching above it.

    some reference-

    app-service/reference-app-settings

    how-to-cache-purge

    how-to-cache-purge-cli

    how-to-cache-purge-powershell

    serving-static-assets-with-an-efficient-cache-poli

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.