Study guide
5.3 Package Views, Immutability & Quality Promotion
Microsoft Certified: Azure DevOps Engineer Expert AZ-400
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Flow of Work, Traceability & Work Tracking
1.1 Flow of Work, GitHub Flow & Feedback Cycles 1.2 Work Tracking with Azure Boards & GitHub Projects 1.3 End-to-End DevOps Traceability & Quality Tracking
2 Chapter 2: DevOps Metrics, Dashboards & Team Collaboration
2.1 DORA Metrics, Flow Metrics & Dashboard Design 2.2 Lifecycle Metrics Across the Six DevOps Phases 2.3 Work Item Queries, WIQL Charts & Analytics 2.4 Project Documentation: Wikis, Mermaid Diagrams & Release Notes 2.5 Webhooks, Service Hooks & Microsoft Teams ChatOps
3 Chapter 3: Git Branching Strategies & Pull Request Workflows
3.1 Git Branching Models & Strategy Design 3.2 Pull Request Workflows & Merge Strategies 3.3 Branch Policies, Quality Gates & Compliance Restrictions
4 Chapter 4: Repository Management, Optimization & Git Data Operations
4.1 Git LFS Architecture & .gitattributes Tracking 4.2 LFS History Migration, git-fat & File Locking 4.3 Git Repository Scaling, Scalar & Monorepo Governance 4.4 Repository Permissions & Git Tag Governance 4.5 Git Data Recovery & Sensitive-Data Scrubbing
5 Chapter 5: Package Management & Dependency Versioning
5.1 Selecting Package Tools: Azure Artifacts vs. GitHub Packages 5.2 Feed Scoping, Upstream Sources & Pipeline Authentication 5.3 Package Views, Immutability & Quality Promotion 5.4 Dependency Versioning: SemVer, CalVer & Automated Versioning 5.5 Pipeline Artifact Versioning & Artifact Storage Strategy
6 Chapter 6: Pipeline Infrastructure, Agents & Integration
6.1 Selecting a CI/CD Solution: Azure Pipelines vs. GitHub Actions 6.2 GitHub-Azure Pipelines Integration & Hybrid Migration 6.3 Hosted vs. Self-Hosted Agents & Runners 6.4 VMSS Elastic Pools, Container Jobs & Agent Governance 6.5 Pipeline Triggers, Filters & Concurrency Management
7 Chapter 7: YAML Pipeline Architecture & Reusable Elements
7.1 YAML Pipeline Anatomy: Stages, Jobs, Steps & Workspaces 7.2 Job Execution Order: DAG Dependencies, Parallelism & Conditions 7.3 Reusable Elements: Templates, Parameters & Variables 7.4 Variable Groups, Secret Variables & Key Vault Linking 7.5 YAML Environments, Checks & Deployment Approvals
8 Chapter 8: Testing Strategy, Quality Gates & Code Coverage
8.1 Test Strategy Design: Local, Unit & Integration Testing 8.2 Load, Stress & Performance Testing in Pipelines 8.3 Test Execution Tasks, Agents & Results Integration 8.4 Code Coverage Analysis & SonarQube Integration 8.5 Quality Gates, Release Gates & Governance Checks
9 Chapter 9: Modern Deployment Strategies & Zero-Downtime Delivery
9.1 Progressive Delivery: Blue-Green, Canary & Ring Deployments 9.2 Minimizing Downtime: Deployment Slots & Rolling Updates 9.3 Feature Flags with Azure App Configuration & Feature Manager 9.4 Designing the High-Priority Hotfix Path 9.5 Ordered Dependency Deployments, Resiliency & Rollback
10 Chapter 10: Artifact Deployment & Database DevOps
10.1 Containerized Application Delivery: ACR, AKS & Container Apps 10.2 Binary, Web App, Function & Scripted Deployments 10.3 Database DevOps: State-Based & Migration-Based Strategies
11 Chapter 11: Infrastructure as Code (IaC) & Azure Deployment Environments
11.1 Infrastructure as Code Strategy: Bicep, ARM & Terraform 11.2 Desired State Configuration & Azure Machine Configuration 11.3 Azure Deployment Environments (ADE) & Developer Self-Service
12 Chapter 12: Pipeline Maintenance, Health & Modernization
12.1 Pipeline Health, Flaky Tests & Reliability Engineering 12.2 Pipeline Optimization: Caching, Slicing & Concurrency 12.3 Artifact & Build Retention Governance 12.4 Modernizing CI/CD: Classic to YAML Migration
13 Chapter 13: Authentication, Authorization & Identity Governance
13.1 Microsoft Entra Service Principals & Managed Identities 13.2 Service Connections, Workload Identity & Personal Access Tokens 13.3 Azure DevOps Projects, Teams & Permission Evaluation 13.4 Access Levels, GitHub Roles & Outside Collaborators
14 Chapter 14: Secrets Management, Sensitive Data & DevSecOps Scanning
14.1 Azure Key Vault, Secret Variables & Secretless CI/CD 14.2 Security Scanning Strategy, GHAS & Secret Scanning 14.3 CodeQL SAST in Pipelines and Containers 14.4 Software Supply Chain, Container Scanning & Cloud Defender
15 Chapter 15: Telemetry Collection, Azure Monitor & Alerting
15.1 Azure Monitor Architecture, AMA & Data Collection Rules 15.2 Application Insights & Specialized Azure Monitor Insights 15.3 Alerting Rules, Action Groups & GitHub Repository Insights
16 Chapter 16: Telemetry Analysis, Distributed Tracing & SRE Practices
16.1 Distributed Tracing, Application Map & Exception Triage 16.2 KQL Log Analytics, SRE Observability & Error Budgets
5.3 Package Views, Immutability & Quality Promotion
Key Takeaways Explain This Topic AI
Feed views act as filtered, read-only subsets of an Azure Artifacts feed, allowing organizations to share only vetted, production-ready package versions with downstream consumers.
Azure Artifacts strictly enforces package immutability: once a package ID and version string (e.g., 2.1.0) are published, they cannot be modified, overwritten, or re-published under any circumstances.
The default view hierarchy comprises @local (all directly published and upstream packages), @prerelease (packages under testing/validation), and @release (certified, production-ready packages).
Quality promotion is a metadata operation that links an existing package version to a higher view (e.g., @release) without rebuilding binaries or modifying version identifiers, ensuring build reproducibility.
Role-Based Access Control (RBAC) separates duties: Reader grants read/restore access (typically scoped to @release), Contributor allows publishing and promoting, and Owner manages feed policies and views.
Last updated: September 2026
5.3 Package Views, Immutability & Quality Promotion
Quick Summary: In enterprise DevOps, teams must never release unvetted packages directly to downstream consumers. However, creating separate feeds for development, staging, and production violates package immutability and creates operational overhead. Azure Artifacts solves this through Feed Views—read-only, filtered subsets of a single feed. In Exam AZ-400, candidates must master package immutability, default views ( @local , @prerelease , @release ), automated promotion via REST APIs and Azure Pipelines, and feed RBAC roles.
The Architectural Dilemma: Multiple Feeds vs. Feed Views
When teams begin formalizing their release processes, a common architectural temptation is to create separate feeds for each stage of the development lifecycle: Multi-Feed Anti-Pattern (DO NOT IMPLEMENT):
- [Build Pipeline] ──► Push ──► [Dev-Feed]
- │
- ▼ (Re-download & re-push)
- [Test-Feed]
- │
- ▼ (Re-download & re-push)
- [Prod-Feed]
- Why the Multi-Feed Architecture Fails
Violation of Package Immutability: Moving a package between separate physical feeds requires downloading the package binary, extracting it, and republishing it to the next feed. This process often changes metadata, invalidates digital code signatures, and breaks cryptographic checksums.
Rebuilding Creates Non-Deterministic Binaries: Some teams attempt to "rebuild from source" for production feeds. This directly violates the core continuous delivery principle: Build binaries once, promote them through environments unchanged . A rebuild produces new compiler timestamps, differing assembly hashes, and potential dependency drift.
Broken Dependency Graphs: In multi-feed architectures, downstream consumers must continually update their package manager endpoints ( nuget.config or .npmrc ) depending on which environment they are testing in.
Storage Duplication & Inefficiency: Storing identical multi-gigabyte package binaries across three separate feeds triples storage costs and complicates audit compliance.
The Solution: Feed Views
Feed Views provide a 1:N projection over a single physical feed . Instead of copying packages across physical repositories, packages remain stored once in the feed. A view acts as a filtered, read-only lens that exposes only those package versions that have attained a specific level of testing, validation, and maturity. Feed View Architecture (The Azure Artifacts Standard):
- +-----------------------------------------------------------------------------+
- | Azure Artifacts Feed: [Shared-Enterprise-Components] |
- | |
- | Physical Storage (Immutable): |
- | - Contoso.Core 1.0.0 (Promoted to: @local, @prerelease, @release) |
- | - Contoso.Core 1.1.0-preview (Promoted to: @local, @prerelease) |
- | - Contoso.Core 1.2.0-nightly (Visible only in: @local) |
- | - Newtonsoft.Json 13.0.3 (Upstream cached in: @local) |
- +-----------------------------------------------------------------------------+
- │ │ │
- ▼ View: @local ▼ View: @prerelease ▼ View: @release
- [All packages & upstreams] [Validated by QA/Staging] [Certified for Production]
- Endpoints: Endpoints: Endpoints: .../Shared-Enterprise-
.../Shared-Enterprise- .../Shared-Enterprise- Components@release/...
Components/nuget/v3/index.json Components@prerelease/...
The Built-In Views & The Quality Promotion Lifecycle
Azure Artifacts provides three default, built-in views representing stages in the software maturity lifecycle:
1. @local
Purpose: The default entry point and working view of the feed.
Contents: Every package published directly into the feed enters @local automatically. Furthermore, all packages retrieved and cached from external upstream sources (such as nuget.org or npmjs.com ) reside in @local .
Audience: Developers testing bleeding-edge builds, experimental branches, and nightly CI integration pipelines.
2. @prerelease
Purpose: Represents packages that have successfully compiled, passed static code analysis (SonarQube), and passed initial automated unit tests.
Contents: Contains package versions explicitly promoted from @local that are deemed ready for broader integration testing, quality assurance (QA), and user acceptance testing (UAT).
Audience: QA test automation rigs, staging environment deployment pipelines, and external pilot integration teams.
3. @release
Purpose: The highest quality gate in the organization.
Contents: Only packages that have completed all functional validation, compliance scanning (e.g., license audits, container scanning, secret detection), performance benchmarking, and formal change-management approvals are promoted here.
Audience: Production deployment pipelines and general downstream consumers. Consuming applications configure their package managers to target the @release view endpoint, ensuring they never accidentally restore a development snapshot or untested pre-release build.
Custom Views
Organizations can create custom views (up to a maximum of 10 views per feed ). Common custom view patterns include:
@lts : Long-Term Support packages maintained for multi-year regulatory releases.
@fast-track : For internal early-adopter teams testing upcoming APIs.
@deprecated : Flagging packages slated for retirement.
Consuming Feed Views via URLs
To consume a specific view, append the view name prefixed with an @ symbol to the feed segment in the endpoint URL: # Consuming the root feed (includes all @local packages): https://pkgs.dev.azure.com/{org}/{proj}/_packaging/{feed}/nuget/v3/index.json
# Consuming the @release view exclusively: https://pkgs.dev.azure.com/{org}/{proj}/_packaging/{feed}@release/nuget/v3/index.json
# Consuming the @prerelease view: https://pkgs.dev.azure.com/{org}/{proj}/_packaging/{feed}@prerelease/nuget/v3/index.json
When a downstream project configures its nuget.config or .npmrc to point to @release , the package manager cannot even see packages in @local or @prerelease . If a package version has not been promoted to @release , any attempt to restore it returns 404 Not Found .
The Package Immutability Principle
A cornerstone of modern DevOps and supply chain integrity is Package Immutability :
Core Rule: Once a package with a specific identifier and version string (e.g., Contoso.Security 2.4.0 ) is published to Azure Artifacts, that version is permanently immutable . It can never be overwritten, modified, updated, or re-published.
The Mechanics of 409 Conflict
If a developer discovers a bug in Contoso.Security 2.4.0 thirty minutes after pushing it, rebuilds the package locally, and attempts to re-push the identical version 2.4.0 : # Developer attempts to push updated package with same version
dotnet nuget push Contoso.Security.2.4.0.nupkg --source "CoreFeed"
# Output:
# Response status code does not indicate success: 409 (Conflict - The feed already contains 'Contoso.Security 2.4.0').
Azure Artifacts immediately terminates the upload with HTTP 409 Conflict . This behavior is deliberate and non-bypassable:
Deleting the package does not free the version number: If an administrator deletes Contoso.Security 2.4.0 from the feed, it is moved to the Recycle Bin. Even if the package is permanently purged from the Recycle Bin, Azure Artifacts permanently reserves the version identifier . The feed will continue to reject any future push of version 2.4.0 .
Why Immutability Matters for Auditing & Reproducibility: If versions could be overwritten, two developers building the same commit hash could receive different binary logic depending on when they ran dotnet restore . A rogue developer or compromised CI pipeline could overwrite a legitimate library with backdoored code without changing the version number.
The Only Valid Solution: The developer must increment the version number according to Semantic Versioning (e.g., to 2.4.1 for a bug fix) and publish the new version.
Package Quality Promotion Workflows
Promoting a package version does not alter package binaries, recalculate hashes, or change version numbers. Instead, promotion is a lightweight metadata operation that attaches a view label ( @prerelease or @release ) to the existing package record in the feed database. Package Promotion Sequence:
1. CI Build Stage:
- Compile code & run unit tests
- Pack Contoso.Core 2.1.0
- Push to Azure Artifacts (Lands in @local)
2. Automated QA Stage:
- Restore from @local
- Run integration & regression test suites
- Tests Pass ──► Promote Contoso.Core 2.1.0 to @prerelease
3. Staging / UAT Stage:
- Test applications restore from @prerelease
- Security scanning & compliance approval passes
- Approval Granted ──► Promote Contoso.Core 2.1.0 to @release
4. Production:
- Production applications restore strictly from @release
- Methods of Promotion
Azure DevOps Web Interface: Navigate to Artifacts > Select Feed > Select Package > Select Version > Click Promote > Select target view ( @prerelease or @release ).
- Azure CLI: Using the az artifacts command: az artifacts package nuget promote \
- -organization "https://dev.azure.com/contoso" \
- -project "RetailBanking" \
- -feed "CoreComponents" \
- -name "Contoso.Core" \
- -version "2.1.0" \
- -view "release"
Azure DevOps REST API (Recommended for Automated Pipelines): Automated multi-stage YAML pipelines use the packaging REST API to promote packages programmatically after quality gates pass.
REST API Promotion Payload PATCH https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/versions/{packageVersion}?api-version=7.1-preview.1
Content-Type: application/json
- {
- "views": {
- "op": "add",
- "path": "/views/-",
- "value": "release"
- }
- }
- Production-Grade Multi-Stage YAML Pipeline with Quality Promotion Gate
The following YAML pipeline demonstrates an end-to-end promotion workflow. It builds and packs a NuGet library, tests it in a staging environment, and automatically promotes it to @release upon successful staging verification: # azure-pipelines-promotion.yml
trigger:
branches:
include:
- main
pool:
vmImage: 'windows-latest'
variables:
- feedName: 'RetailBanking/EnterpriseFeed'
- packageName: 'Contoso.Financial.Core'
- packageVersion: '3.2.0'
stages:
- stage: BuildAndPublish
- displayName: 'Build, Pack & Publish to @local'
jobs:
- job: BuildJob
steps:
- task: DotNetCoreCLI@2
- displayName: 'Compile Solution'
inputs:
- command: 'build'
- projects: '**/*.csproj'
- arguments: '--configuration Release'
- task: DotNetCoreCLI@2
- displayName: 'Pack NuGet Package'
inputs:
- command: 'pack'
- packagesToPack: '**/*.csproj'
- versioningScheme: 'off'
- outputDir: '$(Build.ArtifactStagingDirectory)'
- task: NuGetAuthenticate@1
- displayName: 'Authenticate with Azure Artifacts'
- task: DotNetCoreCLI@2
- displayName: 'Publish Package to Feed (@local)'
inputs:
- command: 'push'
- packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
- publishVstsFeed: '$(feedName)'
- stage: QualityValidation
- displayName: 'Automated Integration Testing'
- dependsOn: BuildAndPublish
jobs:
- job: TestJob
steps:
- script: echo "Running automated integration, regression, and security scans..."
- displayName: 'Execute Test Suite'
- stage: PromoteToRelease
- displayName: 'Promote Package to @release'
- dependsOn: QualityValidation
- condition: succeeded()
jobs:
- job: PromoteJob
steps:
- task: PowerShell@2
- displayName: 'Promote to @release View via REST API'
inputs:
- targetType: 'inline'
- script: |
- $org = "$(System.CollectionUri)"
- $project = "$(System.TeamProject)"
- $feed = "EnterpriseFeed"
- $pkg = "$(packageName)"
- $ver = "$(packageVersion)"
- $token = "$(System.AccessToken)"
$url = "https://feeds.dev.azure.com/$(System.TeamProject)/_apis/packaging/feeds/$feed/nuget/packages/$pkg/versions/$ver`?api-version=7.1-preview.1"
- $headers = @{
- Authorization = "Bearer $token"
- "Content-Type" = "application/json"
- }
- $body = @{
- views = @{
- op = "add"
- path = "/views/-"
- value = "release"
- }
- } | ConvertTo-Json
- Invoke-RestMethod -Uri $url -Method Patch -Headers $headers -Body $body
- Write-Host "Successfully promoted $pkg $ver to @release view."
env:
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- Feed Permissions, Roles & Segregation of Duties
Azure Artifacts uses an explicit Role-Based Access Control (RBAC) model to enforce security boundaries and compliance requirements (e.g., Sarbanes-Oxley 404 segregation of duties). Feed Role Hierarchy & Capabilities:
- [Reader]
- └── Query, read, and restore packages from feed or designated views
- [Collaborator]
- └── Inherits Reader + Ability to save/cache packages from external Upstream Sources
- [Contributor]
- └── Inherits Collaborator + Push new packages, unlist packages, and promote packages to views
- [Owner]
- └── Inherits Contributor + Edit feed settings, add/remove upstreams, manage views, configure RBAC
- Role Definitions & Capabilities
Feed Role Can Read Packages? Can Save Upstream Packages? Can Push / Publish Packages? Can Promote to Views? Can Manage Views & Permissions?
- Reader Yes No No No No
- Collaborator Yes Yes No No No
- Contributor Yes Yes Yes Yes No
- Owner Yes Yes Yes Yes Yes
- Configuring Pipeline Identities for Packaging
Azure Pipelines builds authenticate to feeds using the project's build identity:
- Project Collection Build Service ({OrgName}) (for organization-scoped access)
- {ProjectName} Build Service ({OrgName}) (for project-scoped access)
To ensure proper segregation of duties:
Publishing Pipelines: The build pipeline that compiles and publishes packages must be assigned the Contributor role on the feed to allow pushing packages to @local and promoting versions.
Consuming Pipelines: Downstream application pipelines must be assigned only the Reader role, scoped strictly to the @release view endpoint. This guarantees downstream pipelines cannot accidentally push untracked packages or promote unvetted versions.
Human Developers: Enterprise teams typically grant developers Reader permissions on internal feeds and require all new package releases to pass through automated build pipelines rather than allowing direct workstation pushes.
- Practical AZ-400 Exam Scenarios & Anti-Patterns
- Scenario 1: Handling HTTP 409 on Hotfix Publishing
Scenario: A developer discovers a critical defect in Contoso.Auth 1.2.0 immediately after publishing. They attempt to overwrite the package by re-running dotnet nuget push , which fails with 409 Conflict . They then delete 1.2.0 from the feed UI and retry pushing, but the push continues to fail.
AZ-400 Solution: Explain package immutability. Azure Artifacts reserves the version string permanently, even after deletion from the recycle bin. The developer must increment the version to 1.2.1 (or 1.2.0.1 ), compile, and publish the new version.
Scenario 2: Restricting Production Pipelines to Certified Dependencies
Scenario: An enterprise requires that production deployment pipelines restore only packages that have been formally reviewed, security-audited, and approved by the architecture board. Staging pipelines must be able to test upcoming candidates without exposing them to production.
AZ-400 Solution: Configure feed views in Azure Artifacts. Core builds publish candidates to @local . When candidates pass automated integration testing, promote them to @prerelease . After architectural review, promote them to @release . Configure production application nuget.config files to point strictly to the .../CoreFeed@release/... endpoint.