diff --git a/sky/clouds/gcp.py b/sky/clouds/gcp.py index f6162ea1bf2..3b288362878 100644 --- a/sky/clouds/gcp.py +++ b/sky/clouds/gcp.py @@ -31,6 +31,7 @@ 'access_tokens.db', 'configurations', 'legacy_credentials', + 'active_config', ] _IMAGE_ID_PREFIX = ('projects/deeplearning-platform-release/global/images/') diff --git a/tests/test_smoke.py b/tests/test_smoke.py index 38973e1d2cc..f18b854d548 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -705,6 +705,24 @@ def test_spot_storage(): run_one_test(test) +# ---------- Testing spot TPU ---------- +def test_spot_tpu(): + """Test managed spot on TPU.""" + name = _get_cluster_name() + test = Test( + 'test-spot-tpu', + [ + f'sky spot launch -n {name} examples/tpu/tpuvm_mnist.yaml -y -d', + 'sleep 5', + f's=$(sky spot status); printf "$s"; echo; echo; printf "$s" | grep {name} | head -n1 | grep STARTING', + 'sleep 600', # TPU takes a while to launch + f's=$(sky spot status); printf "$s"; echo; echo; printf "$s" | grep {name} | head -n1 | grep "RUNNING\|SUCCEEDED"', + ], + f'sky spot cancel -y -n {name}', + ) + run_one_test(test) + + # ---------- Testing env ---------- def test_inline_env(): """Test env"""