Microsoft Certified: DevOps Engineer ExpertDesign and implement source controlHard

A team is developing a new application that uses a combination of public open-source NuGet packages and proprietary internal NuGet packages. They want to set up Azure Artifacts to manage these packages. They need to ensure that developers can consume both types of packages from a single feed, prioritizing internal packages when names conflict. Additionally, they want to automatically save any public packages consumed to their internal feed for reliability and auditing. Which Azure Artifacts configuration should they implement?

  1. ACreate a single Azure Artifacts feed and use upstream sources to connect to NuGet.org, with the internal feed as the primary source.
  2. BUse a Universal Packages feed to store both types of packages, manually uploading public packages.
  3. CSet up two separate feeds, one for public and one for internal packages, and configure each project to use both.
  4. DConfigure a Service Hook to copy public packages from NuGet.org to their internal feed whenever a new package is released.
Show answer & explanation

Correct answer: A. Create a single Azure Artifacts feed and use upstream sources to connect to NuGet.org, with the internal feed as the primary source.

Upstream sources in Azure Artifacts allow a single feed to consume packages from multiple sources (e.g., NuGet.org and other internal feeds). By configuring NuGet.org as an upstream source and setting the internal feed as the primary, it resolves conflicts in favor of internal packages. The 'save packages downloaded from upstream sources' feature automatically caches public packages, addressing reliability and auditing requirements.

Why the other options are wrong

  • B. Universal Packages are for custom package types, not standard NuGet packages, and don't automatically sync from NuGet.org.
  • C. Requires configuring multiple feeds in each project and doesn't handle conflict resolution or automatic caching effectively.
  • D. Service Hooks can notify, but don't provide a native solution for automatic package caching and conflict resolution in a feed.

Azure Artifacts Upstream Sources

A feature in Azure Artifacts that allows a single feed to consume packages from other feeds (public or private), providing a unified interface for package consumption and optional caching.

  • Consolidates package consumption from multiple sources.
  • Can automatically cache packages from upstream feeds.
  • Resolves package name conflicts based on feed order.

Memory trick: One feed to rule them all, and in its cache, bind them.

More Design and implement source control questions