Skip to content

BB-756 - Improve fault tolerance of cleanup script and run it only after all tests are done

Giovanni Cimolin da Silva requested to merge BB-756-improve-cleanup-script into master

This PR add two main changes to the integration cleanup script:

  1. Improved fault tolerance by catching untreated exceptions
  2. Added CircleCI workflows configuration to run cleanup only after all tests are done.

Testing

  1. Checkout this branch
  2. vagrant up && vagrant ssh on Ocim's devstack
  3. Export environment variables needed for cleanup:
export GANDI_API_KEY=
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export GANDI_ZONE_ID=
export OPENSTACK_USER=
export OPENSTACK_TENANT=
export OPENSTACK_REGION=
export OPENSTACK_AUTH_URL=
export OPENSTACK_PASSWORD=
  1. Run PYTHONPATH=$PYTHONPATH:$(pwd) honcho -e .env.integration run python3 cleanup_utils/integration_cleanup.py --dry_run and check that there were no errors on the output.
  2. (OPTIONAL) Run make test.integration_cleanup to run the actual cleanup and check that there were no errors on the output.
  3. Check the latest CI run and see that the workflows are working correctly. Latest commit: Workflow: https://circleci.com/workflow-run/8fa529e2-2703-4293-991e-93f7e09d5fd8 CI Run: https://circleci.com/gh/open-craft/opencraft/4249

Merge request reports