Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1euI7M-0001UW-Lo for pgadmin-hackers@arkaria.postgresql.org; Fri, 09 Mar 2018 13:31:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1euI7K-0004kk-SV for pgadmin-hackers@arkaria.postgresql.org; Fri, 09 Mar 2018 13:31:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1euI7K-0004ka-AQ for pgadmin-hackers@lists.postgresql.org; Fri, 09 Mar 2018 13:31:26 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1euI7F-00045a-VM for pgadmin-hackers@postgresql.org; Fri, 09 Mar 2018 13:31:24 +0000 Received: by mail-wm0-x243.google.com with SMTP id s206so3498015wme.0 for ; Fri, 09 Mar 2018 05:31:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uzjOINshInX9HaL5ATEVeOuQ7YKUzPaZrMDX3YhCj5U=; b=qZQqYSdMKkCSNm4AhZNsjbSzw75FRF/W952AZVJHiccCwRYgVa5l8Bxw0EXHVw3fUk sIEPsBMKxv1uScx63kXcJxXx55AovEBsk5tf2s7Zsq5cim8vzn6bei9Kh7o4TXl7mrMw 3kcRF6/7FA9brN2hL3ruQ5b/EkoAL4q0MUmnrzQqI9q7UrguUEj09lZN4k0wKEz7pxVF BNXSsqymjXVKuDAkbbf2UNEUZNR2EoIOCnamXJC1B6TBWKWY+dGgOyO8BI6AVm5cUlax HY54x/qVHm43QIK0ALzmj/HLw+b8PPoJi9zuDKw070DMVwP18dUL3+DsCRPFpKNvA84M QSeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uzjOINshInX9HaL5ATEVeOuQ7YKUzPaZrMDX3YhCj5U=; b=FrDyEnu9BCgc7KbIPP1k3dVixBG5vRMVPKjJviChPSnxjWPt4j00nCCoOVyrpJcgSz rkGbTuShmf5u1LQwxKKt/X7Lnye8bqOXHb8LODZJDdxeE5knK82QuC36TDkmfyI1g2JA OX5QvkU7rXQo+7ZpqUdPXxFq6BooC63EBoGPEX+dYLrLiGj7YfKUEkdFDgmdJ09m9OdM 2Q+pmdPPDf7tgBox2GvQ1YucgRCZqoHgCyBxpBbV6szLQvfo0U+VasXwtsQlbEEyKv+E 9+A8IVkaumJlx8668IoVSFJWky/4V7hjvNkVs/LGUmMQA8vcFaqPG8OScyAaHDKdhreQ U3DA== X-Gm-Message-State: AElRT7GD+qvYcJ4Ozuq0mZddgHK7oLbP9PlvlGEB7C1tZrp5tDsjokne 5hepbGpJNfFKBEZ+X/KV286Ja2nZgJzY7SQGY/aNuQ== X-Google-Smtp-Source: AG47ELtPupR1K4p1Ly9G/Ed+sehnG5/1rym4lwcdmcW8bl2KXwImgVNgTs+EWstPNuXgmznzOcBYK0VZI8rm2a0ZWnk= X-Received: by 10.28.5.75 with SMTP id 72mr2208973wmf.154.1520602279529; Fri, 09 Mar 2018 05:31:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.109.7 with HTTP; Fri, 9 Mar 2018 05:31:19 -0800 (PST) In-Reply-To: References: From: Dave Page Date: Fri, 9 Mar 2018 13:31:19 +0000 Message-ID: Subject: Re: pgAdmin 4 commit: Support EXPLAIN on Greenplum. Fixes #3097 To: Joao De Almeida Pereira Cc: Khushboo Vashi , pgadmin-hackers Content-Type: multipart/alternative; boundary="001a114429c8b76bc50566face32" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a114429c8b76bc50566face32 Content-Type: text/plain; charset="UTF-8" On Thu, Mar 8, 2018 at 2:22 PM, Joao De Almeida Pereira < jdealmeidapereira@pivotal.io> wrote: > Hello Khushboo, > Completely forgot about this python "feature"....... > Attached is the fix. > Thanks, applied. > > Just as a side question, does anyone else feel the pain of wanting to run > a single test using a IDE or the command line and not being able to? > Not really - the Python and JS tests are so quick I don't really care (and with the Python ones, I can execute for a single module for even more speed). What I would *really* like, is the ability to run individual feature tests. That would be very valuable and save me a ton of time. > We an HandRolled the loader, and that as some implications. Did anyone try > to use a different launcher like pytest or nose instead of the current > runner? > I understand that testscenarios is one of the problems we have if we want > to move away from this way of running tests. > Any suggestion? > > Thanks > Joao > > On Wed, Mar 7, 2018 at 11:41 PM Khushboo Vashi < > khushboo.vashi@enterprisedb.com> wrote: > >> Hi Joao, >> >> In the test_start_running_query.py, 2 static methods >> (is_begin_required_for_sql_query and is_rollback_statement_required) >> of StartRunningQuery class were used directly without @patch. Due to >> this, in all the cases, the original value of them doesn't restore. >> >> To fix this, I have sent the patch in another thread, to restore its >> original state, but I wonder if we can use these methods with @patch. >> >> Thanks, >> Khushboo >> >> >> On Fri, Feb 9, 2018 at 5:24 PM, Dave Page wrote: >> >>> Support EXPLAIN on Greenplum. Fixes #3097 >>> >>> - Extract SQLEditor.execute and SQLEditor._poll into their own files >>> and add test around them >>> - Extract SQLEditor backend functions that start executing query to >>> their own files and add tests around it >>> - Move the Explain SQL from the front-end and now pass the Explain plan >>> parameters as a JSON object in the start query call. >>> - Extract the compile_template_name into a function that can be used by >>> the different places that try to select the version of the template and the >>> server type >>> >>> Branch >>> ------ >>> master >>> >>> Details >>> ------- >>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h= >>> e16a95275336529a734bf0066889e39cc8ef0662 >>> Author: Joao Pedro De Almeida Pereira >>> >>> Modified Files >>> -------------- >>> .../databases/schemas/tables/tests/test_utils.py | 0 >>> web/pgadmin/static/js/sqleditor/execute_query.js | 287 ++++ >>> .../js/sqleditor/is_new_transaction_required.js | 14 + >>> .../static/js/sqleditor/query_tool_actions.js | 33 +- >>> web/pgadmin/tools/sqleditor/__init__.py | 396 +---- >>> web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 227 +-- >>> .../sqleditor/sql/10_plus/explain_plan.sql | 23 + >>> .../sqleditor/sql/9.2_plus/explain_plan.sql | 20 + >>> .../sqleditor/sql/default/explain_plan.sql | 17 + >>> .../sqleditor/sql/gpdb_5.0_plus/explain_plan.sql | 5 + >>> web/pgadmin/tools/sqleditor/tests/__init__.py | 8 + >>> .../sqleditor/tests/test_explain_plan_templates.py | 152 ++ >>> .../test_extract_sql_from_network_parameters.py | 59 + >>> .../tools/sqleditor/tests/test_start_query_tool.py | 38 + >>> web/pgadmin/tools/sqleditor/utils/__init__.py | 14 + >>> .../sqleditor/utils/apply_explain_plan_wrapper.py | 24 + >>> .../tools/sqleditor/utils/constant_definition.py | 32 + >>> .../tools/sqleditor/utils/is_begin_required.py | 169 ++ >>> .../tools/sqleditor/utils/start_running_query.py | 172 ++ >>> .../tools/sqleditor/utils/tests/__init__.py | 8 + >>> .../utils/tests/test_apply_explain_plan_wrapper.py | 121 ++ >>> .../utils/tests/test_start_running_query.py | 445 +++++ >>> .../utils/update_session_grid_transaction.py | 18 + >>> web/pgadmin/utils/compile_template_name.py | 17 + >>> .../utils/tests/test_compile_template_name.py | 34 + >>> web/pgadmin/utils/versioned_template_loader.py | 2 +- >>> web/regression/javascript/fake_endpoints.js | 6 +- >>> .../javascript/sqleditor/execute_query_spec.js | 1702 >>> ++++++++++++++++++++ >>> .../sqleditor/is_new_transaction_required_spec.js | 65 + >>> .../sqleditor/query_tool_actions_spec.js | 141 +- >>> 30 files changed, 3670 insertions(+), 579 deletions(-) >>> >>> >> -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a114429c8b76bc50566face32 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Mar 8, 2018 at 2:22 PM, Joao De Almeida Pereira <jd= ealmeidapereira@pivotal.io> wrote:
Hello Khushboo,
Completely forgot about this p= ython "feature".......
Attached is the fix.
=

Thanks, applied.
=C2=A0

Just as a = side question, does anyone else feel the pain of wanting to run a single te= st using a IDE or the command line and not being able to?

Not really - the Python and JS tests are so quic= k I don't really care (and with the Python ones, I can execute for a si= ngle module for even more speed).

What I would *re= ally* like, is the ability to run individual feature tests. That would be v= ery valuable and save me a ton of time.

=C2=A0
We an HandRolled the= loader, and that as some implications. Did anyone try to use a different l= auncher like pytest or nose instead of the current runner?=C2=A0
= I understand that testscenarios is one of the problems we have if we want t= o move away from this way of running tests.
Any suggestion?
=

Thanks
Joao

On Wed, Mar 7, 2018 at 11:41 PM Khushboo Vashi= <k= hushboo.vashi@enterprisedb.com> wrote:
Hi Joao,

In the=C2=A0test_start_running_query.py, 2 static methods (is_begin_required_for_sql_query and is_rollback_statement_required)
= of StartRunningQuery class were used directly withou= t @patch. Due to this, in all the cases, the origina= l value of them doesn't restore.

<= /span>
To fix this, I have sent the patch in anot= her thread, to restore its original state, but I wonder if we can use these= methods with @patch.

Thanks,
Khushboo<= /div>


On Fri, Feb 9, 2018 at 5:24 PM, Dave Page <dpage@pgadmin.org&= gt; wrote:
Support EXPLAIN on Gree= nplum. Fixes #3097

=C2=A0- Extract SQLEditor.execute and SQLEditor._poll into their own files = and add test around them
=C2=A0- Extract SQLEditor backend functions that start executing query to t= heir own files and add tests around it
=C2=A0- Move the Explain SQL from the front-end and now pass the Explain pl= an parameters as a JSON object in the start query call.
=C2=A0- Extract the compile_template_name into a function that can be used = by the different places that try to select the version of the template and = the server type

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=3Dpgadmin4.git;a=3Dcommitdiff;h=3De16a95275336529a734bf0066889e39cc8ef0662
Author: Joao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io>

Modified Files
--------------
.../databases/schemas/tables/tests/test_utils.py=C2=A0 =C2=A0|=C2=A0 = =C2=A0 0
web/pgadmin/static/js/sqleditor/execute_query.js=C2=A0 =C2=A0|=C2=A0 2= 87 ++++
.../js/sqleditor/is_new_transaction_required.js=C2=A0 =C2=A0 |=C2=A0 = =C2=A014 +
.../static/js/sqleditor/query_tool_actions.js=C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A033 +-
web/pgadmin/tools/sqleditor/__init__.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 396 +----
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |=C2=A0 227 +--
.../sqleditor/sql/10_plus/explain_plan.sql=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 =C2=A023 +
.../sqleditor/sql/9.2_plus/explain_plan.sql=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 =C2=A020 +
.../sqleditor/sql/default/explain_plan.sql=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 =C2=A017 +
.../sqleditor/sql/gpdb_5.0_plus/explain_plan.sql=C2=A0 =C2=A0|=C2=A0 = =C2=A0 5 +
web/pgadmin/tools/sqleditor/tests/__init__.py=C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A0 8 +
.../sqleditor/tests/test_explain_plan_templates.py |=C2=A0 152 ++
.../test_extract_sql_from_network_parameters.py=C2=A0 =C2=A0 |=C2=A0 = =C2=A059 +
.../tools/sqleditor/tests/test_start_query_tool.py |=C2=A0 =C2=A038 +<= br> web/pgadmin/tools/sqleditor/utils/__init__.py=C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A014 +
.../sqleditor/utils/apply_explain_plan_wrapper.py=C2=A0 |=C2=A0 =C2=A0= 24 +
.../tools/sqleditor/utils/constant_definition.py=C2=A0 =C2=A0|=C2=A0 = =C2=A032 +
.../tools/sqleditor/utils/is_begin_required.py=C2=A0 =C2=A0 =C2=A0|=C2= =A0 169 ++
.../tools/sqleditor/utils/start_running_query.py=C2=A0 =C2=A0|=C2=A0 1= 72 ++
.../tools/sqleditor/utils/tests/__init__.py=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 =C2=A0 8 +
.../utils/tests/test_apply_explain_plan_wrapper.py |=C2=A0 121 ++
.../utils/tests/test_start_running_query.py=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 445 +++++
.../utils/update_session_grid_transaction.py=C2=A0 =C2=A0 =C2=A0 =C2= =A0|=C2=A0 =C2=A018 +
web/pgadmin/utils/compile_template_name.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 =C2=A017 +
.../utils/tests/test_compile_template_name.py=C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A034 +
web/pgadmin/utils/versioned_template_loader.py=C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A0 2 +-
web/regression/javascript/fake_endpoints.js=C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 =C2=A0 6 +-
.../javascript/sqleditor/execute_query_spec.js=C2=A0 =C2=A0 =C2=A0| 17= 02 ++++++++++++++++++++
.../sqleditor/is_new_transaction_required_spec.js=C2=A0 |=C2=A0 =C2=A0= 65 +
.../sqleditor/query_tool_actions_spec.js=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0|=C2=A0 141 +-
30 files changed, 3670 insertions(+), 579 deletions(-)





--
Dave Page
Blog: = http://pgsnake.bl= ogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com<= br>The Enterprise PostgreSQL Company
--001a114429c8b76bc50566face32--