Open arostamianfar opened 6 years ago
You might just need to export "CLOUDSDK_PYTHON_SITEPACKAGES=1".
See: https://cloud.google.com/sdk/crypto#cloudsdk_python_sitepackages1
I just tried this once yesterday and it worked, i.e., the test image was deleted after the script was done (image tag test_2018-12-05-15-56-42
to be specific). That said, there are a lot of old images left in the Container Registry of the gcp-variant-transforms-test
project. I think we should set time-to-live policies for test images but with a quick search I could not find how (maybe we can set TTLs on the GCS buckets holding these but that seems like an ugly solution). Setting TTL is useful because the test script has special flags not to delete the test image so it is good to make sure eventually after a month or two these are cleaned up.
Just noticed that we have a lot of stale images in the repo and got curious whether image deletion is properly working. Verified that just running
./deploy_and_run_tests.sh
does not delete the image. There is some error from gcloud, so not sure if it's related? Note that it does output "Deleting the test image from the registry", so likely the gcloud command is failing.