📥 Download Complete 2026 Printable PDF Notes, Architecture Diagrams & GitHub Code
Get instant free access to the 2026 printable PDF cheat-sheet, runnable lab repositories, interview evaluation rubric, and AI Campus 6-Month Paid Corporate Internship roadmap.
Download Free PDF & Syllabus Roadmap →Top 12 Senior DevOps & CI/CD Git & GitHub Actions Technical Interview Questions (2026)
Production-grade technical questions, architectural explanations, and production YAML/Shell code answers asked during senior DevOps, SRE, and DevSecOps interviews at FAANG, Tier-1 MNCs, and high-growth scale-ups:
Q1 What is the fundamental architectural difference between git rebase and git merge in an enterprise CI/CD release workflow?
git rebase rewrites the commit history by taking all new commits on your feature branch and replaying them sequentially on top of the target base branch (e.g.
main), creating a strictly linear Git history. In modern CI/CD (GitHub Actions), Rebase and Merge or Squash and Merge is preferred on PR approvals because it guarantees that automated regression pipelines can use git bisect deterministically to isolate breaking commits.
Q2 How do you configure a production GitHub Actions YAML workflow with Matrix Builds across multiple environments?
name: Production Test Matrix
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
node: [ 18, 20, 22 ]
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci && npm test Setting fail-fast: false ensures that an OS-specific failure on Windows doesn't prematurely cancel running Ubuntu jobs.
Q3 How do you implement AWS OIDC Authentication in GitHub Actions to eliminate permanent AWS Access Keys?
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in repository secrets creates severe credential leakage vulnerabilities. OpenID Connect (OIDC) allows GitHub Actions to exchange short-lived OIDC JSON Web Tokens (JWT) for temporary, least-privilege AWS IAM session credentials via AWS STS AssumeRoleWithWebIdentity: permissions:
id-token: write
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsDeploymentRole
aws-region: ap-south-1 This completely eliminates static secrets.
Q4 How does dependency caching work in GitHub Actions (actions/cache with hashFiles)?
actions/cache@v4 action restores downloaded package dependencies (e.g., ~/.npm or ~/.m2) from GitHub's internal cache storage across runs: - uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build- hashFiles() computes a SHA-256 hash of lockfiles; if dependencies haven't changed, cache hit skips npm download, reducing CI runtimes from 7 minutes to 45 seconds.
Q5 Compare Self-Hosted Runners vs GitHub-Hosted Runners: Security, cost, and networking.
Q6 How do you implement Container & SAST Security Scanning in GitHub Actions using Trivy and CodeQL?
- name: Scan Docker Image
uses: aquasecurity/trivy-action@master
with:
image-ref: 'myapp:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload SARIF to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif' This blocks PR merges if High/Critical CVEs are discovered.
Q7 Compare Reusable Workflows (workflow_call) vs Composite Actions: When to use each?
action.yml file. Ideal for grouping boilerplate commands (e.g., checkout + setup-python + install dependencies). Cannot define independent jobs or runner targets. Reusable Workflows (on: workflow_call): Entire YAML workflows with multiple jobs, concurrency rules, matrices, and secrets management that can be called from caller repositories. Ideal for centralizing enterprise compliance pipelines across 200+ microservice repositories.
Q8 How do you implement GitOps continuous deployment using GitHub Actions and ArgoCD / Flux?
myapp:c7f8a1e, 2) CI checks out the separate GitOps manifest repository, 3) Updates Kubernetes Helm values (image.tag: c7f8a1e), and 4) Commits and pushes changes. The in-cluster ArgoCD agent detects Git commit drift and executes automated reconciliation, eliminating cluster credentials from CI runners entirely.
Q9 How do you resolve complex merge conflicts during an automated rebase in Git?
git rebase origin/main stops at the first conflicting commit. 2) Run git status to identify unmerged paths. 3) Inspect conflict markers (<<<<<<< HEAD vs >>>>>>> commit_message) and resolve using three-way merge tools (git mergetool). 4) Stage resolved files: git add . 5) Run git rebase --continue (NEVER run git commit during a rebase). If the conflict proves intractable: git rebase --abort safely restores the pre-rebase branch state.
Q10 Compare Squash and Merge vs Rebase and Merge: Which should engineering teams standardize on?
main, using the PR title and description as commit message. Recommended for feature development because it hides messy intermediate iteration history. Rebase and Merge: Appends every individual commit linearly onto main. Recommended only when each commit on the feature branch is atomic, thoroughly tested, and independently rollback-safe with full descriptive commit messages.
Q11 What is Git Reflog and how do you recover an accidentally deleted branch or hard reset commit?
git log shows the commit history of the current branch, but ignores orphaned commits. git reflog (Reference Log) records every single update to the HEAD reference locally across checkouts, commits, rebases, and resets. If an engineer runs destructive git reset --hard HEAD~5 or deletes a feature branch: running git reflog reveals the SHA-1 hash where HEAD was right before the reset (e.g. HEAD@{1}: commit: my feature). Running git branch recovery-branch HEAD@{1} instantly recovers 100% of the lost commits.
Q12 How do you optimize Monorepos in Git using Sparse Checkout, Shallow Clones, and Git LFS?
git clone --depth 1 downloads only the latest commit, skipping historical tree objects in CI pipelines. 2) Sparse Checkout: git sparse-checkout set services/billing instructs Git to populate only the requested subdirectory in the working tree, reducing disk usage by 95%. 3) Git LFS (Large File Storage): Replaces heavy binary files (models, zip packages, video assets) with 1KB text pointers in Git, storing actual binary blobs on remote S3 storage to keep repository packfiles lightning fast.
Q1 What is the difference between Monolithic, Microservices, and Event-Driven Architectures?
Monoliths combine all business modules in a single codebase and database; easy to develop initially, but difficult to scale independently.
Microservices partition domains into autonomous services communicating over REST/gRPC with private databases.
Event-Driven Architectures decouple services via message brokers (Kafka/RabbitMQ) producing and consuming asynchronous events.
Q2 Explain Database Concurrency Control: Optimistic vs Pessimistic Locking.
Optimistic Locking checks a version column at commit time; fails if another transaction updated the row concurrently (ideal for low contention).
Pessimistic Locking locks rows using `SELECT ... FOR UPDATE` preventing other transactions from modifying data until commit (ideal for high contention).
Q3 How do you design an idempotent REST API?
An API is idempotent when making multiple identical requests has the exact same side-effect as a single request. GET, PUT, DELETE are idempotent by HTTP spec.
For POST endpoints, require a client-generated Idempotency-Key header stored in Redis with cached responses.
Q4 What are Circuit Breakers in distributed microservices (Netflix Hystrix / Resilience4j)?
Circuit Breakers monitor remote service failure rates. When failures exceed a threshold, the breaker 'trips' (OPEN state), immediately returning fallbacks without waiting for slow timeouts, protecting the system from cascading failure.
Q5 Explain Garbage Collection in JVM or V8 and how memory leaks occur in managed runtimes.
Runtimes use generational mark-and-sweep garbage collection. Memory leaks occur when unused objects remain reachable from GC Roots (e.g. unclosed event listeners, static collections, lingering timers).
Q6 What is the difference between Process vs Thread vs Coroutine/Goroutine?
A Process has its own virtual memory space. Threads share process memory and are scheduled by the OS kernel.
Coroutines/Goroutines are user-space green threads cooperatively scheduled by language runtimes, using only ~2-4 KB stack memory.
Q7 How do you handle API Versioning in enterprise systems?
Common strategies: URI path versioning (/v1/users), Query parameter versioning (/users?version=1), and Header/Accept header content negotiation.
Q8 Explain WebSockets vs Server-Sent Events (SSE) vs Long Polling.
WebSockets provide full-duplex bidirectional TCP communication for interactive chats/gaming.
Server-Sent Events (SSE) provide unidirectional text streaming over HTTP/2, ideal for LLM token streaming.
Long polling holds HTTP connections open until data arrives; high overhead.
Q9 What is the difference between Horizontal Scaling and Vertical Scaling?
Vertical Scaling adds more CPU/RAM to a single server; simple but hits hardware limits.
Horizontal Scaling adds more commodity servers behind load balancers; offers virtually unlimited scalability and high availability.
Q10 How do you implement Distributed Tracing with OpenTelemetry and Jaeger?
OpenTelemetry propagates a unique Trace ID and Span ID across HTTP/gRPC headers (W3C Trace Context: `traceparent`). Jaeger visualizes the end-to-end request timeline across all microservices.
Accelerate Your Career with Guaranteed Paid Internship*
Transparent ₹1,20,000 Fee (Inclusive of GST) • ₹10,000/month No-Cost EMI • 6-Month Corporate Paid Internship (₹15,000 – ₹35,000/mo stipend) with official IBM & Microsoft Credly credentials.
