0
0
MLOpsdevops~10 mins

Rollback strategies for failed updates in MLOps - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to rollback a deployment using Kubernetes command.

MLOps
kubectl rollout [1] deployment/my-app
Drag options to blanks, or click blank then click option'
Arollback
Bundo
Crestart
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'undo' instead of 'rollback' causes an error.
Using 'restart' only restarts pods, not rollback.
2fill in blank
medium

Complete the command to check the rollout status of a deployment.

MLOps
kubectl rollout [1] deployment/my-app
Drag options to blanks, or click blank then click option'
Arestart
Bhistory
Cstatus
Dpause
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' does not show status.
Using 'history' shows past rollouts, not current status.
3fill in blank
hard

Fix the error in the command to rollback to revision 2.

MLOps
kubectl rollout rollback deployment/my-app --to-revision=[1]
Drag options to blanks, or click blank then click option'
Aversion2
Brevision=2
Crev2
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Adding words like 'revision=2' causes command failure.
Using 'rev2' or 'version2' is invalid syntax.
4fill in blank
hard

Fill both blanks to create a command that pauses and then resumes a deployment rollout.

MLOps
kubectl rollout [1] deployment/my-app && kubectl rollout [2] deployment/my-app
Drag options to blanks, or click blank then click option'
Apause
Bresume
Crestart
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' instead of 'resume' does not continue the paused rollout.
Using 'status' does not affect rollout state.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that filters failed updates and stores their revision numbers.

MLOps
failed_updates = {rev[1]: status[2] for rev, status in updates.items() if status [3] 'failed'}
Drag options to blanks, or click blank then click option'
A_num
B_code
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' would select non-failed updates.
Mixing suffixes causes unclear dictionary keys or values.