Skip to main content
πŸ”’ Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial β†’
⚑
← Coursesβ€ΊDevOps for Python servicesModule 3 Β· Kubernetes & Orchestration Β· Recapβ€ΊπŸŽ― Review: DevOps module 3 recapscenario42 / 104
+80 XP
Task
Build `pipeline_decision(test_passed, lint_passed, coverage_pct)` returning one of `"deploy"`, `"warn"`, or `"block"`: 1. `not test_passed` β†’ `"block"` (red tests never ship β€” full stop). 2. `not lint_passed` β†’ `"block"` (style violations are a tip-of-iceberg signal; gate them). 3. `coverage_pct < 60` β†’ `"block"` (below the floor β€” would mask real regressions). 4. `60 <= coverage_pct < 80` β†’ `"warn"` (ships, but the dashboard flags the risk). 5. Otherwise β†’ `"deploy"`. This is the canonical CI gate stack β€” order matters.
✏️ Write your code here
🐍
Loading Python...
One-time download (~1 MB). Then it runs instantly.
πŸ“Š Result
Press Run to see result...

πŸ’¬ Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…