CDM Continuous Integration & Continuous Delivery 5 — Questions and Answers
Question 1: Which strategy minimizes deployment risk by maintaining two identical production environments and switching traffic between them?
- Canary Release
- Rolling Update
- Blue-Green Deployment (Correct answer)
- Shadow Deployment
Correct answer: Blue-Green Deployment
Blue-Green deployment keeps a live (blue) and an idle (green) environment; after validating the new version in green, traffic is instantly switched, enabling instant rollback by switching back.
Question 2: What is the DevOps concept of 'fast feedback' primarily designed to address?
- Reducing the cost of cloud infrastructure by optimizing resource usage
- Minimizing the delay between introducing a defect and discovering it so fixes remain cheap (Correct answer)
- Speeding up the product backlog prioritization process
- Accelerating annual performance review cycles for engineering teams
Correct answer: Minimizing the delay between introducing a defect and discovering it so fixes remain cheap
Fast feedback loops ensure developers learn about defects within minutes of introducing them, when the code context is fresh and the fix is trivial.
Question 3: A pipeline stage runs static code analysis and reports 500 warnings but the build still passes. What is the most appropriate improvement?
- Disable static analysis to reduce pipeline noise
- Define quality gates that fail the build when warnings exceed a defined threshold (Correct answer)
- Move static analysis to a nightly batch job instead of per-commit
- Have developers manually review static analysis reports after each sprint
Correct answer: Define quality gates that fail the build when warnings exceed a defined threshold
Quality gates enforce that static analysis results meet a threshold; without enforced gates, warnings accumulate and the tool provides no real quality control.
Question 4: What is a 'release train' model in the context of CD?
- A deployment technique where changes are batched and released on a fixed schedule regardless of individual feature readiness (Correct answer)
- A continuous deployment approach where every commit is deployed instantly
- A method of deploying microservices in dependency order
- An automated rollback mechanism triggered by error rate thresholds
Correct answer: A deployment technique where changes are batched and released on a fixed schedule regardless of individual feature readiness
A release train deploys on a fixed cadence (e.g., every two weeks); features ready by the cutoff ride the train, others wait for the next one.
Question 5: Which practice in CI ensures that the integration of all developer changes does not produce a 'broken build' that blocks the entire team?
- Requiring all commits to be squashed into a single daily merge
- Using feature flags to hide incomplete work and committing to the mainline frequently (Correct answer)
- Enforcing a code freeze one week before every release
- Running integration tests only on the release branch
Correct answer: Using feature flags to hide incomplete work and committing to the mainline frequently
Feature flags allow developers to merge incomplete code to the mainline without exposing it to users, enabling frequent integration while keeping the build green.
Question 6: What does 'environment parity' mean in a CD pipeline?
- Ensuring all developers use the same IDE and plugins
- Keeping development, staging, and production environments as identical as possible to reduce 'works on my machine' failures (Correct answer)
- Running equal numbers of unit and integration tests
- Deploying to all environments simultaneously in a single pipeline run
Correct answer: Keeping development, staging, and production environments as identical as possible to reduce 'works on my machine' failures
Environment parity minimizes configuration drift between environments so behavior observed in staging reliably predicts behavior in production.
Question 7: In a microservices CD pipeline, what challenge does 'contract testing' specifically address?
- Ensuring legal compliance documentation is updated with each service deployment
- Verifying that the API contract between a consumer and provider service is honored without deploying both together (Correct answer)
- Testing that all microservices handle peak load simultaneously
- Validating that deployment manifests match the approved architecture diagram
Correct answer: Verifying that the API contract between a consumer and provider service is honored without deploying both together
Contract testing (e.g., with Pact) lets each service team verify compatibility with its consumers and providers independently, enabling decoupled deployments.
Which strategy minimizes deployment risk by maintaining two identical production environments and switching traffic between them?