If spark env variable `SPARK_PUBLIC_DNS` is defined, then we should use it to report Flow UI address.