189 DevOps Engineer Interview Questions & Answers

105 top • 14 Amazon • 12 Apple • 15 Google • 9 Meta • 14 Microsoft • 8 Netflix • 12 NVIDIA

DevOps Engineer icon

Questions with Detailed ExplanationsWith Detailed Explanations

(Last Updated: September 1, 2026)

101. How would you separate blocking and non-blocking test lanes?Testing And Release ValidationMedium

Question Details

A pipeline has fast high-confidence checks and slower or noisier suites. Design release stages, artifact identity, concurrency, time budgets, failure routing, promotion criteria, and escalation when a non-blocking test reveals risk after promotion. Prevent the secondary lane from becoming an ignored failure archive.

Short Interview Answer (30-60 seconds)

I would put fast, deterministic, high confidence checks in the blocking lane and require them to pass before promotion. I would start slower, broader, or noisier suites in a separate non blocking lane at the same time, using the exact same immutable artifact. A blocking failure stops promotion. A non blocking failure creates an owned issue, notifies the responsible team, and is tracked to closure without automatically stopping the current promotion. If that later result shows serious risk after release, I would assess impact and use rollback, a feature flag, or another controlled mitigation. This keeps delivery fast while making the secondary lane visible and actionable.

Detailed Explanation

The main idea is to divide checks by how quickly and reliably they tell us whether a release is safe. Fast checks must finish successfully before the release moves forward. Slower checks run at the same time but do not automatically stop that release. Both groups examine the same built package so results always refer to the same thing. Every failure still needs an owner, a time limit for action, and a visible record. If a slower check later finds serious danger, the team responds immediately and can undo or reduce the change.

Useful Questions to Ask the Interviewer
  1. Which current checks are reliable enough to block promotion?
  2. What total time budget should the blocking lane meet?
  3. Which slower suites have the longest runtime or highest flake rate?
  4. What level of risk should block a future promotion or trigger rollback?
  5. Who owns failures from each non blocking suite?
How would you separate blocking and non-blocking test lanes? diagram
How to Explain It in an Interview

I would begin with one immutable artifact. The continuous integration build creates the artifact once, stores it in the artifact repository, and gives it a content addressed identity such as a digest. Both test lanes receive that same artifact. Staging and production also use that same artifact. This gives every test result, deployment, and incident a clear connection to the exact build that produced it.

The blocking lane contains fast, deterministic, high confidence checks. The diagram shows unit tests, lint and static application security testing, container scanning, policy or license checks, and basic contract tests. These checks should have a short total time budget. In this design the blocking lane targets about fifteen minutes. Every required blocking check must pass before the artifact becomes eligible for promotion.

The non blocking lane starts in parallel after the same artifact is available. It contains slower, broader, or more environment dependent suites. The diagram shows integration tests, end to end tests, performance and load tests, chaos and resilience tests, dynamic security tests, and cross browser or device tests. Each suite has its own configured time budget. These tests run to completion and publish their results, but their normal execution does not delay promotion when the blocking lane has passed.

Concurrency matters because the goal is to gain deeper confidence without extending the normal release path. Both lanes should start as soon as the immutable artifact is ready. The blocking lane should have enough compute capacity to give fast feedback. Expensive non blocking suites should use controlled or isolated capacity so a load test or large end to end suite cannot starve the release gate. Queue priorities and resource quotas can protect the blocking path.

Promotion depends on the blocking lane result. If a required blocking check fails, the pipeline stops and the artifact is not promoted. The failure should create useful diagnostic output and notify the responsible team. If every blocking check passes, the exact same immutable artifact can move to staging. Automated smoke validation can run there, an optional manual approval can be used when the release policy requires it, and the same artifact can then move to production.

A non blocking failure follows a different route. It should automatically create or update a ticket containing the artifact identity, commit information, logs, test name, runtime, and relevant reliability information such as flake rate. The suite owner is notified. The result is then triaged and classified as a product defect, a flaky test, or an environment problem. The issue remains linked to the release and commit until it is closed.

The secondary lane must never become a failure archive. I would give every suite a clear owner and response target. Dashboards should show current status and trends. Teams should track failure age, flake rate, unresolved issues, and repeated risk. Work in progress limits can prevent an unlimited backlog of failing suites. Automation can retry carefully selected flaky cases, quarantine known unstable tests when appropriate, and detect worsening trends. If known unresolved issues exceed an agreed risk threshold, the quality policy can block future releases until the risk is reduced.

Post release monitoring closes the loop. Metrics such as latency and errors, logs, traces, synthetic checks, business indicators, and alerts provide another source of evidence after deployment. A non blocking suite may finish after production promotion. If it then reports a serious failure, the team combines that result with production signals and assesses user impact and blast radius.

If the risk is significant, the team should act according to impact rather than treating every failure the same. Possible actions include rolling back the artifact, disabling the affected behavior with a feature flag, or applying another controlled mitigation. The team then communicates status and next steps, records the root cause, adds or strengthens regression coverage, and improves the release guardrails so the same type of risk is caught earlier.

The main tradeoff is speed versus confidence. Making too many checks blocking increases release time and lets noisy tests stop healthy releases. Making too few checks blocking allows important defects to travel farther before detection. A check should therefore earn blocking status because its signal is reliable, its runtime fits the release budget, and its failure represents enough risk to justify stopping promotion.

Technical Approach
  1. Build the release once and store one immutable artifact with a stable content identity.
  2. Start both test lanes from that same artifact.
  3. Put fast, deterministic, high confidence checks in the blocking lane.
  4. Give the blocking lane a strict total time budget and require every mandatory check to pass.
  5. Put slower, broader, or noisier suites in the non blocking lane and give each suite its own time budget.
  6. Run both lanes concurrently with resource isolation so expensive suites cannot delay the blocking path.
  7. Stop the pipeline and prevent promotion when a required blocking check fails.
  8. When the blocking lane passes, promote the same immutable artifact to staging.
  9. Run staging smoke validation and use optional manual approval when release policy requires it.
  10. Promote the same validated artifact to production.
  11. Route every non blocking failure to an owned ticket with logs, artifact identity, commit information, runtime, and test context.
  12. Classify each failure as a product defect, flaky test, or environment problem and track it to closure.
  13. Use dashboards, response targets, work in progress limits, flake tracking, and future quality gates so unresolved failures cannot accumulate silently.
  14. Combine late non blocking results with post release metrics, logs, traces, synthetic checks, business indicators, and alerts.
  15. When serious risk is detected after promotion, assess impact and use rollback, a feature flag, another mitigation, or a controlled fix.
  16. Record the cause, add regression protection, and strengthen future release guardrails.
Practical Insights

Traditional algorithm complexity does not apply to this design. The important costs are test runtime, infrastructure capacity, investigation time, and maintenance. The blocking lane must stay short because release progress waits for it. In the diagram its total target is about fifteen minutes. Non blocking suites may run for tens of minutes or hours. Running both lanes concurrently reduces release waiting time but uses more compute. Integration, end to end, performance, resilience, and dynamic security suites may also need larger environments and more test data. Flaky tests add another cost because engineers must separate real product failures from test or environment failures.

Why Interviewers Ask This

Interviewers ask this to see whether I can balance release speed with release confidence. They want to know whether I can decide which checks must stop promotion, which checks can continue in parallel, how both lanes validate the same immutable artifact, and how every failure remains visible and owned. They also want to see practical judgment around concurrency, time budgets, flaky tests, promotion criteria, production monitoring, and escalation when a slower test discovers meaningful risk after release.

Common interview mistakes

A common mistake is putting every test in the blocking lane. One slow or flaky suite can then stop healthy releases and make the pipeline unreliable. The opposite mistake is moving slow tests into the non blocking lane and then ignoring their failures. Another mistake is rebuilding the artifact between lanes or environments, which breaks traceability because the tested binary is no longer the deployed binary. Teams also fail when suites have no owner, no response target, or no visible backlog. Other problems include unlimited retries that hide real defects, treating every raw failure as equal risk, allowing large suites to consume capacity needed by the release gate, and promoting even though a required blocking check failed.

Interview tip

Explain the design around one simple rule. Fast and reliable checks decide whether the current immutable artifact can move forward. Slower checks run beside them and still have ownership, deadlines, visibility, and escalation. Then explain the shared artifact identity, parallel execution, promotion gate, failure routing, and what happens when a serious non blocking result appears after production promotion.

Interviewer may ask next
What would you do if a non blocking test becomes flaky but still finds real defects sometimes?

I would keep that suite in the non blocking boundary while its signal is unreliable. I would measure its flake rate, keep every result visible, assign an owner, and classify failures so real defects are not hidden by test noise. I would work on deterministic setup, controlled dependencies, and stable test data rather than relying on unlimited retries. If the test later becomes reliable and its failures represent enough release risk, the relevant check can become blocking. The tradeoff is that moving an unreliable test into the gate too early can damage release speed, while ignoring it can hide useful risk signals.

How would you scale this design when the number of non blocking suites becomes very large?

I would keep the same immutable artifact and the same blocking promotion boundary, but scale the non blocking execution model. Independent suites would use separate queues, priorities, resource quotas, owners, and time budgets. Expensive performance or resilience tests could use isolated capacity. I would also apply work in progress limits, track failure age and trends, and use agreed risk thresholds to affect future promotions when unresolved issues become serious. The main tradeoff is infrastructure cost versus feedback speed. More parallel capacity returns results sooner, but it costs more, so I would prioritize suites by risk and signal value.

102. How would you handle flaky tests without normalizing failure?Testing And Release ValidationMedium

Question Details

A test passes when rerun but intermittently blocks releases. Define how to identify and quarantine it, preserve the original failure evidence, limit retries, assign ownership and expiry, maintain a blocking signal for the affected behavior, and require a reproducible fix before returning it to the trusted suite.

Short Interview Answer (30-60 seconds)

I would quarantine the flaky test, but I would not ignore it or treat a passing retry as proof that everything is fine. I would preserve the first failing run, keep retries bounded, assign an owner and expiry date, and continue running and reporting the quarantined test. The unreliable test would temporarily stop blocking the normal release gate, while a stable sentinel or another reliable check would still protect the affected behavior. I would return the test to the trusted suite only after reproducing the problem, fixing the root cause, and showing stable passes across enough repeated runs.

Detailed Explanation

A flaky test sometimes passes and sometimes fails even though the product has not meaningfully changed. Simply running it again until it passes can hide a real problem. I would move that unreliable test out of the trusted release group, but I would keep running it and recording every result. I would save the first failure information, give the problem an owner and a deadline, and keep another reliable check protecting the same important behavior. The test would return only after the cause is found, corrected, reviewed, and shown to stay stable through repeated runs.

Useful Questions to Ask the Interviewer
  1. Does the current pipeline already have a quarantine mechanism or flaky test registry?
  2. Which behaviors must continue blocking a release while a test is quarantined?
  3. What evidence and stability period does the team require before removing quarantine?
How would you handle flaky tests without normalizing failure? diagram
How to Explain It in an Interview

I would treat flakiness as a defect that must stay visible. The trusted suite is the normal release gate. A quarantined test is temporarily removed from that trusted blocking set because its signal is unreliable, but the test is still executed, reported, measured, and investigated.

First, I would identify the flaky pattern from test history rather than from one rerun. I would look for alternating pass and fail results across repeated CI executions. The diagram shows an example threshold of roughly one percent to twenty percent failures across a sample such as thirty runs. That is only an operational example. The real threshold should be chosen by the team based on the test and release risk.

When the test is classified as flaky, I would move it into quarantine. Quarantine means this specific unreliable test no longer counts toward the normal trusted release gate. It does not mean deleting the test, hiding the result, or accepting the failure as normal. The pipeline should continue executing the quarantined test and publish its status clearly.

Before any retry, I would preserve the original failing run as the main debugging evidence. I would keep logs, screenshots when applicable, traces, network information when relevant, environment details, configuration, test data, commit and build identifiers, timestamps, and other artifacts that describe the failing execution. A later passing rerun must never replace or erase that original evidence.

Retries should be bounded. For example, the policy can allow no more than two retries. A retry helps classify the flake and collect more evidence. It must not convert the original failure into an ordinary clean result. If a retry passes, I record that the test behaved inconsistently. If it fails again, I preserve that result too. There should be no unlimited retry loop.

Every quarantined test needs accountability. I would record fields such as test identifier, suite, failure rate, owner, date first quarantined, expiry date, latest update, and status in a flaky test registry or equivalent tracking system. I would also create a tracking issue with enough context for investigation. The diagram uses an expiry example of about fourteen to thirty days. The exact period is a team policy. The owner should be reminded before expiry. An expired quarantine should become a blocking escalation until the test is fixed or explicitly reviewed and extended.

Removing the flaky test from the trusted gate must not remove protection for the affected behavior. I would keep a stable sentinel or another reliable validation for the same behavior. Depending on the system, that could be a stable test, monitoring check, contract check, or another trusted validation. If that reliable signal detects a regression, the release still blocks.

The quarantined test continues running in CI. Its pass and fail history, failure rate, age, owner, and expiry remain visible. This keeps the defect measurable and prevents it from disappearing into a permanent ignore list. Notifications and escalation can be triggered by new failures, increasing flake rate, lack of progress, or approaching expiry.

To return the test to the trusted suite, I would require a reproducible investigation and a root cause fix. The problem might be in application code, the test itself, shared state, timing, environment setup, test data, or infrastructure. The important point is that the cause is understood and corrected rather than hidden with more retries.

After the fix, I would run the test repeatedly under the relevant conditions. The diagram shows an example of one hundred percent passing results across a meaningful sample such as fifty runs. That sample size is an example, not a universal guarantee. I would also require normal code or test review and keep the supporting evidence. Only after the test demonstrates stable behavior would I remove quarantine and let it count toward the trusted release gate again.

The main tradeoff is release speed versus confidence. Quarantine prevents one unreliable signal from repeatedly stopping delivery, but careless quarantine can hide real regressions. That is why the process needs preserved evidence, bounded retries, ownership, expiry, continued execution, a reliable blocking signal for the affected behavior, and a strict return condition.

Technical Approach
  1. Track pass and fail history across CI runs and identify genuine intermittent behavior from repeated results.
  2. Quarantine the unreliable test so it temporarily stops contributing to the trusted release gate while still being executed and reported.
  3. Preserve the original failing run before any retry. Save useful logs, traces, screenshots, network information, environment details, test data, commit information, timestamps, and build context.
  4. Permit only bounded retries, such as no more than two. Keep the first failure as the source of truth and record every retry result.
  5. Add the test to a flaky test registry. Assign an owner, tracking issue, quarantine date, expiry date, latest update, and status.
  6. Keep a stable blocking signal for the affected behavior through a sentinel or another reliable validation. A failure in that trusted signal continues to block the release.
  7. Continue executing the quarantined test in every relevant pipeline and monitor its failure rate, age, owner, and expiry.
  8. Reproduce the problem and fix the root cause in the application, test, data, environment, timing, shared state, or infrastructure as appropriate.
  9. Demonstrate stability through repeated successful executions under relevant conditions and complete normal review.
  10. Remove quarantine only after the fix is reproducible and the test has regained enough confidence to return to the trusted suite.
Practical Insights

Algorithmic complexity is not the important cost here. The practical cost is additional CI work and engineering attention. The quarantined test still runs, and bounded retries can add extra executions. Saving logs, traces, screenshots, and other evidence uses storage. Tracking ownership and expiry adds maintenance work. A stable sentinel or other blocking check can add CI runtime. Repeated validation after the fix also adds executions, but that cost is intentional because it provides evidence that the test is trustworthy again. The goal is to spend a controlled amount of extra effort instead of either blocking releases indefinitely or hiding real failures.

Why Interviewers Ask This

Interviewers want to know whether I can protect release confidence while handling an unreliable test. They are evaluating whether I can detect intermittent behavior, keep the original failure visible, control retries, separate an unreliable signal from the trusted release gate, assign ownership, enforce an expiry, and stop quarantine from becoming permanent. They also want to see that I keep a reliable blocking signal for the affected behavior and require evidence of a real fix before trusting the flaky test again.

Common interview mistakes

A common mistake is rerunning a failing test until it passes and then reporting the build as clean. That hides the original failure and normalizes unreliable behavior. Another mistake is quarantining the test and then stopping its execution or reporting, which makes the defect easy to forget. Teams can also lose important evidence by keeping only the successful rerun instead of the first failure. Unlimited retries are another problem because they hide signal and increase CI time. Quarantine without an owner or expiry can become permanent. Removing the test without keeping a reliable blocking signal can expose releases to the regression it originally protected against. Finally, returning a test after one successful run is weak evidence. The root cause should be reproducible, corrected, reviewed, and shown to remain stable across repeated runs.

Interview tip

Explain quarantine as temporary containment, not acceptance of failure. Walk through the flow in order: detect the intermittent pattern, quarantine the unreliable signal, preserve the first failure, bound retries, assign ownership and expiry, keep reliable protection for the behavior, reproduce and fix the cause, prove stability, then return the test to the trusted suite. Emphasize that a passing retry never erases the original failure.

Interviewer may ask next
What would you do if the quarantined test keeps passing during investigation and you can no longer reproduce the original failure?

I would keep the test inside the quarantine boundary until there is enough evidence to explain the original intermittent behavior and restore confidence. I would not treat several passing runs as proof that the defect disappeared. I would use the preserved first failure artifacts, CI history, environment details, test data, timing information, and commit context to recreate the conditions. I would also check uncontrolled time, shared state, environment differences, asynchronous behavior, external dependencies, and infrastructure variation when they are relevant to that test. The stable blocking signal for the affected behavior would remain active. If the cause still cannot be reproduced before expiry, the quarantine should trigger review and escalation rather than silently becoming permanent. The tradeoff is a longer investigation, but the team avoids returning an unexplained unreliable signal to the trusted release gate.

How would you keep this quarantine process from slowing a large CI pipeline as the number of flaky tests grows?

I would keep the same quarantine boundary and make growth visible rather than weakening the policy. Quarantined tests would continue to run and report, but retries would remain bounded so each flaky test cannot multiply CI work without limit. I would track the number of quarantined tests, their failure rates, age, owners, and expiry dates, then alert on growth and overdue items. Stable blocking checks would remain focused on the affected release critical behaviors. The tradeoff is CI cost versus release confidence. Running quarantined tests and collecting evidence costs time and storage, but unlimited retries or permanent quarantine create a larger reliability risk. Ownership, expiry, escalation, and removal after a reproducible fix prevent the quarantine set from becoming an uncontrolled second test suite.

103. How would you validate infrastructure-as-code before applying it?Testing And Release ValidationMedium

Question Details

At pull request and pre-apply stages, define formatting, syntax, provider initialization, module tests, plan review, policy and security checks, environment-target validation, and saved-plan identity. Specify which failure blocks merge or apply and how approved exceptions are recorded and expire.

Short Interview Answer (30-60 seconds)

I would use two main validation boundaries. During the pull request, I would check formatting, configuration validity, required providers and modules, module tests, the saved plan, policy and security rules, and the intended environment. A required failure blocks merge. After merge, I would verify the saved plan digest and deployment context, then run the final target, policy, security, and exception checks. A failure there blocks apply. If everything passes, I would apply the reviewed saved plan rather than create a different plan.

Detailed Explanation

This question asks how I would stop an unsafe infrastructure change before it changes a real environment. I would check the change before merge and check it again before apply. Before merge, I would confirm that the files are valid, the modules behave as expected, the proposed changes have been reviewed, the security rules pass, and the destination is correct. Before apply, I would confirm that the saved change is still the reviewed one and that the final destination and approvals are still valid. Important failures stop progress, while approved exceptions must be recorded and must expire.

Useful Questions to Ask the Interviewer
  1. Which infrastructure tool and CI system does this repository use?
  2. Which policy or security findings are allowed to have approved exceptions?
  3. Which environment details must match before production apply?
  4. How long should saved plans and exception approvals remain valid?
How would you validate infrastructure-as-code before applying it? diagram
How to Explain It in an Interview

I would treat the infrastructure configuration, module tests, generated plan, policy results, security results, target information, and release metadata as one controlled validation flow.

The first boundary is pull request validation. Nothing in this part should intentionally modify the target infrastructure. The goal is to find problems before merge.

First, I check formatting. For Terraform, the diagram uses terraform fmt -check. A formatting failure blocks merge because the change should follow the repository formatting rules before it is accepted.

Next, I check configuration validity with terraform validate. In a clean Terraform runner, initialization and validation are closely related because validation may require the working directory to have its modules and providers initialized. The diagram shows the validity check and the provider initialization check as separate gates, but both must succeed in the CI environment.

The provider initialization gate uses terraform init -backend=false. This initializes required providers and modules without initializing the real state backend. This is useful for an early validation job because it avoids unnecessary access to the target backend. A failure blocks merge.

Next, I run the repository approved module tests and examples. These tests should use controlled inputs and deterministic setup. They should not depend on test order, uncontrolled production state, or hidden mutable data. A required module test failure blocks merge.

Then I generate a saved plan with terraform plan -out=tfplan. The planning job must use the repository approved initialization and target state access needed for that plan. Reviewers inspect the proposed changes and approve the intended result. If the plan cannot be generated, contains an unacceptable change, or does not receive the required approval, merge is blocked.

I then run the repository approved policy and security checks. The diagram shows examples such as OPA, Sentinel, tfsec, and Checkov. These checks evaluate organizational rules and security risks. A blocking finding stops progress unless there is a valid exception that is explicitly allowed for that rule and scope.

Before merge, I validate the intended target. I confirm the expected workspace, backend context, account, region, and allowed environment. This prevents a technically valid plan from being directed at the wrong place. A target mismatch blocks merge.

When all pull request gates pass, merge is allowed. The saved plan.tfplan artifact and its SHA 256 digest are stored with the pull request or build metadata.

The second boundary is pre apply validation. After merge, I verify saved plan identity before infrastructure changes are made. I run sha256sum tfplan and compare the result with the stored digest. I also verify that the plan is associated with the expected commit SHA, workspace or target, inputs, and provider lock context. A mismatch blocks apply.

The deploy stage then recomputes the SHA 256 digest and compares it with the stored value. It confirms the commit or run identity and the target account, region, and workspace. It reruns the required policy and security checks so the release decision uses fresh results. It also checks whether a required approval or exception is still valid.

Approved exceptions are controlled release records, not permanent bypasses. An exception should record its justification, accepted risk, scope, approver, date, and issue or audit record. It should have a limited lifetime. Only a valid and unexpired approval can authorize the permitted exception. When it expires, it no longer authorizes merge or apply and must be approved again if it is still needed.

If every pre apply gate succeeds, I run terraform apply plan.tfplan. I apply the reviewed saved plan instead of silently generating a different plan. This preserves the connection between review and deployment.

The failure behavior should be explicit. Formatting, validation, initialization, module test, plan review, policy, security, or target failures block merge during the pull request stage. Saved plan identity failures, target mismatches, fresh policy or security failures, and expired approvals block apply during the deployment stage.

The main tradeoff is additional CI time and maintenance. The pipeline needs reliable tests, pinned tools, secure artifact storage, release metadata, and clear exception ownership. In return, it catches mistakes before infrastructure is changed and gives the team an auditable path from reviewed code to the exact plan that is applied.

Technical Approach
  1. Open the pull request and run the repository formatting check such as terraform fmt -check.
  2. Validate the Terraform configuration and confirm that the clean CI working directory can initialize the required modules and providers.
  3. Run terraform init -backend=false for the early provider and module initialization gate without using the real state backend.
  4. Run the repository approved module tests and examples. Block merge when a required test fails.
  5. In the planning context, perform the repository approved initialization needed to access the intended state, then generate plan.tfplan with terraform plan -out=tfplan.
  6. Require review of the planned changes. Block merge when the plan is unacceptable or required approval is missing.
  7. Run the required policy and security checks. A blocking finding stops merge unless an explicitly permitted, valid exception applies.
  8. Validate the workspace, backend context, account, region, and allowed target. Block merge when the target is wrong.
  9. After all pull request gates pass, allow merge and retain plan.tfplan, its SHA 256 digest, and the related build metadata.
  10. After merge, run sha256sum tfplan and compare the digest with the stored value. Verify the commit SHA, workspace or target, inputs, and provider lock context.
  11. Recheck the final target, fresh policy and security results, and any required exception expiry. A required failure blocks apply.
  12. Apply the approved saved artifact with terraform apply plan.tfplan only after every pre apply gate succeeds.
Practical Insights

Traditional algorithmic complexity is not important for this problem. The practical cost is CI time, storage, and maintenance. Formatting and basic configuration checks are usually fast. Module tests, planning, policy checks, and security scans can take longer as the repository grows. The pipeline also needs secure storage for the plan, its digest, and release metadata. Pre apply verification adds another release step. The tradeoff is useful because the extra work gives stronger confidence that the reviewed change, target, and approvals still match what will actually be applied.

Why Interviewers Ask This

The interviewer wants to see whether I can create safe validation gates for infrastructure changes instead of trusting one successful command. They are checking whether I understand pull request validation, plan review, policy controls, security checks, environment targeting, artifact integrity, failure handling, and controlled exceptions. They also want to see whether I can separate failures that should block merge from failures that should block apply.

Common interview mistakes

A common mistake is running only terraform validate and treating that as proof that the change is safe. Another mistake is using terraform init -backend=false while claiming that the real backend was initialized or tested. Teams can also review the source code but fail to review the saved plan. Other mistakes include planning against the wrong environment, creating a new plan immediately before apply, failing to compare the saved plan digest, failing to bind the release to the expected commit and workspace, ignoring fresh policy or security failures, storing plan artifacts insecurely, and creating exception approvals that never expire. It is also misleading to treat successful pull request checks as proof that the real infrastructure apply will succeed.

Interview tip

Explain the answer as two boundaries. First describe what must pass before merge. Then describe what must pass before apply. Emphasize that the saved plan is reviewed, stored with its digest and release context, verified again after merge, and applied only after the final checks pass. Finish by stating that pull request failures block merge, pre apply failures block apply, and exceptions must be explicit, scoped, recorded, approved, and time bound.

Interviewer may ask next
What would you do if the saved plan digest does not match during the pre apply stage?

I would block apply immediately. The boundary being protected is the saved plan artifact that was reviewed and stored after the pull request checks. A digest mismatch means the artifact presented for deployment is not the same artifact represented by the stored integrity record. I would not continue with that artifact and I would not silently create a new plan and apply it. I would send the change through the required planning and review path again so the plan, digest, commit, target, and approval context become consistent. The tradeoff is extra release time, but accepting a mismatched plan would break the connection between review and deployment.

How would you keep these validation gates useful without making the CI pipeline too slow?

I would keep the same pull request and pre apply boundaries but run cheap checks early and stop when a required gate fails. Formatting and basic validation can run before slower tests, planning, policy checks, and security scans. I would use repository pinned tools, deterministic tests, reusable CI caches where safe, and secure artifact storage so repeated runs stay predictable. The pre apply stage would focus on release critical checks such as saved plan identity, commit and target context, fresh policy and security results, and exception expiry. The tradeoff is between CI duration and release confidence, so I would remove redundant work rather than remove gates that protect merge or apply.

104. How would you add a chaos experiment to a release pipeline safely?Testing And Release ValidationHard

Question Details

In a production-like pre-release stage, inject one bounded failure into a defined dependency or instance group. State the steady-state hypothesis, blast-radius limit, abort conditions, observability prerequisites, recovery objective, pass or fail rule, environment reset, and why the experiment must not proceed when baseline health is uncertain.

Short Interview Answer (30-60 seconds)

I would add the chaos experiment as a controlled pre release gate and run it only when the production like environment has a known healthy baseline. I would define the steady state hypothesis, one small target, the blast radius, observability requirements, abort conditions, recovery objective, and pass rule before injecting anything. Then I would inject one bounded failure and monitor the system in real time. Any abort condition would stop the experiment and block promotion. I would pass only if service objectives remain acceptable and recovery completes within the required time. Finally, I would reset the environment and verify the healthy baseline again.

Detailed Explanation

The goal is to check whether a release can handle one small controlled failure before it reaches production. I would first confirm that the test environment is healthy and that the monitoring needed to judge the result is working. Then I would affect only one known dependency or instance group. I would watch the important service signals while the failure is active. Clear safety limits decide when to stop, and clear success rules decide whether the release may continue. After the experiment, I would restore the environment and confirm normal behavior again. If the starting health is uncertain, I would not run the experiment because the result could be misleading.

Useful Questions to Ask the Interviewer
  1. Which dependency or instance group should be the allowed chaos target?
  2. Which service objectives and error budget limits define healthy behavior?
  3. What maximum blast radius is acceptable in the production like pre release environment?
  4. What recovery time must the system meet before the release can pass?
How would you add a chaos experiment to a release pipeline safely? diagram
How to Explain It in an Interview

I would treat the chaos experiment as a controlled release validation gate. The system under test is the deployed application in a production like pre release environment. The real application components, dependencies, data paths, recovery mechanisms, metrics, traces, logs, dashboards, alerts, canaries, and synthetic checks remain active because the purpose is to validate real resilience behavior. The experiment boundary is narrow. I would choose one dependency or one instance group and inject only one bounded failure.

Before the experiment starts, I would run a baseline health check. Critical service objectives should be healthy. Error levels should be within the accepted budget. Dependencies should be healthy. Traffic should be within its normal range. Recent deployments should be stable. There should be no active serious incident. Synthetic checks should pass. If these conditions are not known to be healthy, the experiment must not proceed.

Observability is also a prerequisite, not something added after the failure. I would require service metrics for latency, errors, throughput, and saturation, plus distributed traces, correlated logs, dashboards, alerts, and useful canary or synthetic signals. These signals must be validated before each run so that the team can see both customer facing behavior and recovery progress.

Next I would define the steady state hypothesis. The hypothesis states what healthy behavior should continue during the experiment. For the diagram example, the system should continue meeting its service objectives despite the injected failure. Example limits are P95 latency below 300 milliseconds, error rate below 0.5 percent, and availability above 99.9 percent. The exact values should come from the service objectives for the real system.

Then I would define the blast radius. The failure must affect only a small known slice. That could be one instance group, one dependency, one isolated availability zone, or less than 10 percent of traffic. A concrete example is injecting the failure into two pods in the payments v2 group when that is about 5 percent of capacity. The affected area must be known before execution and must not expand automatically.

I would define abort conditions before the experiment begins. Examples include a service objective breach, error rate crossing the agreed threshold, a customer impact signal, cascading failures, or recovery not progressing. If any abort condition becomes true, automation should stop the experiment immediately and start recovery. The experiment should never continue just to collect more data after a declared safety limit has been crossed.

The actual failure should be one bounded action that matches the chosen target. Depending on the system, this might terminate a small number of pods or instances, add controlled latency, increase an error rate, apply a throttle, or create a bounded dependency failure. I would not combine several unrelated failures in the same release gate because that would make the result harder to attribute and increase risk.

While the failure is active, I would monitor the system in real time. I would compare the observed behavior with the steady state hypothesis using dashboards, alerts, traces, logs, canaries, and synthetic checks. The release passes only if no abort condition fires, required service objectives stay within the approved limits, the system recovers within the recovery objective, critical flows succeed, and there is no unacceptable data loss. If any required condition fails, promotion is blocked.

The recovery objective must be measurable. For example, the system may need to return to its healthy steady state within five minutes after an abort or after the fault is removed. Recovery means more than stopping the fault injector. The affected workloads and dependencies must return to their expected healthy state and the service signals must confirm that recovery is complete.

After every experiment I would reset the environment. I would stop any remaining fault injection, restore affected workloads, remove injected faults, restore modified settings, clean controlled test data when needed, and verify the baseline again. The next run should begin only when the environment has returned to a known steady state.

I would never run the experiment when baseline health is uncertain. If the system is already degraded, I cannot confidently tell whether a later error or slow recovery was caused by the injected fault or by the existing problem. That can create false failures, false passes, and a higher chance of compounding an existing incident. The safe decision is to fix or understand the baseline first, then rerun the normal health checks before enabling the chaos gate.

The final pipeline decision is evidence based. A healthy baseline allows the bounded experiment to start. A successful result allows the release to continue toward production. Any abort condition, service objective breach, missed recovery objective, critical flow failure, or unacceptable data loss blocks the release and sends the system through recovery and environment reset.

Technical Approach
  1. Build and validate the release, then deploy it to a production like pre release environment.
  2. Run the baseline health check and stop if service health is uncertain.
  3. Verify that metrics, traces, logs, dashboards, alerts, canaries, and synthetic checks are working.
  4. Define the steady state hypothesis using measurable service objectives.
  5. Select exactly one dependency or one instance group as the experiment target.
  6. Set a small blast radius, such as one instance group, one dependency, one isolated zone, or less than 10 percent of traffic.
  7. Define abort conditions and the recovery objective before injecting the fault.
  8. Inject one bounded failure that matches the declared experiment target.
  9. Monitor the system continuously and compare observed behavior with the steady state hypothesis.
  10. Abort immediately if any declared safety condition is crossed.
  11. Pass only if no abort condition fires, required service objectives remain acceptable, critical flows succeed, unacceptable data loss does not occur, and recovery completes within the objective.
  12. Block promotion when the experiment fails.
  13. Stop the fault, restore workloads and settings, remove injected conditions, clean controlled test state, and verify baseline health again.
Practical Insights

Algorithmic complexity does not meaningfully apply to this validation approach. The practical cost comes from deploying the production like environment, collecting telemetry, injecting the fault, waiting for bounded recovery, and resetting state. The experiment should stay short and focused so it does not add excessive time to every release. The larger maintenance cost is keeping the environment realistic, observability reliable, guardrails automated, service objectives current, and recovery automation tested.

Why Interviewers Ask This

Interviewers ask this to see whether I can validate resilience without creating uncontrolled risk. They want to know whether I can define a measurable steady state, choose a small blast radius, require working observability, define abort conditions before execution, measure recovery, reset the environment, and make an evidence based release decision. They also want to see whether I understand that a chaos result is not trustworthy when the system is already unhealthy.

Common interview mistakes

Common mistakes include running the experiment when baseline health is uncertain, injecting several failures at the same time, choosing a blast radius that is too large, starting without working observability, defining vague success criteria, deciding abort conditions after execution begins, continuing after a safety threshold is crossed, and assuming that stopping fault injection means recovery is complete. Other mistakes include failing to reset the environment, promoting a release after the recovery objective was missed, and treating one successful experiment as proof that every production failure is safe. The result only validates the declared target, failure, limits, and observed conditions.

Interview tip

Explain the safety gates in order. Start with a healthy baseline, then the steady state hypothesis, bounded target, blast radius, observability, abort conditions, one controlled failure, measurable recovery, pass or fail decision, and environment reset. Make it clear that chaos testing is not random breakage. It is a controlled experiment with strict guardrails and an evidence based release decision.

Interviewer may ask next
What would you do if the error rate crosses the abort threshold during the chaos experiment?

I would stop the experiment immediately, block the release, remove the injected fault, and start the defined recovery process. The exact experiment boundary remains the selected dependency or instance group, so I would not expand the test or add another failure. I would continue collecting metrics, traces, logs, alerts, and recovery evidence while the system returns to steady state. After recovery, I would reset the environment and verify baseline health again. This matters because continuing after an abort condition would turn a controlled validation into unnecessary risk. The tradeoff is that stopping early gives less experiment data, but protecting the environment and keeping the result trustworthy is more important.

How would you keep this chaos gate useful without making every release pipeline too slow?

I would keep the release gate narrow and run one short bounded experiment against a high value resilience assumption. The exact boundary would remain one selected dependency or instance group. I would automate baseline checks, fault injection, monitoring, abort handling, recovery validation, and environment reset so the gate does not depend on slow manual work. Broader or longer chaos scenarios can run separately on a schedule or for selected higher risk releases. This matters because the normal release path needs useful resilience evidence without excessive delay. The main tradeoff is deeper resilience coverage versus pipeline duration, so the regular gate should stay focused while broader experiments provide extra coverage elsewhere.

105. Tell me about a manual operational task you automated.BehavioralEasy

Question Details

Use a real example from your experience. Explain why the task was worth automating, how you understood its risks and users, what you changed, how you tested and introduced the automation, and what evidence showed the result was better than the manual process.

Interview tip:

Use STAR to structure your answer: briefly explain the Situation and Task, make Action the most detailed part, and finish with the Result. For example, describe a manual operational task that was repetitive or risky, why it was worth automating, how you understood the needs of the people using it, how you designed and tested the automation, how you introduced it safely, and what evidence showed that the automated process was more reliable than the manual one.

Situation

In my last role, our team had a routine process for checking application health after deployments. An engineer had to connect to several systems, review service status, check recent logs, confirm that important endpoints responded correctly, and then record the results. The process worked, but it depended heavily on someone following the same steps every time. It also took attention away from other operational work and created a risk that a check could be missed during a busy release.

Task

I was responsible for making this validation process more reliable without removing the ability for engineers to investigate problems manually. Before automating it, I needed to understand which checks were truly required, what failures should stop a release, and how the engineers who supported the service used the existing process.

Action

I first walked through the manual process with the engineers who performed it most often. I wrote down each step, the expected result, and what they normally did when a check failed. This helped me separate simple repeatable checks from steps that still required human judgment. I then created an automation script that checked service health, called the important application endpoints, reviewed the expected deployment status, and collected the results in one clear report. I made each check return a clear success or failure result so an engineer could quickly understand what happened. I also added useful error messages instead of allowing the script to fail without context. Because the automation could affect release decisions, I did not immediately replace the manual process. I tested individual checks in a safe environment first, including expected failure cases. After that, I ran the automated checks alongside the existing manual process during several releases and compared the results. When the script reported a problem, I confirmed that the same issue could be found through the manual checks. I shared the workflow with the team, explained which decisions were automated and which still required an engineer, and documented how to run the process manually if the automation was unavailable. Once the team was comfortable with the results, we made the automated validation part of the normal deployment workflow.

Result

The team no longer had to repeat the same basic health checks by hand after every deployment. The validation became more consistent because the same checks ran in the same way each time, and engineers could focus their attention on unusual failures instead of routine verification. We also had clearer evidence from the generated report when reviewing a release problem. The main lesson I learned was that good automation is not only about saving effort. It should reduce operational risk, make failures easier to understand, and still leave a safe manual path when human judgment is needed.

Why Interviewers Ask This

Interviewers ask this question to understand whether a DevOps Engineer can recognize work that is worth automating and improve it without creating new operational risk. A strong answer shows that the candidate understands the existing process first, considers the people who depend on it, tests failure cases, introduces change carefully, and uses evidence to confirm that the automation is more reliable than the manual process.

Interviewer may ask next
How did you decide which parts of the process should remain manual?

I kept steps manual when they required context or judgment rather than a clear expected result. For example, the automation could tell us that an endpoint failed or that a service was unhealthy, but an engineer still needed to decide whether the cause was a deployment problem, an external dependency, or another operational issue. I wanted the script to handle repeatable verification while leaving investigation and unusual decisions with the engineer.

What would you do differently if you automated this process again?

I would involve the engineers who use the process even earlier when defining the output and failure messages. The checks themselves were important, but the automation was most useful when a failure immediately told the engineer what was wrong and where to investigate. I would spend more time designing that feedback before writing the full automation because clear output makes an operational tool easier to trust and support.

Disclaimer: This interview guide is for educational and informational purposes only. It is designed to help readers prepare, but it does not guarantee any interview result, hiring decision, offer, or outcome. Interview questions, hiring criteria, and preferred answers can vary by employer, interviewer, industry, location, and time. The examples and explanations reflect the authors' research and judgment, are provided without warranties of any kind, and should not be treated as the only correct approach. Diagrams are simplified illustrations intended to highlight the main components and their interactions; actual systems and implementations may be more complex. Alternative approaches may be equally valid or better suited to a particular question, context, or interviewer. To the fullest extent permitted by applicable law, the author, contributors, and publisher are not liable for decisions made, actions taken, or losses incurred based on this guide.

Content Accuracy and Verification: To the fullest extent permitted by applicable law, we do not represent or warrant that interview guides, questions, answers, examples, or diagrams are accurate, complete, current, error-free, or suitable for any particular purpose. You are responsible for independently reviewing and verifying the information before relying on it.