IMPALA-4751: Remove blank line from raw_text template

The additional blank line can break tooling which uses the
/query_profile_encoded endpoint and has been erroneously introduced in
the fix for IMPALA-3918.

Change-Id: I9b688aa9e2423b0271c8891a983e5b22707d8dbc
Reviewed-on: http://gerrit.cloudera.org:8080/5664
Reviewed-by: Jim Apple <[email protected]>
Reviewed-by: Tim Armstrong <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/ac59489d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/ac59489d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/ac59489d

Branch: refs/heads/master
Commit: ac59489df9a96fe4770a907fe479c605ed05a12b
Parents: 63a9f3e
Author: Lars Volker <[email protected]>
Authored: Tue Jan 10 15:25:43 2017 +0100
Committer: Impala Public Jenkins <[email protected]>
Committed: Tue Jan 10 21:16:57 2017 +0000

----------------------------------------------------------------------
 tests/webserver/test_web_pages.py | 12 ++++++++++++
 www/raw_text.tmpl                 |  6 ++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ac59489d/tests/webserver/test_web_pages.py
----------------------------------------------------------------------
diff --git a/tests/webserver/test_web_pages.py 
b/tests/webserver/test_web_pages.py
index c54a211..0f993df 100644
--- a/tests/webserver/test_web_pages.py
+++ b/tests/webserver/test_web_pages.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from tests.common.impala_cluster import ImpalaCluster
 from tests.common.impala_test_suite import ImpalaTestSuite
 import requests
 
@@ -28,3 +29,14 @@ class TestWebPage(ImpalaTestSuite):
     assert page.status_code == requests.codes.ok
     page = requests.get("http://localhost:25020/memz";)
     assert page.status_code == requests.codes.ok
+
+  def test_query_profile_encoded_unknown_query_id(self):
+    """Test that /query_profile_encoded error message starts with the expected 
line in
+    case of missing query and does not contain any leading whitespace.
+    """
+    cluster = ImpalaCluster()
+    impalad = cluster.get_any_impalad()
+    result = 
impalad.service.read_debug_webpage("query_profile_encoded?query_id=123")
+    assert result.startswith("Could not obtain runtime profile: Query id")
+
+

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ac59489d/www/raw_text.tmpl
----------------------------------------------------------------------
diff --git a/www/raw_text.tmpl b/www/raw_text.tmpl
index 88e2af0..9021cdd 100644
--- a/www/raw_text.tmpl
+++ b/www/raw_text.tmpl
@@ -15,5 +15,7 @@ software distributed under the License is distributed on an
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-}}
-{{contents}}
\ No newline at end of file
+}}{{!
+When making changes to this file, please make sure to not introduce any 
whitespace before
+the main content, or it may break tools relying on the content starting on the 
first line.
+}}{{contents}}

Reply via email to