Complete the code to identify the first step in an incremental migration plan.
migration_steps = ['[1]', 'Build new services', 'Redirect traffic', 'Decommission old system']
The first step is to analyze the current system to understand dependencies and components before migration.
Complete the code to describe the purpose of building new services in migration.
purpose = 'To [1] functionality from the monolith into independent services'
Building new services means extracting functionality from the monolith into smaller, independent services.
Fix the error in the migration step that redirects user traffic.
def redirect_traffic(service): if service.status == 'ready': service.[1]('start') else: print('Service not ready')
The correct method to start handling traffic is 'activate', which enables the new service to receive requests.
Fill both blanks to complete the code that checks service readiness and switches traffic.
if service.[1]() and system.[2]('all_services_ready'): system.switch_traffic_to(service)
Use 'is_ready()' to check if the service is ready and 'check_status' to verify system-wide readiness before switching traffic.
Fill all three blanks to complete the code that decommissions old services after migration.
if service.[1]() and not system.[2](service) and service.[3] == 'inactive': system.decommission(service)
The code checks if the service is deprecated, not referenced elsewhere, and has status 'inactive' before decommissioning.