Skip to content

Issues with KuduSync on App Service #36

@jamiehs

Description

@jamiehs

Hey all,
I'm having an issue with KuduSync and some of our slots on Azure App service (Linux).

We have a Jenkins job that builds the project (static site from a React stack) and once this is built, it zips the essential files (the HTML, JS bundles, and other static assets) before being sent to App Service using the zip deploy API. From here it is deployed to an Express server that handles authentication and some other aspects.

The main thing that's happening is that the deploy is failing with the error: "An unknown error has occurred. Check the diagnostic log for details." this leads to a log that simply fails during KuduSync.

The symptom that we are seeing is that files will just be missing from the slot, and in some cases they are non-critical files like styles and fonts. It's not the same files each time either... It looks like a recursive copy failed partway through.

Something else that’s worth noting…
Our files in our builds are fingerprinted. Each time a file is modified, a hash is appended to the filename like this: main.eff568f.js it ensures that caching is invalidated if the contents of the file change.
In the KuduSync documentation, it says: “…will only copy changed files and delete files that don't exist in the destination but only if they were part of the previous deployment.”

This is concerning to me because it implies that fingerprinted files will never be deleted as they are not part of the previous deployment, and are not changed either. Fingerprinted files from the last deployment are at risk of being orphaned; (although ideally all files would be cleaned before a new deployment is copied into the web root). We originally tried to code around this issue, but we were unable to successfully run rm -rf on the directories in question prior to KuduSync due to some sort of permissions or folder depth limitation.

What would you suggest for completely cleaning the destination before "syncing" the new files into the App Service?

Are there any known limitations with KuduSync and the App Service (Linux) flavor?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions