zebrunner / reporting

Zebrunner Reporting Tool
https://zebrunner.com/documentation
Apache License 2.0
209 stars 43 forks source link

handle secondary `shutdown` #2344

Closed vdelendik closed 1 year ago

vdelendik commented 1 year ago

in case when nothing is configured or env already destroyed we see such ugly messages during shutdown:

 ./zebrunner.sh shutdown

      WARNING! Shutdown will erase all settings and data for "/home/ubuntu/tools/reporting"!
      Do you want to continue? y/n [n]:y
WARNING: The TAG_NGINX variable is not set. Defaulting to a blank string.
WARNING: The REPORTING_PORT variable is not set. Defaulting to a blank string.
WARNING: The TAG_POSTGRES variable is not set. Defaulting to a blank string.
WARNING: The TAG_RABBITMQ variable is not set. Defaulting to a blank string.
WARNING: The TAG_REDIS variable is not set. Defaulting to a blank string.
WARNING: The TAG_ELASTICSEARCH variable is not set. Defaulting to a blank string.
WARNING: The TAG_LOGSTASH variable is not set. Defaulting to a blank string.
WARNING: The TAG_REPORTING_SERVICE variable is not set. Defaulting to a blank string.
WARNING: The TAG_IAM_SERVICE variable is not set. Defaulting to a blank string.
WARNING: The TAG_ARTIFACTS_PROXY_SERVICE variable is not set. Defaulting to a blank string.
WARNING: The TAG_MAIL_SERVICE variable is not set. Defaulting to a blank string.
WARNING: The TAG_REPORTING_UI variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.zebrunner-proxy.ports contains an invalid type, it should be a number, or an object
Network infra is external, skipping
Removing volume minio-storage_miniodata-volume
WARNING: Volume minio-storage_miniodata-volume not found.

let's add extra validation and skip removals if nothing was configure yet

vdelendik commented 1 year ago

done. we should display warning message for secondary shutdown Unable to erase as nothing is configured!

ghost commented 1 year ago

verified, fixed.