IMPALA-6241 added a .cmake_build_type file with the CMAKE_BUILD_TYPE value for the last build. The file is used to detect the type of the build that the python tests are running against. However, this assumes that the tests are running from the same directory that the Impala cluster under test was built from, which isn't necessarily true for all dev workflows and for remote cluster tests.
It would be convenient if CMAKE_BUILD_TYPE was exposed from the Impalad web UI. Currently we expose DEBUG/RELEASE depending on the value of NDEBUG - see GetVersionString() and impalad-host:25000/?json=true, but we could expose the precise build type, then allow the python tests to parse it from the web UI.