From 02c065751ac9331eceb20ef5ac0361cc93146bd6 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Tue, 14 Jun 2016 14:23:56 +0300 Subject: [PATCH 1/2] Update Heroku pre_compile hook --- bin/pre_compile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/pre_compile b/bin/pre_compile index fd07650446..e1c7db3c44 100644 --- a/bin/pre_compile +++ b/bin/pre_compile @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# heroku pre_compile script +# Heroku pre_compile script DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" pushd $DIR/.. @@ -8,8 +8,9 @@ pushd $DIR/.. # https://github.com/heroku/heroku-buildpack-python/blob/master/bin/steps/cryptography # to avoid making it a requirement for other build systems, we'll inject it now # into the requirements.txt file -# remove pymssql, it doesn't compile on heroku -grep -v '^pymssql' requirements_all_ds.txt >> requirements.txt + +# Remove Heroku unsupported Python packages: +grep -v -E "^(pymssql|thrift|sasl|pyhive)" requirements_all_ds.txt >> requirements.txt # make the heroku Procfile the active one cp Procfile.heroku Procfile From 2c2ff0d2529f2327c674d42291d827babdd3ba1a Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Tue, 14 Jun 2016 15:39:12 +0300 Subject: [PATCH 2/2] Fix #669: save fails when doing partial save of new query --- rd_ui/app/scripts/controllers/query_source.js | 4 ++++ rd_ui/app/scripts/controllers/query_view.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/rd_ui/app/scripts/controllers/query_source.js b/rd_ui/app/scripts/controllers/query_source.js index 9c3339c9c0..05e17bd269 100644 --- a/rd_ui/app/scripts/controllers/query_source.js +++ b/rd_ui/app/scripts/controllers/query_source.js @@ -53,6 +53,10 @@ $scope.saveQuery = function(options, data) { var savePromise = saveQuery(options, data); + if (!savePromise) { + return; + } + savePromise.then(function(savedQuery) { queryText = savedQuery.query; $scope.isDirty = $scope.query.query !== queryText; diff --git a/rd_ui/app/scripts/controllers/query_view.js b/rd_ui/app/scripts/controllers/query_view.js index 4b7cbbccdb..bc137a9970 100644 --- a/rd_ui/app/scripts/controllers/query_view.js +++ b/rd_ui/app/scripts/controllers/query_view.js @@ -123,6 +123,10 @@ $scope.saveQuery = function(options, data) { if (data) { + // Don't save new query with partial data + if ($scope.query.isNew()) { + return; + } data.id = $scope.query.id; } else { data = _.pick($scope.query, ["schedule", "query", "id", "description", "name", "data_source_id", "options"]);