Re: [pgAdmin4][Patch]: RM #2963 - Backup database, Restore database and Maintenance Database failed for é object.

2018-03-08 Thread Khushboo Vashi
Hi,

Please find the attached patch to fix below issues:

1. #2963 - Backup database, Restore database and Maintenance Database
failed for é object
2. #3157 - Process viewer doesn't show complete command executed.

Test cases are not included for these fixes as we don't have test cases for
these modules (backup, restore, maintenance).
I will create one separate RM for the same which will cover this.

Thanks,
Khushboo



On Fri, Jan 12, 2018 at 3:24 PM, Dave Page  wrote:

> Hi
>
> On Wed, Jan 10, 2018 at 6:59 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Wed, Jan 3, 2018 at 8:54 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Mon, Dec 25, 2017 at 11:03 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find the attached patch to fix RM #2963: Backup database,
 Restore database and Maintenance Database failed for é object.

>>>
>>> With the patch applied, I get:
>>>
>>> 2018-01-03 15:23:00,110: INFO pgadmin: Executing the process executor
>>> with the arguments: ['/Users/dpage/.virtualenvs/pgadmin4/bin/python',
>>> '/Users/dpage/git/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py',
>>> '/usr/local/pgsql/bin/pg_dump', u'--file', u'/Users/dpage/e.sql',
>>> u'--host', u'localhost', u'--port', '5432', u'--username', u'postgres',
>>> u'--no-password', u'--verbose', u'--format=c', u'--blobs', u'\xe9']
>>> 2018-01-03 15:23:00,117: INFO werkzeug: 127.0.0.1 - - [03/Jan/2018
>>> 15:23:00] "POST /backup/job/1/object HTTP/1.1" 200 -
>>> Exception in thread Thread-6:
>>> Traceback (most recent call last):
>>>   File 
>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py",
>>> line 810, in __bootstrap_inner
>>> self.run()
>>>   File 
>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py",
>>> line 763, in run
>>> self.__target(*self.__args, **self.__kwargs)
>>>   File 
>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>>> line 602, in process_request_thread
>>> self.handle_error(request, client_address)
>>>   File 
>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>>> line 599, in process_request_thread
>>> self.finish_request(request, client_address)
>>>   File 
>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>>> line 334, in finish_request
>>> self.RequestHandlerClass(request, client_address, self)
>>>   File 
>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>>> line 655, in __init__
>>> self.handle()
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>>> line 200, in handle
>>> rv = BaseHTTPRequestHandler.handle(self)
>>>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/li
>>> b/python2.7/BaseHTTPServer.py", line 340, in handle
>>> self.handle_one_request()
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>>> line 235, in handle_one_request
>>> return self.run_wsgi()
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>>> line 177, in run_wsgi
>>> execute(self.server.app)
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>>> line 165, in execute
>>> application_iter = app(environ, start_response)
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 2000, in __call__
>>> return self.wsgi_app(environ, start_response)
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1991, in wsgi_app
>>> response = self.make_response(self.handle_exception(e))
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1567, in handle_exception
>>> reraise(exc_type, exc_value, tb)
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1988, in wsgi_app
>>> response = self.full_dispatch_request()
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1641, in full_dispatch_request
>>> rv = self.handle_user_exception(e)
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1544, in handle_user_exception
>>> reraise(exc_type, exc_value, tb)
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1639, in full_dispatch_request
>>> rv = self.dispatch_request()
>>>   File 
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1625, in dispatch_request
>>> return 

Re: [pgAdmin4][RM#2989] To fix the issue in Table node

2018-03-08 Thread Murtuza Zabuawala
Thank you Joao

Regards,
Murtuza


On Thu, Mar 8, 2018 at 10:19 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hello Murtuza/Dave,
>
> Nice splitting of some of the functionality into functions, removing some
> of the complexity of the initial function. Good job.
>
> I made some changes because the linter was failing and also changed some
> variable names.
> These changes pass our CI and the linter.
>
> Thanks
> Joao
>
> On Thu, Mar 8, 2018 at 8:13 AM Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find updated patch.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Thu, Mar 8, 2018 at 6:10 PM, Dave Page  wrote:
>>
>>> Can you rebase this please?
>>>
>>> Thanks.
>>>
>>> On Thu, Mar 8, 2018 at 9:00 AM, Murtuza Zabuawala >> enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find updated patch & updated test case to cover that as well.



 --
 Regards,
 Murtuza Zabuawala
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company


 On Wed, Mar 7, 2018 at 9:59 PM, Dave Page  wrote:

> Hi
>
> On Wed, Mar 7, 2018 at 2:59 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA updated patch.
>>
>>
> Using your example on the ticket, I added a "character varying (32)"
> column with NOT NULL to the table. When I then edit the column, and turn
> off NOT NULL (making no other changes), the SQL generated is:
>
> ALTER TABLE public.test_drop
> ALTER COLUMN col2 TYPE character varying (32) COLLATE
> pg_catalog."default";
> ALTER TABLE public.test_drop
> ALTER COLUMN col2 DROP NOT NULL;
>
> I didn't see that when turning off NOT NULL for col1.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>


Re: [pgAdmin4][RM#2989] To fix the issue in Table node

2018-03-08 Thread Murtuza Zabuawala
Hi Dave,

Please find updated patch.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Thu, Mar 8, 2018 at 6:10 PM, Dave Page  wrote:

> Can you rebase this please?
>
> Thanks.
>
> On Thu, Mar 8, 2018 at 9:00 AM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find updated patch & updated test case to cover that as well.
>>
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Wed, Mar 7, 2018 at 9:59 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Wed, Mar 7, 2018 at 2:59 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 PFA updated patch.


>>> Using your example on the ticket, I added a "character varying (32)"
>>> column with NOT NULL to the table. When I then edit the column, and turn
>>> off NOT NULL (making no other changes), the SQL generated is:
>>>
>>> ALTER TABLE public.test_drop
>>> ALTER COLUMN col2 TYPE character varying (32) COLLATE
>>> pg_catalog."default";
>>> ALTER TABLE public.test_drop
>>> ALTER COLUMN col2 DROP NOT NULL;
>>>
>>> I didn't see that when turning off NOT NULL for col1.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


RM_2989_v2_rebase.diff
Description: Binary data


Re: [pgAdmin4][RM#2989] To fix the issue in Table node

2018-03-08 Thread Dave Page
Can you rebase this please?

Thanks.

On Thu, Mar 8, 2018 at 9:00 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find updated patch & updated test case to cover that as well.
>
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> On Wed, Mar 7, 2018 at 9:59 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Wed, Mar 7, 2018 at 2:59 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> PFA updated patch.
>>>
>>>
>> Using your example on the ticket, I added a "character varying (32)"
>> column with NOT NULL to the table. When I then edit the column, and turn
>> off NOT NULL (making no other changes), the SQL generated is:
>>
>> ALTER TABLE public.test_drop
>> ALTER COLUMN col2 TYPE character varying (32) COLLATE
>> pg_catalog."default";
>> ALTER TABLE public.test_drop
>> ALTER COLUMN col2 DROP NOT NULL;
>>
>> I didn't see that when turning off NOT NULL for col1.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Jenkins build is back to normal : pgadmin4-master-python27 #515

2018-03-08 Thread pgAdmin 4 Jenkins
See 





pgAdmin 4 commit: Minor formatting fix

2018-03-08 Thread Dave Page
Minor formatting fix

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0283f68d7f91df6966a804662304031980b320bd
Author: Khushboo Vashi 

Modified Files
--
web/pgAdmin4.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



[pgAdmin4][Patch]: PEP-8 fix

2018-03-08 Thread Khushboo Vashi
Hi,

Please find a small pep-8 fix.

Thanks,
Khushboo
diff --git a/web/pgAdmin4.py b/web/pgAdmin4.py
index 138ce69..6d0453b 100644
--- a/web/pgAdmin4.py
+++ b/web/pgAdmin4.py
@@ -55,7 +55,7 @@ if not os.path.isfile(config.SQLITE_PATH):
 os.path.dirname(os.path.realpath(u(__file__, fs_encoding))),
 u'setup.py'
 )
-exec (open(file_quote(setupfile), 'r').read())
+exec(open(file_quote(setupfile), 'r').read())
 
 ##
 # Server startup


Jenkins build is back to normal : pgadmin4-master-python26 #642

2018-03-08 Thread pgAdmin 4 Jenkins
See 





pgAdmin 4 commit: Fix test case for Python 2.

2018-03-08 Thread Dave Page
Fix test case for Python 2.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=7796a47b127a73313ad83bac8241b48c1076730c
Author: Khushboo Vashi 

Modified Files
--
web/pgadmin/tools/sqleditor/utils/tests/test_start_running_query.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



Re: Build failed in Jenkins: pgadmin4-master-python33 #507

2018-03-08 Thread Khushboo Vashi
On Thu, Mar 8, 2018 at 3:35 PM, Dave Page  wrote:

>
>
> On Thu, Mar 8, 2018 at 9:47 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Mar 8, 2018 at 3:08 PM, Dave Page  wrote:
>>
>>> Well, it looks like Python 3 might be happy now. 2.6 and 2.7 aren't
>>> though (which is odd, as it passed on my local 2.7).
>>>
>>> Please find the attached patch to fix the test issue in PY2. I have
tested it on python 2.7 and 3.5 with 3 servers.

> I am looking into this. Btw, which command do you use to run tests?
>>
>
> make check-python
>
>
>
>> On Thu, Mar 8, 2018 at 9:13 AM, Dave Page  wrote:
>>>
 Thanks, applied.

 On Thu, Mar 8, 2018 at 4:26 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Wed, Mar 7, 2018 at 11:13 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find the patch to fix this.
>> I have fixed this issue in the StartRunningQueryTest class, this test
>> class changes the behaviour of the methods through MagicMock and due to
>> this this test case is failing.
>>
>> Revised patch with some modification.
>
>> Thanks,
>> Khushboo
>>
>>
>> On Wed, Mar 7, 2018 at 10:34 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Wed, Mar 7, 2018 at 10:33 PM, Dave Page 
>>> wrote:
>>>
 It still seems to be failing :-(

 :(
>>>
 https://jenkins.pgadmin.org/job/pgadmin4-master-python26/las
 tFailedBuild/consoleFull

 On Wed, Mar 7, 2018 at 4:50 PM, Dave Page 
 wrote:

> Thanks, applied. Lets see what happens.
>
> On Wed, Mar 7, 2018 at 4:37 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Please find the attached updated patch.
>> This should work.
>>
>>
>> On Wed, Mar 7, 2018 at 9:46 PM, Dave Page 
>> wrote:
>>
>>>
>>>
>>> On Wed, Mar 7, 2018 at 4:13 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Wed, Mar 7, 2018 at 9:23 PM, Dave Page 
 wrote:

> Hi
>
> On Wed, Mar 7, 2018 at 3:10 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Wed, Mar 7, 2018 at 7:34 PM, Dave Page 
>> wrote:
>>
>>> Khushboo, can you look at this ASAP please? It passed tests
>>> on my machine, but Jenkins isn't happy.
>>>
>>> I have tried to reproduce the issue with many combination
>> but couldn't reproduce it.
>> With the help of logs, I have tried to fix it. Can you please
>> check this fix is helpful or not?
>>
>
> On my laptop I now get:
>
> 
> ==
> ERROR: runTest (pgadmin.tools.sqleditor.tests
> .test_poll_query_tool.TestPollQueryTool)
> When query tool polling returns messages with result data-set
> 
> --
> Traceback (most recent call last):
>   File "/Users/dpage/git/pgadmin4/web
> /pgadmin/tools/sqleditor/tests/test_poll_query_tool.py", line
> 104, in runTest
> response_data['data']['additional_messages'])
>   File "/System/Library/Frameworks/Py
> thon.framework/Versions/2.7/lib/python2.7/unittest/case.py",
> line 802, in assertIn
> if member not in container:
> TypeError: argument of type 'NoneType' is not iterable
>
> 
> --
>
> Please provide some more details. Is this failing for
 particular server version?
 I am not getting any error with this patch and without this
 patch on PY2 and PY3 with a single/multiple servers.

>>>
>>> Python 2.7.10 on macOS Sierra, testing against PostgreSQL 9.4.
>>> Here are the package versions in the venv:
>>>
>>> alabaster==0.7.10
>>> alembic==0.9.6
>>> args==0.1.0
>>> Babel==2.3.4
>>> backports.csv==1.0.4
>>> beautifulsoup4==4.4.1
>>> blinker==1.3
>>> chromedriver-installer==0.0.6
>>> click==6.6

Build failed in Jenkins: pgadmin4-master-python27 #514

2018-03-08 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Final PEP-8 fixes

[Dave Page] Always run PEP-8 checks!

--
[...truncated 643.57 KB...]
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.4:

276 tests passed
1 test failed:
TestPollQueryTool (When query tool polling returns messages 
with result data-set)
15 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing list 
partitioned table,
Create partitions of existing range 
partitioned table,
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.3:

276 tests passed
1 test failed:
TestPollQueryTool (When query tool polling returns messages 
with result data-set)
15 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing list 
partitioned table,
Create partitions of existing range 
partitioned table,
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.2:

269 tests 

Jenkins build is back to normal : pgadmin4-master-python36 #505

2018-03-08 Thread pgAdmin 4 Jenkins
See 





Re: Build failed in Jenkins: pgadmin4-master-python33 #507

2018-03-08 Thread Dave Page
On Thu, Mar 8, 2018 at 9:47 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Thu, Mar 8, 2018 at 3:08 PM, Dave Page  wrote:
>
>> Well, it looks like Python 3 might be happy now. 2.6 and 2.7 aren't
>> though (which is odd, as it passed on my local 2.7).
>>
>> I am looking into this. Btw, which command do you use to run tests?
>

make check-python



> On Thu, Mar 8, 2018 at 9:13 AM, Dave Page  wrote:
>>
>>> Thanks, applied.
>>>
>>> On Thu, Mar 8, 2018 at 4:26 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Wed, Mar 7, 2018 at 11:13 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find the patch to fix this.
> I have fixed this issue in the StartRunningQueryTest class, this test
> class changes the behaviour of the methods through MagicMock and due to
> this this test case is failing.
>
> Revised patch with some modification.

> Thanks,
> Khushboo
>
>
> On Wed, Mar 7, 2018 at 10:34 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Wed, Mar 7, 2018 at 10:33 PM, Dave Page  wrote:
>>
>>> It still seems to be failing :-(
>>>
>>> :(
>>
>>> https://jenkins.pgadmin.org/job/pgadmin4-master-python26/las
>>> tFailedBuild/consoleFull
>>>
>>> On Wed, Mar 7, 2018 at 4:50 PM, Dave Page  wrote:
>>>
 Thanks, applied. Lets see what happens.

 On Wed, Mar 7, 2018 at 4:37 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Please find the attached updated patch.
> This should work.
>
>
> On Wed, Mar 7, 2018 at 9:46 PM, Dave Page 
> wrote:
>
>>
>>
>> On Wed, Mar 7, 2018 at 4:13 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Wed, Mar 7, 2018 at 9:23 PM, Dave Page 
>>> wrote:
>>>
 Hi

 On Wed, Mar 7, 2018 at 3:10 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Wed, Mar 7, 2018 at 7:34 PM, Dave Page 
> wrote:
>
>> Khushboo, can you look at this ASAP please? It passed tests
>> on my machine, but Jenkins isn't happy.
>>
>> I have tried to reproduce the issue with many combination but
> couldn't reproduce it.
> With the help of logs, I have tried to fix it. Can you please
> check this fix is helpful or not?
>

 On my laptop I now get:

 
 ==
 ERROR: runTest (pgadmin.tools.sqleditor.tests
 .test_poll_query_tool.TestPollQueryTool)
 When query tool polling returns messages with result data-set
 
 --
 Traceback (most recent call last):
   File "/Users/dpage/git/pgadmin4/web
 /pgadmin/tools/sqleditor/tests/test_poll_query_tool.py", line
 104, in runTest
 response_data['data']['additional_messages'])
   File "/System/Library/Frameworks/Py
 thon.framework/Versions/2.7/lib/python2.7/unittest/case.py",
 line 802, in assertIn
 if member not in container:
 TypeError: argument of type 'NoneType' is not iterable

 
 --

 Please provide some more details. Is this failing for
>>> particular server version?
>>> I am not getting any error with this patch and without this
>>> patch on PY2 and PY3 with a single/multiple servers.
>>>
>>
>> Python 2.7.10 on macOS Sierra, testing against PostgreSQL 9.4.
>> Here are the package versions in the venv:
>>
>> alabaster==0.7.10
>> alembic==0.9.6
>> args==0.1.0
>> Babel==2.3.4
>> backports.csv==1.0.4
>> beautifulsoup4==4.4.1
>> blinker==1.3
>> chromedriver-installer==0.0.6
>> click==6.6
>> clint==0.5.1
>> dateutils==0.6.6
>> docutils==0.13.1
>> extras==1.0.0
>> fixtures==3.0.0
>> Flask==0.11.1
>> Flask-Babel==0.11.1
>> Flask-Gravatar==0.4.2
>> Flask-HTMLmin==1.2
>> Flask-Login==0.3.2
>> Flask-Mail==0.9.1
>> Flask-Migrate==2.0.3
>> 

Jenkins build is back to normal : pgadmin4-master-python33 #511

2018-03-08 Thread pgAdmin 4 Jenkins
See 





Re: Build failed in Jenkins: pgadmin4-master-python33 #507

2018-03-08 Thread Khushboo Vashi
On Thu, Mar 8, 2018 at 3:08 PM, Dave Page  wrote:

> Well, it looks like Python 3 might be happy now. 2.6 and 2.7 aren't though
> (which is odd, as it passed on my local 2.7).
>
> I am looking into this. Btw, which command do you use to run tests?

> On Thu, Mar 8, 2018 at 9:13 AM, Dave Page  wrote:
>
>> Thanks, applied.
>>
>> On Thu, Mar 8, 2018 at 4:26 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Wed, Mar 7, 2018 at 11:13 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find the patch to fix this.
 I have fixed this issue in the StartRunningQueryTest class, this test
 class changes the behaviour of the methods through MagicMock and due to
 this this test case is failing.

 Revised patch with some modification.
>>>
 Thanks,
 Khushboo


 On Wed, Mar 7, 2018 at 10:34 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Wed, Mar 7, 2018 at 10:33 PM, Dave Page  wrote:
>
>> It still seems to be failing :-(
>>
>> :(
>
>> https://jenkins.pgadmin.org/job/pgadmin4-master-python26/las
>> tFailedBuild/consoleFull
>>
>> On Wed, Mar 7, 2018 at 4:50 PM, Dave Page  wrote:
>>
>>> Thanks, applied. Lets see what happens.
>>>
>>> On Wed, Mar 7, 2018 at 4:37 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Please find the attached updated patch.
 This should work.


 On Wed, Mar 7, 2018 at 9:46 PM, Dave Page 
 wrote:

>
>
> On Wed, Mar 7, 2018 at 4:13 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Wed, Mar 7, 2018 at 9:23 PM, Dave Page 
>> wrote:
>>
>>> Hi
>>>
>>> On Wed, Mar 7, 2018 at 3:10 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 On Wed, Mar 7, 2018 at 7:34 PM, Dave Page 
 wrote:

> Khushboo, can you look at this ASAP please? It passed tests on
> my machine, but Jenkins isn't happy.
>
> I have tried to reproduce the issue with many combination but
 couldn't reproduce it.
 With the help of logs, I have tried to fix it. Can you please
 check this fix is helpful or not?

>>>
>>> On my laptop I now get:
>>>
>>> 
>>> ==
>>> ERROR: runTest (pgadmin.tools.sqleditor.tests
>>> .test_poll_query_tool.TestPollQueryTool)
>>> When query tool polling returns messages with result data-set
>>> 
>>> --
>>> Traceback (most recent call last):
>>>   File "/Users/dpage/git/pgadmin4/web
>>> /pgadmin/tools/sqleditor/tests/test_poll_query_tool.py", line
>>> 104, in runTest
>>> response_data['data']['additional_messages'])
>>>   File "/System/Library/Frameworks/Py
>>> thon.framework/Versions/2.7/lib/python2.7/unittest/case.py",
>>> line 802, in assertIn
>>> if member not in container:
>>> TypeError: argument of type 'NoneType' is not iterable
>>>
>>> 
>>> --
>>>
>>> Please provide some more details. Is this failing for particular
>> server version?
>> I am not getting any error with this patch and without this patch
>> on PY2 and PY3 with a single/multiple servers.
>>
>
> Python 2.7.10 on macOS Sierra, testing against PostgreSQL 9.4.
> Here are the package versions in the venv:
>
> alabaster==0.7.10
> alembic==0.9.6
> args==0.1.0
> Babel==2.3.4
> backports.csv==1.0.4
> beautifulsoup4==4.4.1
> blinker==1.3
> chromedriver-installer==0.0.6
> click==6.6
> clint==0.5.1
> dateutils==0.6.6
> docutils==0.13.1
> extras==1.0.0
> fixtures==3.0.0
> Flask==0.11.1
> Flask-Babel==0.11.1
> Flask-Gravatar==0.4.2
> Flask-HTMLmin==1.2
> Flask-Login==0.3.2
> Flask-Mail==0.9.1
> Flask-Migrate==2.0.3
> Flask-Paranoid==0.1.0
> Flask-Principal==0.4.0
> Flask-Script==2.0.6
> Flask-Security==1.7.5
> Flask-SQLAlchemy==2.1
> Flask-WTF==0.12
> funcsigs==1.0.2
> html5lib==1.0b3
> htmlmin==0.1.11
> 

Jenkins build is back to normal : pgadmin4-master-python34 #504

2018-03-08 Thread pgAdmin 4 Jenkins
See 





Re: Build failed in Jenkins: pgadmin4-master-python33 #507

2018-03-08 Thread Dave Page
Well, it looks like Python 3 might be happy now. 2.6 and 2.7 aren't though
(which is odd, as it passed on my local 2.7).

On Thu, Mar 8, 2018 at 9:13 AM, Dave Page  wrote:

> Thanks, applied.
>
> On Thu, Mar 8, 2018 at 4:26 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Wed, Mar 7, 2018 at 11:13 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find the patch to fix this.
>>> I have fixed this issue in the StartRunningQueryTest class, this test
>>> class changes the behaviour of the methods through MagicMock and due to
>>> this this test case is failing.
>>>
>>> Revised patch with some modification.
>>
>>> Thanks,
>>> Khushboo
>>>
>>>
>>> On Wed, Mar 7, 2018 at 10:34 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Wed, Mar 7, 2018 at 10:33 PM, Dave Page  wrote:

> It still seems to be failing :-(
>
> :(

> https://jenkins.pgadmin.org/job/pgadmin4-master-python26/las
> tFailedBuild/consoleFull
>
> On Wed, Mar 7, 2018 at 4:50 PM, Dave Page  wrote:
>
>> Thanks, applied. Lets see what happens.
>>
>> On Wed, Mar 7, 2018 at 4:37 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Please find the attached updated patch.
>>> This should work.
>>>
>>>
>>> On Wed, Mar 7, 2018 at 9:46 PM, Dave Page  wrote:
>>>


 On Wed, Mar 7, 2018 at 4:13 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Wed, Mar 7, 2018 at 9:23 PM, Dave Page 
> wrote:
>
>> Hi
>>
>> On Wed, Mar 7, 2018 at 3:10 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Wed, Mar 7, 2018 at 7:34 PM, Dave Page 
>>> wrote:
>>>
 Khushboo, can you look at this ASAP please? It passed tests on
 my machine, but Jenkins isn't happy.

 I have tried to reproduce the issue with many combination but
>>> couldn't reproduce it.
>>> With the help of logs, I have tried to fix it. Can you please
>>> check this fix is helpful or not?
>>>
>>
>> On my laptop I now get:
>>
>> 
>> ==
>> ERROR: runTest (pgadmin.tools.sqleditor.tests
>> .test_poll_query_tool.TestPollQueryTool)
>> When query tool polling returns messages with result data-set
>> 
>> --
>> Traceback (most recent call last):
>>   File "/Users/dpage/git/pgadmin4/web
>> /pgadmin/tools/sqleditor/tests/test_poll_query_tool.py", line
>> 104, in runTest
>> response_data['data']['additional_messages'])
>>   File "/System/Library/Frameworks/Py
>> thon.framework/Versions/2.7/lib/python2.7/unittest/case.py",
>> line 802, in assertIn
>> if member not in container:
>> TypeError: argument of type 'NoneType' is not iterable
>>
>> 
>> --
>>
>> Please provide some more details. Is this failing for particular
> server version?
> I am not getting any error with this patch and without this patch
> on PY2 and PY3 with a single/multiple servers.
>

 Python 2.7.10 on macOS Sierra, testing against PostgreSQL 9.4. Here
 are the package versions in the venv:

 alabaster==0.7.10
 alembic==0.9.6
 args==0.1.0
 Babel==2.3.4
 backports.csv==1.0.4
 beautifulsoup4==4.4.1
 blinker==1.3
 chromedriver-installer==0.0.6
 click==6.6
 clint==0.5.1
 dateutils==0.6.6
 docutils==0.13.1
 extras==1.0.0
 fixtures==3.0.0
 Flask==0.11.1
 Flask-Babel==0.11.1
 Flask-Gravatar==0.4.2
 Flask-HTMLmin==1.2
 Flask-Login==0.3.2
 Flask-Mail==0.9.1
 Flask-Migrate==2.0.3
 Flask-Paranoid==0.1.0
 Flask-Principal==0.4.0
 Flask-Script==2.0.6
 Flask-Security==1.7.5
 Flask-SQLAlchemy==2.1
 Flask-WTF==0.12
 funcsigs==1.0.2
 html5lib==1.0b3
 htmlmin==0.1.11
 imagesize==0.7.1
 importlib==1.0.3
 itsdangerous==0.24
 Jinja2==2.7.3
 linecache2==1.0.0
 Mako==1.0.7
 MarkupSafe==0.23
 minify==0.1.4
 mock==2.0.0
 passlib==1.6.2
 pbr==3.1.1
 pkginfo==1.4.1
 

Build failed in Jenkins: pgadmin4-master-python26 #641

2018-03-08 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] More hardening of the query tool tests.

--
[...truncated 644.50 KB...]
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.4:

276 tests passed
1 test failed:
TestPollQueryTool (When query tool polling returns messages 
with result data-set)
15 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing list 
partitioned table,
Create partitions of existing range 
partitioned table,
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.3:

276 tests passed
1 test failed:
TestPollQueryTool (When query tool polling returns messages 
with result data-set)
15 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing list 
partitioned table,
Create partitions of existing range 
partitioned table,
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.2:

269 tests passed
0 

Re: Last PEP-8 changes

2018-03-08 Thread Dave Page
Thanks, applied!

I also modified the Makefile to include PEP-8 checks in the check target,
and the ci runner scripts to run them before the Python tests.

On Wed, Mar 7, 2018 at 9:16 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Hackers,
> Attached you can find the last changes to PEP-8, after this we should not
> have any missing PEP change.
>
> Thanks
> Joao
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Final PEP-8 fixes

2018-03-08 Thread Dave Page
Final PEP-8 fixes

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=3a6994f719ed89460be00175debcd6af297c4d0e
Author: Joao Pedro De Almeida Pereira 

Modified Files
--
web/config.py  |   8 +-
web/pgAdmin4.py|   8 +-
web/pgadmin/__init__.py|  39 ++--
web/pgadmin/browser/__init__.py|  77 +++
.../server_groups/servers/databases/__init__.py|  73 +++
.../servers/databases/schemas/__init__.py  |  50 +++--
.../databases/schemas/catalog_objects/__init__.py  |  20 +-
.../schemas/catalog_objects/columns/__init__.py|  20 +-
.../databases/schemas/collations/__init__.py   |  53 +++--
.../databases/schemas/collations/tests/__init__.py |   1 -
.../schemas/collations/tests/test_collation_add.py |   4 +-
.../schemas/collations/tests/test_collation_put.py |   5 +-
.../servers/databases/schemas/domains/__init__.py  |  50 +++--
.../schemas/domains/domain_constraints/__init__.py |  27 ++-
.../schemas/domains/tests/test_domain_add.py   |   4 +-
.../databases/schemas/domains/tests/utils.py   |   4 +-
.../databases/schemas/foreign_tables/__init__.py   | 105 ++
.../foreign_tables/tests/test_foreign_table_add.py |  23 +--
.../tests/test_foreign_table_delete.py |   3 +-
.../foreign_tables/tests/test_foreign_table_get.py |   7 +-
.../foreign_tables/tests/test_foreign_table_put.py |   3 +-
.../schemas/foreign_tables/tests/utils.py  |   8 +-
.../schemas/fts_configurations/__init__.py |  59 --
.../schemas/fts_configurations/tests/utils.py  |   4 +-
.../databases/schemas/fts_dictionaries/__init__.py |  49 +++--
.../databases/schemas/fts_parser/__init__.py   |  57 --
.../fts_parser/tests/test_fts_parser_delete.py |   7 +-
.../fts_parser/tests/test_fts_parser_put.py|   7 +-
.../databases/schemas/fts_parser/tests/utils.py|   6 +-
.../databases/schemas/fts_templates/__init__.py|  73 ---
.../fts_templates/tests/test_fts_templates_add.py  |   3 +-
.../fts_templates/tests/test_fts_templates_get.py  |   4 +-
.../databases/schemas/fts_templates/tests/utils.py |   9 +-
.../databases/schemas/functions/__init__.py| 144 +++--
.../functions/tests/test_trigger_func_add.py   |   5 +-
.../functions/tests/test_trigger_func_delete.py|   7 +-
.../functions/tests/test_trigger_func_get.py   |   4 +-
.../functions/tests/test_trigger_func_put.py   |  13 +-
.../databases/schemas/functions/tests/utils.py |  11 +-
.../servers/databases/schemas/packages/__init__.py |  72 ---
.../schemas/packages/edbfuncs/__init__.py  |  22 +-
.../databases/schemas/packages/edbvars/__init__.py |  20 +-
.../schemas/packages/tests/test_package_delete.py  |   2 +-
.../schemas/packages/tests/test_package_get.py |  14 +-
.../schemas/packages/tests/test_package_put.py |   2 +-
.../databases/schemas/packages/tests/utils.py  |   5 +-
.../servers/databases/schemas/synonyms/__init__.py |  28 ++-
.../databases/schemas/synonyms/tests/__init__.py   |   1 -
.../schemas/synonyms/tests/test_synonym_add.py |   4 +-
.../servers/databases/schemas/tables/__init__.py   |   1 -
.../tables/column/tests/test_column_msql.py|  23 ++-
.../databases/schemas/tests/test_schema_delete.py  |   4 +-
.../servers/databases/schemas/tests/test_utils.py  |  12 +-
.../servers/databases/schemas/tests/utils.py   |  24 +--
.../servers/databases/schemas/types/__init__.py| 222 +
.../schemas/types/tests/test_types_delete.py   |   2 +-
.../servers/databases/schemas/utils.py |  99 +
.../servers/databases/schemas/views/__init__.py| 152 +-
.../databases/schemas/views/children/__init__.py   |   8 +-
.../schemas/views/tests/test_views_add.py  |   4 +-
.../schemas/views/tests/test_views_delete.py   |   9 +-
.../schemas/views/tests/test_views_get.py  |   9 +-
.../schemas/views/tests/test_views_put.py  |   9 +-
.../servers/tests/test_check_ssl_connection.py |  13 +-
.../servers/tests/test_dependencies_sql.py |   9 +-
.../servers/tests/test_dependents_sql.py   |   9 +-
.../servers/tests/test_role_dependencies_sql.py|  17 +-
web/pgadmin/browser/tests/test_change_password.py  |  46 +++--
web/pgadmin/browser/tests/test_login.py|  38 ++--
web/pgadmin/browser/tests/test_version_in_range.py |  35 ++--
web/pgadmin/browser/utils.py   |  72 ---
71 files changed, 1205 insertions(+), 836 deletions(-)



pgAdmin 4 commit: Always run PEP-8 checks!

2018-03-08 Thread Dave Page
Always run PEP-8 checks!

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e577859ed24e18fec1481c844cb652d3d5e93c2c

Modified Files
--
Makefile   | 2 +-
ci/run_python_tests.sh | 5 +
2 files changed, 6 insertions(+), 1 deletion(-)



Build failed in Jenkins: pgadmin4-master-python27 #513

2018-03-08 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] More hardening of the query tool tests.

--
[...truncated 643.08 KB...]
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.4:

276 tests passed
1 test failed:
TestPollQueryTool (When query tool polling returns messages 
with result data-set)
15 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing list 
partitioned table,
Create partitions of existing range 
partitioned table,
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.3:

276 tests passed
1 test failed:
TestPollQueryTool (When query tool polling returns messages 
with result data-set)
15 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing list 
partitioned table,
Create partitions of existing range 
partitioned table,
Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table,
Create partitions of existing list 
partitioned table)
ResourceGroupsGetTestCase (Get resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
ResourceGroupsAddTestCase (Add resource groups)
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.2:

269 tests passed
0 

Jenkins build is back to normal : pgadmin4-master-python35 #514

2018-03-08 Thread pgAdmin 4 Jenkins
See 





Re: Build failed in Jenkins: pgadmin4-master-python33 #507

2018-03-08 Thread Dave Page
Thanks, applied.

On Thu, Mar 8, 2018 at 4:26 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Wed, Mar 7, 2018 at 11:13 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find the patch to fix this.
>> I have fixed this issue in the StartRunningQueryTest class, this test
>> class changes the behaviour of the methods through MagicMock and due to
>> this this test case is failing.
>>
>> Revised patch with some modification.
>
>> Thanks,
>> Khushboo
>>
>>
>> On Wed, Mar 7, 2018 at 10:34 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Wed, Mar 7, 2018 at 10:33 PM, Dave Page  wrote:
>>>
 It still seems to be failing :-(

 :(
>>>
 https://jenkins.pgadmin.org/job/pgadmin4-master-python26/las
 tFailedBuild/consoleFull

 On Wed, Mar 7, 2018 at 4:50 PM, Dave Page  wrote:

> Thanks, applied. Lets see what happens.
>
> On Wed, Mar 7, 2018 at 4:37 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Please find the attached updated patch.
>> This should work.
>>
>>
>> On Wed, Mar 7, 2018 at 9:46 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, Mar 7, 2018 at 4:13 PM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Wed, Mar 7, 2018 at 9:23 PM, Dave Page 
 wrote:

> Hi
>
> On Wed, Mar 7, 2018 at 3:10 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Wed, Mar 7, 2018 at 7:34 PM, Dave Page 
>> wrote:
>>
>>> Khushboo, can you look at this ASAP please? It passed tests on
>>> my machine, but Jenkins isn't happy.
>>>
>>> I have tried to reproduce the issue with many combination but
>> couldn't reproduce it.
>> With the help of logs, I have tried to fix it. Can you please
>> check this fix is helpful or not?
>>
>
> On my laptop I now get:
>
> 
> ==
> ERROR: runTest (pgadmin.tools.sqleditor.tests
> .test_poll_query_tool.TestPollQueryTool)
> When query tool polling returns messages with result data-set
> 
> --
> Traceback (most recent call last):
>   File "/Users/dpage/git/pgadmin4/web
> /pgadmin/tools/sqleditor/tests/test_poll_query_tool.py", line
> 104, in runTest
> response_data['data']['additional_messages'])
>   File "/System/Library/Frameworks/Py
> thon.framework/Versions/2.7/lib/python2.7/unittest/case.py", line
> 802, in assertIn
> if member not in container:
> TypeError: argument of type 'NoneType' is not iterable
>
> 
> --
>
> Please provide some more details. Is this failing for particular
 server version?
 I am not getting any error with this patch and without this patch
 on PY2 and PY3 with a single/multiple servers.

>>>
>>> Python 2.7.10 on macOS Sierra, testing against PostgreSQL 9.4. Here
>>> are the package versions in the venv:
>>>
>>> alabaster==0.7.10
>>> alembic==0.9.6
>>> args==0.1.0
>>> Babel==2.3.4
>>> backports.csv==1.0.4
>>> beautifulsoup4==4.4.1
>>> blinker==1.3
>>> chromedriver-installer==0.0.6
>>> click==6.6
>>> clint==0.5.1
>>> dateutils==0.6.6
>>> docutils==0.13.1
>>> extras==1.0.0
>>> fixtures==3.0.0
>>> Flask==0.11.1
>>> Flask-Babel==0.11.1
>>> Flask-Gravatar==0.4.2
>>> Flask-HTMLmin==1.2
>>> Flask-Login==0.3.2
>>> Flask-Mail==0.9.1
>>> Flask-Migrate==2.0.3
>>> Flask-Paranoid==0.1.0
>>> Flask-Principal==0.4.0
>>> Flask-Script==2.0.6
>>> Flask-Security==1.7.5
>>> Flask-SQLAlchemy==2.1
>>> Flask-WTF==0.12
>>> funcsigs==1.0.2
>>> html5lib==1.0b3
>>> htmlmin==0.1.11
>>> imagesize==0.7.1
>>> importlib==1.0.3
>>> itsdangerous==0.24
>>> Jinja2==2.7.3
>>> linecache2==1.0.0
>>> Mako==1.0.7
>>> MarkupSafe==0.23
>>> minify==0.1.4
>>> mock==2.0.0
>>> passlib==1.6.2
>>> pbr==3.1.1
>>> pkginfo==1.4.1
>>> psycopg2==2.7.3.2
>>> pycodestyle==2.3.1
>>> pycrypto==2.6.1
>>> Pygments==2.2.0
>>> pyperclip==1.5.32
>>> pyrsistent==0.14.0
>>> python-dateutil==2.5.0
>>> python-editor==1.0.3
>>> python-mimeparse==1.6.0
>>> pytz==2014.10
>>> requests==2.13.0
>>> requests-toolbelt==0.7.1
>>> selenium==3.3.3
>>> 

pgAdmin 4 commit: More hardening of the query tool tests.

2018-03-08 Thread Dave Page
More hardening of the query tool tests.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f86c313c184aa8851bd3097c9c6a3dd3a0b50eb8
Author: Khushboo Vashi 

Modified Files
--
.../tools/sqleditor/utils/tests/test_start_running_query.py | 13 +
1 file changed, 13 insertions(+)



Re: [pgAdmin4][RM#2989] To fix the issue in Table node

2018-03-08 Thread Murtuza Zabuawala
Hi Dave,

Please find updated patch & updated test case to cover that as well.



--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Wed, Mar 7, 2018 at 9:59 PM, Dave Page  wrote:

> Hi
>
> On Wed, Mar 7, 2018 at 2:59 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA updated patch.
>>
>>
> Using your example on the ticket, I added a "character varying (32)"
> column with NOT NULL to the table. When I then edit the column, and turn
> off NOT NULL (making no other changes), the SQL generated is:
>
> ALTER TABLE public.test_drop
> ALTER COLUMN col2 TYPE character varying (32) COLLATE
> pg_catalog."default";
> ALTER TABLE public.test_drop
> ALTER COLUMN col2 DROP NOT NULL;
>
> I didn't see that when turning off NOT NULL for col1.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


RM_2989_v2.diff
Description: Binary data