Re: pgAdmin 4 commit: Support EXPLAIN on Greenplum. Fixes #3097

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Joao De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io>
Cc: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgAdmin 4 commit: Support EXPLAIN on Greenplum. Fixes #3097
Date: 2018-03-09 13:31:19
Message-ID: CA+OCxowbnL-0bj-dZ_QYH9xwk=ObgJibyR3Mk4EWFfd7aNb3aQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Thu, Mar 8, 2018 at 2:22 PM, Joao De Almeida Pereira <
jdealmeidapereira(at)pivotal(dot)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(dot)vashi(at)enterprisedb(dot)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 <dpage(at)pgadmin(dot)org> 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 <jdealmeidapereira(at)pivotal(dot)io>
>>>
>>> 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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2018-03-09 15:23:53 pgAdmin 4 commit: Fix SQL generated when dropping NOT NULL from a "char
Previous Message Dave Page 2018-03-09 13:25:38 pgAdmin 4 commit: Use test methods with @patch rather than directly.