Search code examples
azure-devopsaws-sdkaws-sdk-jsazure-devops-extensions

Make the aws-sdk node_module available to my Azure DevOps Extension


I'm trying to develop an Azure DevOps extension similar to the official AWS Toolkit for Azure DevOps Extension.

What I'm struggling with is the fact that the aws-sdk is 45MB in size, but Azure DevOps extensions are limited to a 26MB upload size.

How does the official extension get their references to the aws-sdk working? It doesn't exist anywhere in the vsix extension package when I unzip it.

Has anyone else ran into this file size restriction problem before?


Solution

  • We limit VSTS extension sizes to 25 Mb (we can go up to max 100 MB) and allow exceptions only in certain cases. We worked with the publisher here to understand their requirement and increased the size limit as an exception for their publisher.

    Take a look at this similar question here: The extension package size exceeds the maximum package size '26214400 bytes'

    Before increasing package size, Could you please optimize. Suggestions:

    • Can the common dependences, if any, be stated once in the extension package?
    • Fetch things at runtime or during install time rather that providing it within the package. Consider using the tool installer lib to pull tool dependencies at runtime. Using the lib offers benefits where the tool is cached by version so for private agents, it won't get downloaded every build. We made it a lib so it can be used outside of tool installer tasks. The one consideration, is the task will not work in disconnected scenarios (no internet). That should just be in the description / docs for the task.
    • Some customers have had good success with WebPack to tree shake their dependencies in their tasks.

    If you still blocked, you have to contact our VS Marketplace Support Team and try to extend the limitation.