Designing and Implementing Microsoft DevOps Solutions: AZ-400 Exam - Recommended Solution to Reduce Azure Pipelines Execution Time

Enable Parallel Jobs for Faster Pipeline Execution Time

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You use Azure Pipelines to build and test a React.js application.

You have a pipeline that has a single job.

You discover that installing JavaScript packages from npm takes approximately five minutes each time you run the pipeline.

You need to recommend a solution to reduce the pipeline execution time.

Solution: You recommend enabling parallel jobs for the pipeline.

Does this meet the goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

B

Instead enable pipeline caching.

Note:

npm-cache is a command line utility that caches dependencies installed via npm, bower, jspm and composer.

It is useful for build processes that run [npm|bower|composer|jspm] install every time as part of their build process. Since dependencies don't change often, this often means slower build times. npm-cache helps alleviate this problem by caching previously installed dependencies on the build machine.

https://www.npmjs.com/package/npm-cache

The proposed solution to enable parallel jobs for the pipeline would not directly address the issue of lengthy npm package installation times.

Parallel jobs would allow for multiple jobs to run concurrently, potentially reducing the overall execution time of the pipeline. However, it would not reduce the time it takes to install JavaScript packages from npm.

To reduce npm package installation times, there are a few potential solutions that could be considered:

  1. Cache npm packages: Azure Pipelines provides a caching mechanism that can be used to cache npm packages between pipeline runs. By caching the packages, subsequent pipeline runs can reuse the cached packages rather than reinstalling them from scratch.

  2. Use a package manager other than npm: While npm is a popular package manager for JavaScript projects, other options such as Yarn or pnpm may provide faster package installation times.

  3. Reduce the number of packages being installed: Review the dependencies of the project and remove any unnecessary or unused packages to reduce the number of packages being installed.

Overall, while enabling parallel jobs may help to reduce the overall execution time of the pipeline, it does not directly address the issue of lengthy npm package installation times. Therefore, the answer would be B. No, enabling parallel jobs alone would not meet the goal of reducing pipeline execution time due to npm package installation.