SRE Release Engineering & CI/CD 2 — Questions and Answers
Question 1: What is the primary purpose of a feature flag in a CI/CD pipeline?
- To block deployments until code review is approved
- To enable or disable features at runtime without redeploying (Correct answer)
- To mark code branches for deletion after merging
- To enforce commit message formatting rules
Correct answer: To enable or disable features at runtime without redeploying
Feature flags allow teams to toggle functionality at runtime, decoupling deployment from release.
Question 2: Which deployment strategy sends a small percentage of production traffic to a new version while the rest uses the old version?
- Blue-green deployment
- Recreate deployment
- Canary deployment (Correct answer)
- Shadow deployment
Correct answer: Canary deployment
Canary deployments route a small slice of traffic to the new version to validate it before full rollout.
Question 3: In a CI pipeline, what does a 'lint' stage primarily check?
- Runtime performance of the application
- Code style, formatting, and static analysis issues (Correct answer)
- Integration with downstream services
- Database migration correctness
Correct answer: Code style, formatting, and static analysis issues
Linting analyzes source code for stylistic and potential programming errors without executing it.
Question 4: What is the key difference between Continuous Delivery and Continuous Deployment?
- Continuous Delivery requires automated tests; Continuous Deployment does not
- Continuous Deployment uses containers; Continuous Delivery does not
- Continuous Delivery requires manual approval before production; Continuous Deployment deploys automatically (Correct answer)
- Continuous Delivery is faster than Continuous Deployment
Correct answer: Continuous Delivery requires manual approval before production; Continuous Deployment deploys automatically
Continuous Delivery stops at a ready-to-deploy state requiring human approval, whereas Continuous Deployment automates the entire path to production.
Question 5: Which artifact repository type is best suited for storing Docker images in a CI/CD workflow?
- Maven Central
- npm registry
- Container registry (e.g., ECR, GCR) (Correct answer)
- PyPI
Correct answer: Container registry (e.g., ECR, GCR)
Container registries like AWS ECR or Google GCR are specifically designed to store and distribute Docker/OCI images.
Question 6: What does 'pipeline as code' mean in modern CI/CD practices?
- Using a GUI to configure pipeline steps
- Defining pipeline configuration in version-controlled files alongside application code (Correct answer)
- Writing pipeline logic in the application's main codebase
- Storing pipeline execution logs in the code repository
Correct answer: Defining pipeline configuration in version-controlled files alongside application code
Pipeline as code means storing pipeline definitions (e.g., Jenkinsfile, .gitlab-ci.yml) in version control for auditability and reproducibility.
Question 7: An SRE wants to prevent a bad release from reaching all users by gradually increasing traffic. Which pattern achieves this?
- Big-bang release
- Progressive delivery (Correct answer)
- Dark launch with no traffic
- Hot patching
Correct answer: Progressive delivery
Progressive delivery incrementally shifts traffic to new versions, allowing validation and rollback at each step.
What is the primary purpose of a feature flag in a CI/CD pipeline?