Re: [pgAdmin4][RM#3155] Allow user to lock the Layout

2018-04-04 Thread Khushboo Vashi
On Wed, Apr 4, 2018 at 8:09 PM, Dave Page  wrote:

>
>
> On Wed, Apr 4, 2018 at 12:54 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> On Wed, Apr 4, 2018 at 5:00 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, Apr 4, 2018 at 10:45 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 On Wed, Apr 4, 2018 at 2:47 PM, Dave Page  wrote:

>
>
> On Wed, Apr 4, 2018 at 7:20 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Tue, Apr 3, 2018 at 9:03 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 Thanks Joao for reviewing.

 PFA updated patch.

 On Tue, Apr 3, 2018 at 1:11 AM, Joao De Almeida Pereira <
 jdealmeidapere...@pivotal.io> wrote:

> Hello,
>
> On Mon, Apr 2, 2018 at 10:07 AM Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>>
>> ​Hello,
>>
>> Please find updated patch,
>>
>> Now layout will be locked after user updates its preferences, w
>> e have used ​
>> templated variable in the javascript file
>> ​ because we do not have preference module or preference cache
>> available when the page loads and panels gets rendered,
>> ​I
>> ​ also
>> made changes in JS tests as per Joao's review comments.
>>
> Looks like everything is working when we change the lock.
> As a personal preferences I would prefer to see this in at least 2
> commits, one that is related to the preference issue and another one 
> that
> is related to this story.
>
>
> All the tests are working, but he linter is failing:
>
> /tmp/build/4a5630c2/pivotal-rm-3155/web /tmp/build/4a5630c2
>  
> 
> ./pgadmin/misc/__init__.py:78: [E303] too many blank lines (2)
>  
> 
> 1   E303 too many blank lines (2)
>  
> 
>
> 1
>
 ​Fixed​


>
>
>> @Dave/Pivotal team,
>> The given patch is working fine for all the Tabs/Panels (all the
>> panels from main window as well as from Query tool and Debugger) but 
>> I'm
>> facing an issue while handling the Browser tree section, It is a 
>> wcDocer
>> frame  and
>> not a wcDocker panel
>> . Like
>> wcDocker panel, wcDocker frame do not provide any API so that a 
>> developer
>> can prevent drag-drop functionality on it.
>>
>
>>> It's not working fine for me. For example, if I put the SQL Panel on
>>> it's own below the properties/stats panels (so it looks like pgAdmin 3 
>>> used
>>> to by default), and then lock the layout, I can un-dock the SQL panel 
>>> into
>>> a dialogue, but then cannot re-dock it. I can do weird things with the
>>> browser tree as well, probably because it's a frame as you say.
>>>
>>
>> ​That is expected behaviour ​because once you drag the panel out of
>> the group of Panels then it becomes individual Frame, That is what the
>> author of the wcDocker replied on my question,
>> *"A panel must either be initialized as movable or non-movable from
>> the beginning and never changed because it generates a different
>> arrangement of elements depending. This feature should only ever be used
>> within the onCreate method of the panel. I should probably have been more
>> clear about this limitation in the documentation."*
>>
>>
> So does it become a panel again if a second panel is added to the new
> tab group?
>
 ​No, it stays Frame.​

 As far as I understand Panel needs a Frame to render itself if it is
 not attached to the main docker instance.​

>
> There must be some way we can lock a tab that's not part of a group.
>
 At a moment there is no way of ​
 locking frames out of the box :(
 ​

>>>
>>> Hmm, so the question becomes: do we include the lock feature, but 

Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree

2018-04-04 Thread Khushboo Vashi
On Wed, Apr 4, 2018 at 9:47 PM, Dave Page  wrote:

> Khushboo, Murtuza,
>
> Can you spend some time reviewing this please? I've started playing with
> it as well - the first thing that's irking me somewhat is the lack of
> comments. Descriptive function names are all well and good, but sometimes a
> little more is needed, especially for less experienced developers or
> newcomers to the application!
>
> Sure, already in our list.

> On Mon, Apr 2, 2018 at 7:45 PM, Joao De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hi Hackers,
>>
>> Attached you can find the patch that will start to decouple pgAdmin from
>> ACITree library.
>> This patch is intended to be merged after 3.0, because we do not want to
>> cause any entropy or delay the release, but we want to start the discussion
>> and show some code.
>>
>> This job that we started is a massive tech debt chore that will take some
>> time to finalize and we would love the help of the community to do it.
>>
>> *Summary of the patch:*
>> 0001 patch:
>>  - Creates a new tree that will allow us to create a separation between
>> the application and ACI Tree
>>  - Creates a Fake Tree (Test double, for reference on the available test
>> doubles: https://martinfowler.com/bliki/TestDouble.html) that can be
>> used to inplace to replace the ACITree and also encapsulate the new tree
>> behavior on our tests
>>  - Adds tests for all the tree functionalities
>>
>> 0002 patch:
>>  - Extracts, refactors, adds tests and remove dependency from ACI Tree on:
>> - getTreeNodeHierarchy
>> - on backup.js: menu_enabled, menu_enabled_server,
>> start_backup_global_server, backup_objects
>> - on datagrid.js: show_data_grid, get_panel_title, show_query_tool
>> - Start using sprintf-js as Underscore.String is deprecating sprintf
>> function
>>
>> This patch represents only 10 calls to ACITree.itemData out of 176 that
>> are spread around our code
>>
>>
>> *In Depth look on the process behind the patch:*
>>
>> We started writing this patch with the idea that we need to decouple
>> pgAdmin4 from ACITree, because ACITree is no longer supported, the
>> documentation is non existent and ACITree is no longer being actively
>> developed.
>>
>> Our process:
>> 1. We "randomly" selected a function that is part of the ACITree. From
>> this point we decided to replace that function with our own version. The
>> function that we choose was "itemData".
>> The function gives us all the "data" that a specific node of the tree
>> find.
>> Given in order to replace the tree we would need to have a function that
>> would give us the same information. We had 2 options:
>>   a) Create a tree with a function called itemData
>> Pros:
>>  - At first view this was the simpler solution
>>  - Would keep the status quo
>> Cons:
>>  - Not a OOP approach
>>  - Not very flexible
>>   b) Create a tree that would return a node given an ID and then the node
>> would be responsible for giving it's data.
>> Pros:
>>  - OOP Approach
>>  - More flexible and we do not need to bring the tree around, just a node
>> Cons:
>>  - Break the current status quo
>>
>> Given these 2 options we decided to go for a more OOP approach creating a
>> Tree and a TreeNode classes, that in the future will be renamed to
>> ACITreeWrapper and TreeNode.
>>
>> 2. After we decided on the starting point we searched for occurrences of
>> the function "itemData" and we found out that there were 303 occurrences of
>> "itemData" in the code and roughly 176 calls to the function itself (some
>> of the hits were variable names).
>>
>> 3. We selected the first file on the search and found the function that
>> was responsible for calling the itemData function.
>>
>> 4. Extracted the function to a separate file
>>
>> 5. Wrap this function with tests
>>
>> 6. Refactor the function to ES6, give more declarative names to variables
>> and break the functions into smaller chunks
>>
>> 7. When all the tests were passing we replaced ACITree with our Tree
>>
>> 8. We ensured that all tests were passing
>>
>> 9. Remove function from the original file and use the new function
>>
>> 10. Ensure everything still works
>>
>> 11. Find the next function and execute from step 4 until all the
>> functions are replaced, refactored and tested.
>>
>> As you can see by the process this is a pretty huge undertake, because of
>> the number of calls to the function. This is just the first step on the
>> direction of completely isolating the ACITree so that we can solve the
>> problem with a large number of elements on the tree.
>>
>> *What is on our radar that we need to address:*
>>  - Finish the complete decoupling of the ACITree
>>  - Performance of the current tree implementation
>>  - Tweak the naming of the Tree class to explicitly tell us this is to
>> use only with ACITree.
>>
>>
>> Thanks
>> Joao
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The 

[pgAdmin4]: Fix for RM #3248

2018-04-04 Thread Neel Patel
Hi,

Please find attached patch for the fix of RM #3248 - we have modified
alertify confirm dialog to modal dialog.

Do review it and let me know for comments.

Thanks,
Neel Patel


RM_3248.patch
Description: Binary data


pgAdmin 4 commit: Fix requirements for Python 2.6.

2018-04-04 Thread Dave Page
Fix requirements for Python 2.6.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=b7c86da58605a7e9f474b1a9f4508d9bfc0bdff6
Author: Murtuza Zabuawala 

Modified Files
--
pkg/pip/setup_pip.py| 12 +---
requirements.txt| 35 +--
web/regression/requirements.txt | 16 ++--
3 files changed, 48 insertions(+), 15 deletions(-)



Re: [pgAdmin4][Patch] Remake Docker container packaging

2018-04-04 Thread Максим Кольцов
2018-04-04 13:55 GMT+03:00 Dave Page :
> Hi
>
> On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов  wrote:
>>
>> I've updated patch. Now I drop tests and regressions.
>>
>> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for
>> http and 8443 for https mode.
>>
>> Please review.
>
>
> I'm seeing the following error when building. It looks like it's caused by
> the new requirement on pycryptodome:

Is this new requirement merged in master? I will rebase my patch.

In future, when chaning C-extensions in requirements.txt, it's needed
to update Dockerfile, line 43:
pip install --no-cache-dir psycopg2 pycrypto && \

I install build deps, build C-extensions and remove build deps in one
RUN step in order to avoid having layer with build deps in image
stack.
In fact, I can merge this with installation from requirements.txt.
There were some reasons I made it this way in the first place, but
it's not so relevant now.

Will post patch later.

>   Running setup.py install for pycryptodome: started
> Running setup.py install for pycryptodome: finished with status 'error'
> Complete output from command /usr/local/bin/python -u -c "import
> setuptools,
> tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> /tmp/pip-4wlgoy0e-record/install-record.txt
> --single-version-externally-managed --compile:
> Testing support for x86intrin.h header
> Target does not support x86intrin.h header
> running install
> running build
> running build_py
> creating build/lib.linux-x86_64-3.6
> creating build/lib.linux-x86_64-3.6/Crypto
> copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto
> creating build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/PKCS1_v1_5.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_ofb.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/ARC2.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/CAST.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_openpgp.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/ChaCha20.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_ccm.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_cbc.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_gcm.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/__init__.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/Salsa20.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/Blowfish.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/DES3.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_ctr.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/ARC4.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/PKCS1_OAEP.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_siv.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/AES.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_eax.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_ecb.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_ocb.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/DES.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> copying lib/Crypto/Cipher/_mode_cfb.py ->
> build/lib.linux-x86_64-3.6/Crypto/Cipher
> creating build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/SHA256.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/SHAKE256.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/SHA384.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/SHA224.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/__init__.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/SHAKE128.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/HMAC.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/keccak.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/MD2.py -> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/CMAC.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/SHA3_384.py ->
> build/lib.linux-x86_64-3.6/Crypto/Hash
> copying lib/Crypto/Hash/SHA3_256.py 

Re: [pgAdmin4][RM#3155] Allow user to lock the Layout

2018-04-04 Thread Dave Page
On Wed, Apr 4, 2018 at 10:45 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> On Wed, Apr 4, 2018 at 2:47 PM, Dave Page  wrote:
>
>>
>>
>> On Wed, Apr 4, 2018 at 7:20 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Tue, Apr 3, 2018 at 9:03 PM, Dave Page  wrote:
>>>
 Hi

 On Tue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Thanks Joao for reviewing.
>
> PFA updated patch.
>
> On Tue, Apr 3, 2018 at 1:11 AM, Joao De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hello,
>>
>> On Mon, Apr 2, 2018 at 10:07 AM Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>>
>>> ​Hello,
>>>
>>> Please find updated patch,
>>>
>>> Now layout will be locked after user updates its preferences, w
>>> e have used ​
>>> templated variable in the javascript file
>>> ​ because we do not have preference module or preference cache
>>> available when the page loads and panels gets rendered,
>>> ​I
>>> ​ also
>>> made changes in JS tests as per Joao's review comments.
>>>
>> Looks like everything is working when we change the lock.
>> As a personal preferences I would prefer to see this in at least 2
>> commits, one that is related to the preference issue and another one that
>> is related to this story.
>>
>>
>> All the tests are working, but he linter is failing:
>>
>> /tmp/build/4a5630c2/pivotal-rm-3155/web /tmp/build/4a5630c2
>>  
>> 
>> ./pgadmin/misc/__init__.py:78: [E303] too many blank lines (2)
>>  
>> 
>> 1   E303 too many blank lines (2)
>>  
>> 
>>
>> 1
>>
> ​Fixed​
>
>
>>
>>
>>> @Dave/Pivotal team,
>>> The given patch is working fine for all the Tabs/Panels (all the
>>> panels from main window as well as from Query tool and Debugger) but I'm
>>> facing an issue while handling the Browser tree section, It is a wcDocer
>>> frame  and not
>>> a wcDocker panel
>>> . Like wcDocker
>>> panel, wcDocker frame do not provide any API so that a developer can
>>> prevent drag-drop functionality on it.
>>>
>>
 It's not working fine for me. For example, if I put the SQL Panel on
 it's own below the properties/stats panels (so it looks like pgAdmin 3 used
 to by default), and then lock the layout, I can un-dock the SQL panel into
 a dialogue, but then cannot re-dock it. I can do weird things with the
 browser tree as well, probably because it's a frame as you say.

>>>
>>> ​That is expected behaviour ​because once you drag the panel out of the
>>> group of Panels then it becomes individual Frame, That is what the author
>>> of the wcDocker replied on my question,
>>> *"A panel must either be initialized as movable or non-movable from the
>>> beginning and never changed because it generates a different arrangement of
>>> elements depending. This feature should only ever be used within the
>>> onCreate method of the panel. I should probably have been more clear about
>>> this limitation in the documentation."*
>>>
>>>
>> So does it become a panel again if a second panel is added to the new tab
>> group?
>>
> ​No, it stays Frame.​
>
> As far as I understand Panel needs a Frame to render itself if it is not
> attached to the main docker instance.​
>
>>
>> There must be some way we can lock a tab that's not part of a group.
>>
> At a moment there is no way of ​
> locking frames out of the box :(
> ​
>

Hmm, so the question becomes: do we include the lock feature, but rename it
to "Lock Tabs" or something similar, or leave it out altogether? It clearly
doesn't do everything we want right now.

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

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


Re: [pgAdmin4][Patch] Remake Docker container packaging

2018-04-04 Thread Максим Кольцов
2018-04-04 14:16 GMT+03:00 Максим Кольцов :
> 2018-04-04 13:55 GMT+03:00 Dave Page :
>> Hi
>>
>> On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов  wrote:
>>>
>>> I've updated patch. Now I drop tests and regressions.
>>>
>>> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for
>>> http and 8443 for https mode.
>>>
>>> Please review.
>>
>>
>> I'm seeing the following error when building. It looks like it's caused by
>> the new requirement on pycryptodome:
>
> Is this new requirement merged in master? I will rebase my patch.
>
> In future, when chaning C-extensions in requirements.txt, it's needed
> to update Dockerfile, line 43:
> pip install --no-cache-dir psycopg2 pycrypto && \
>
> I install build deps, build C-extensions and remove build deps in one
> RUN step in order to avoid having layer with build deps in image
> stack.
> In fact, I can merge this with installation from requirements.txt.
> There were some reasons I made it this way in the first place, but
> it's not so relevant now.
>
> Will post patch later.

Also, please note line 26 in Dockerfile:

RUN pip install --no-cache-dir \
sphinx flask_babel flask_security flask_paranoid python-dateutil
flask_sqlalchemy \
flask_gravatar simplejson

Here I install packages that are imported during documentation build,
to avoid installing whole load of heavy packages and C-extensions in
docs-only intermediate container.
So, when these deps are changed, Dockerfile should be updated as well.

>>   Running setup.py install for pycryptodome: started
>> Running setup.py install for pycryptodome: finished with status 'error'
>> Complete output from command /usr/local/bin/python -u -c "import
>> setuptools,
>> tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize,
>> 'open', open)(__file__);code=f.read().replace('\r\n',
>> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
>> /tmp/pip-4wlgoy0e-record/install-record.txt
>> --single-version-externally-managed --compile:
>> Testing support for x86intrin.h header
>> Target does not support x86intrin.h header
>> running install
>> running build
>> running build_py
>> creating build/lib.linux-x86_64-3.6
>> creating build/lib.linux-x86_64-3.6/Crypto
>> copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto
>> creating build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/PKCS1_v1_5.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_ofb.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/ARC2.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/CAST.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_openpgp.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/ChaCha20.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_ccm.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_cbc.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_gcm.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/__init__.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/Salsa20.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/Blowfish.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/DES3.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_ctr.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/ARC4.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/PKCS1_OAEP.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_siv.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/AES.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_eax.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_ecb.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_ocb.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/DES.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> copying lib/Crypto/Cipher/_mode_cfb.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Cipher
>> creating build/lib.linux-x86_64-3.6/Crypto/Hash
>> copying lib/Crypto/Hash/SHA256.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Hash
>> copying lib/Crypto/Hash/SHAKE256.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Hash
>> copying lib/Crypto/Hash/SHA384.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Hash
>> copying lib/Crypto/Hash/SHA224.py ->
>> build/lib.linux-x86_64-3.6/Crypto/Hash
>> 

Re: [pgAdmin4][Patch] Remake Docker container packaging

2018-04-04 Thread Dave Page
On Wed, Apr 4, 2018 at 12:16 PM, Максим Кольцов  wrote:

> 2018-04-04 13:55 GMT+03:00 Dave Page :
> > Hi
> >
> > On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов 
> wrote:
> >>
> >> I've updated patch. Now I drop tests and regressions.
> >>
> >> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for
> >> http and 8443 for https mode.
> >>
> >> Please review.
> >
> >
> > I'm seeing the following error when building. It looks like it's caused
> by
> > the new requirement on pycryptodome:
>
> Is this new requirement merged in master? I will rebase my patch.
>

Yes it is.


>
> In future, when chaning C-extensions in requirements.txt, it's needed
> to update Dockerfile, line 43:
> pip install --no-cache-dir psycopg2 pycrypto && \
>

Ah, OK.


>
> I install build deps, build C-extensions and remove build deps in one
> RUN step in order to avoid having layer with build deps in image
> stack.
>

Makes sense.


> In fact, I can merge this with installation from requirements.txt.
> There were some reasons I made it this way in the first place, but
> it's not so relevant now.
>
> Will post patch later.
>

Thanks!


>
> >   Running setup.py install for pycryptodome: started
> > Running setup.py install for pycryptodome: finished with status
> 'error'
> > Complete output from command /usr/local/bin/python -u -c "import
> > setuptools,
> > tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/
> setup.py';f=getattr(tokenize,
> > 'open', open)(__file__);code=f.read().replace('\r\n',
> > '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> > /tmp/pip-4wlgoy0e-record/install-record.txt
> > --single-version-externally-managed --compile:
> > Testing support for x86intrin.h header
> > Target does not support x86intrin.h header
> > running install
> > running build
> > running build_py
> > creating build/lib.linux-x86_64-3.6
> > creating build/lib.linux-x86_64-3.6/Crypto
> > copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto
> > creating build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/PKCS1_v1_5.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_ofb.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/ARC2.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/CAST.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_openpgp.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/ChaCha20.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_ccm.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_cbc.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_gcm.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/__init__.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/Salsa20.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/Blowfish.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/DES3.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_ctr.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/ARC4.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/PKCS1_OAEP.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_siv.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/AES.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_eax.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_ecb.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_ocb.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/DES.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > copying lib/Crypto/Cipher/_mode_cfb.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Cipher
> > creating build/lib.linux-x86_64-3.6/Crypto/Hash
> > copying lib/Crypto/Hash/SHA256.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Hash
> > copying lib/Crypto/Hash/SHAKE256.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Hash
> > copying lib/Crypto/Hash/SHA384.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Hash
> > copying lib/Crypto/Hash/SHA224.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Hash
> > copying lib/Crypto/Hash/__init__.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Hash
> > copying lib/Crypto/Hash/SHAKE128.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Hash
> > copying lib/Crypto/Hash/HMAC.py ->
> > build/lib.linux-x86_64-3.6/Crypto/Hash
> > 

Re: [pgAdmin4][RM#3235] Code refactoring in Query tool

2018-04-04 Thread Dave Page
Thanks, applied.

On Wed, Apr 4, 2018 at 9:43 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Thank you Victoria & Joao for reviewing.
> PFA updated patch.
>
> On Wed, Apr 4, 2018 at 12:26 AM, Joao De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hi Murtuza
>>
>> It is really good to see other patches that are just refactoring code.
>>
>> We have some suggestions:
>> - We are trying to use === instead of == because === ensure that the type
>> is also checked (https://developer.mozilla.org
>> /en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness)
>>
> ​Done​
>
>
> - Now that we are refactoring some code, maybe we should keep some
>> consistency on the way we name functions and variables.
>>
> We should use camelCase for names instead of snake_case. In general, if
>> you see a function or variable name that doesn't fit the desired syntax or
>> if a block of code seems confusing, it is better to refactor it.
>>
> Done​, I have also changed other variables.​
> BTW I'm using camelCase convention from last few patches :)
>
> - By the name of the function is_new_transaction_required, it describes
>> what the function represents but doesn't seem to explain the full scope of
>> the function. What do you think about the name: httpResponseRequiresNewT
>> ransaction
>>
> ​Done​
>
>
> - The extraction doesn't look like it matches the code removed
>>
>
>> -if (pgAdmin.Browser.UserManagement.is_pga_login_required(e))
>> {
>> -  self.save_state('_explain_timing', []);
>> -  return pgAdmin.Browser.UserManagement.pga_login();
>> -}
>> -
>> -if(transaction.is_new_transaction_required(e)) {
>> -  self.save_state('_explain_timing', []);
>> -  return self.init_transaction();
>> -}
>> -
>> -alertify.alert(gettext('Explain options error'),
>> -  gettext('Error occurred while setting timing option in
>> explain.')
>> +let msg = httpErrorHandler.handleQueryToolAjaxError(
>> +  pgAdmin, self, e, '_explain_timing', null, true
>>  );
>> +alertify.alert(gettext('Explain options error'), msg);
>> In this case we are only saving state if the following conditions are
>> true:
>> isNotConnectedToThePythonServer and httpResponseJSONIsPresent and
>> connectionLostToPostgresDatabase and shouldSaveState
>> That is not the case on the removed code.
>>
> ​I think the *null* value got your attention b
> ut actually I have a check in ​*handleQueryToolAjaxError *which will make
> it array [] with respect to arguments for the state to save, Anyways I have
> also changed it to pass [] instead of null for better clarity.
> We have all those checks in our function so it check for those condition
> and save the state only if those returns True.
>
> - The functions extracted when are called do not use all the parameters.
>> This tells us that the function groups too much functionality that is not
>> used in same cases. Maybe we should split this function into smaller
>> functions that do each part.
>>
> ​We already had split up the function in two part.
> ​
>
>>
>>
>> Thanks
>> Victoria & Joao
>>
>> On Tue, Apr 3, 2018 at 11:38 AM Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> PFA updated patch, I've renamed it to query_tool_http_error_handler.js
>>> & query_tool_http_error_handler_spec.js respectively.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> On Tue, Apr 3, 2018 at 7:43 PM, Dave Page  wrote:
>>>
 HI

 On Tue, Apr 3, 2018 at 12:27 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to extract the common code from query tool to handle ajax
> errors & connection handling, Also added unit tests around extracted code.
>

 Looks good to me, except, I wonder if we should rename
 is_new_transaction_required.js/is_new_transaction_required_spec.js to
 something a little more generic; maybe conn_tx_handler_funcs.js? Not sure I
 like that though.


 --
 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]: Fix for RM #3248

2018-04-04 Thread Murtuza Zabuawala
Hi Neel,

Can we make the change in wrapper instead of changing every where?
File: ../web/pgadmin/static/js/alertify.pgadmin.defaults.js


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


On Thu, Apr 5, 2018 at 11:04 AM, Neel Patel 
wrote:

> Hi,
>
> Please find attached patch for the fix of RM #3248 - we have modified
> alertify confirm dialog to modal dialog.
>
> Do review it and let me know for comments.
>
> Thanks,
> Neel Patel
>


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

2018-04-04 Thread pgAdmin 4 Jenkins
See 





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

2018-04-04 Thread pgAdmin 4 Jenkins
See 





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

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Fix requirements for Python 2.6.

[Dave Page] SQLAlchemy stopped supporting Python 2.6.

--
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision c0cfc9f29b1e8ac1099a135ff7acf327576691fd (origin/master)
Commit message: "SQLAlchemy stopped supporting Python 2.6."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f c0cfc9f29b1e8ac1099a135ff7acf327576691fd
 > git rev-list a705fb46a8df9d4db072894d8214a568c38a341a # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.7

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python27] $ /bin/sh -xe /tmp/jenkins8279574611404352817.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 2.7 virtual environment...

New python executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-2.7/bin/python
Invalid requirement: 'SQLAlchemy>=1.2.5   python_version >= '2.7''
Traceback (most recent call last):
  File 
"
 line 82, in __init__
req = Requirement(req)
  File 
"
 line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "u'python_v'"

ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



pgAdmin 4 commit: SQLAlchemy stopped supporting Python 2.6.

2018-04-04 Thread Dave Page
SQLAlchemy stopped supporting Python 2.6.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c0cfc9f29b1e8ac1099a135ff7acf327576691fd
Author: Murtuza Zabuawala 

Modified Files
--
pkg/pip/setup_pip.py | 6 --
requirements.txt | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)



pgAdmin 4 commit: Another attempt to fix the Python 2.6 deps.

2018-04-04 Thread Dave Page
Another attempt to fix the Python 2.6 deps.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a95775ae49e47fe1f289c514bb936a726010033c
Author: Murtuza Zabuawala 

Modified Files
--
pkg/pip/setup_pip.py | 10 +++---
requirements.txt |  4 
2 files changed, 11 insertions(+), 3 deletions(-)



Re: [pgAdmin4][Patch] Remake Docker container packaging

2018-04-04 Thread Максим Кольцов
2018-04-04 14:18 GMT+03:00 Dave Page :
>
>
> On Wed, Apr 4, 2018 at 12:16 PM, Максим Кольцов  wrote:
>>
>> 2018-04-04 13:55 GMT+03:00 Dave Page :
>> > Hi
>> >
>> > On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов 
>> > wrote:
>> >>
>> >> I've updated patch. Now I drop tests and regressions.
>> >>
>> >> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for
>> >> http and 8443 for https mode.
>> >>
>> >> Please review.
>> >
>> >
>> > I'm seeing the following error when building. It looks like it's caused
>> > by
>> > the new requirement on pycryptodome:
>>
>> Is this new requirement merged in master? I will rebase my patch.
>
>
> Yes it is.
>
>>
>>
>> In future, when chaning C-extensions in requirements.txt, it's needed
>> to update Dockerfile, line 43:
>> pip install --no-cache-dir psycopg2 pycrypto && \
>
>
> Ah, OK.
>
>>
>>
>> I install build deps, build C-extensions and remove build deps in one
>> RUN step in order to avoid having layer with build deps in image
>> stack.
>
>
> Makes sense.
>
>>
>> In fact, I can merge this with installation from requirements.txt.
>> There were some reasons I made it this way in the first place, but
>> it's not so relevant now.
>>
>> Will post patch later.
>
>
> Thanks!

So, I've fixed it. Patch attached. Now whole requirements.txt is
installed in one step, with no left-overs and incompabilities.

>>
>>
>> >   Running setup.py install for pycryptodome: started
>> > Running setup.py install for pycryptodome: finished with status
>> > 'error'
>> > Complete output from command /usr/local/bin/python -u -c "import
>> > setuptools,
>> >
>> > tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize,
>> > 'open', open)(__file__);code=f.read().replace('\r\n',
>> > '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
>> > /tmp/pip-4wlgoy0e-record/install-record.txt
>> > --single-version-externally-managed --compile:
>> > Testing support for x86intrin.h header
>> > Target does not support x86intrin.h header
>> > running install
>> > running build
>> > running build_py
>> > creating build/lib.linux-x86_64-3.6
>> > creating build/lib.linux-x86_64-3.6/Crypto
>> > copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto
>> > creating build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/PKCS1_v1_5.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_ofb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/ARC2.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/CAST.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_openpgp.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/ChaCha20.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_ccm.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_cbc.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_gcm.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/Salsa20.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/Blowfish.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/DES3.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_ctr.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/ARC4.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/PKCS1_OAEP.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_siv.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/AES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_eax.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_ecb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_ocb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/DES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > copying lib/Crypto/Cipher/_mode_cfb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> > creating build/lib.linux-x86_64-3.6/Crypto/Hash
>> > copying lib/Crypto/Hash/SHA256.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> > copying lib/Crypto/Hash/SHAKE256.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> > copying lib/Crypto/Hash/SHA384.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> > copying 

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

2018-04-04 Thread pgAdmin 4 Jenkins
See 





Build failed in Jenkins: pgadmin4-master-python36 #550

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] SQLAlchemy stopped supporting Python 2.6.

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision c0cfc9f29b1e8ac1099a135ff7acf327576691fd (origin/master)
Commit message: "SQLAlchemy stopped supporting Python 2.6."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f c0cfc9f29b1e8ac1099a135ff7acf327576691fd
 > git rev-list b7c86da58605a7e9f474b1a9f4508d9bfc0bdff6 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.6

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python36] $ /bin/sh -xe /tmp/jenkins2979595470934247250.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.6 virtual environment...

Using base prefix '/usr/local/python-3.6'
New python executable in 

Also creating executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-3.6/bin/python3
Invalid requirement: 'SQLAlchemy>=1.2.5   python_version >= '2.7''
Traceback (most recent call last):
  File 
"
 line 92, in __init__
req = REQUIREMENT.parseString(requirement_string)
  File 
"
 line 1617, in parseString
raise exc
  File 
"
 line 1607, in parseString
loc, tokens = self._parse( instring, 0 )
  File 
"
 line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3376, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
  File 
"
 line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3164, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 32), (line:1, 
col:33)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"
 line 82, in __init__
req = Requirement(req)
  File 
"
 line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, 
parse error at "'python_v'"

ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



Re: pgAdmin 4 commit: Fix requirements for Python 2.6.

2018-04-04 Thread Dave Page
Already on it. Unfortunately this is being fine-tuned through the test
infrastructure, as my Python 2.6 installation is exhibiting some weird
behaviour.

On Wed, Apr 4, 2018 at 2:15 PM, Neel Patel 
wrote:

> Hi,
>
> Do we really require "*Flask-Security" *package to mentioned multiple
> times for different python version. If not, we should remove it from one
> place.
>
> I am getting below error while running "pip install -r requirements.txt".
>
> *Double requirement given: Flask-Security>=3.0.0 (from -r
> ../../requirements.txt (line 40)) (already in Flask-Security==3.0.0 (from
> -r ../../requirements.txt (line 15)), name='Flask-Security')*
>
> Thanks,
> Neel Patel
>
> On Wed, Apr 4, 2018 at 4:56 PM, Dave Page  wrote:
>
>> Fix requirements for Python 2.6.
>>
>> Branch
>> --
>> master
>>
>> Details
>> ---
>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
>> f;h=b7c86da58605a7e9f474b1a9f4508d9bfc0bdff6
>> Author: Murtuza Zabuawala 
>>
>> Modified Files
>> --
>> pkg/pip/setup_pip.py| 12 +---
>> requirements.txt| 35 +--
>> web/regression/requirements.txt | 16 ++--
>> 3 files changed, 48 insertions(+), 15 deletions(-)
>>
>>
>


-- 
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-python33 #559

2018-04-04 Thread pgAdmin 4 Jenkins
See 





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

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Typo fix.

--
[...truncated 4.98 KB...]
Collecting Flask==0.12.2 (from -r requirements.txt (line 9))
  Using cached Flask-0.12.2-py2.py3-none-any.whl
Collecting Flask-Gravatar==0.5.0 (from -r requirements.txt (line 10))
  Using cached Flask_Gravatar-0.5.0-py2.py3-none-any.whl
Collecting Flask-Login==0.3.2 (from -r requirements.txt (line 11))
Collecting Flask-Mail==0.9.1 (from -r requirements.txt (line 12))
Collecting Flask-Migrate==2.1.1 (from -r requirements.txt (line 13))
  Using cached Flask_Migrate-2.1.1-py2.py3-none-any.whl
Collecting Flask-Principal==0.4.0 (from -r requirements.txt (line 14))
Collecting Flask-Security==3.0.0 (from -r requirements.txt (line 15))
  Using cached Flask_Security-3.0.0-py2.py3-none-any.whl
Collecting Flask-SQLAlchemy==2.3.2 (from -r requirements.txt (line 16))
  Using cached Flask_SQLAlchemy-2.3.2-py2.py3-none-any.whl
Collecting Flask-WTF==0.14.2 (from -r requirements.txt (line 17))
  Using cached Flask_WTF-0.14.2-py2.py3-none-any.whl
Collecting html5lib==1.0.1 (from -r requirements.txt (line 18))
  Using cached html5lib-1.0.1-py2.py3-none-any.whl
Collecting linecache2==1.0.0 (from -r requirements.txt (line 19))
  Using cached linecache2-1.0.0-py2.py3-none-any.whl
Collecting passlib==1.7.1 (from -r requirements.txt (line 20))
  Using cached passlib-1.7.1-py2.py3-none-any.whl
Collecting pbr==3.1.1 (from -r requirements.txt (line 21))
  Using cached pbr-3.1.1-py2.py3-none-any.whl
Collecting pyrsistent==0.14.2 (from -r requirements.txt (line 22))
  Using cached pyrsistent-0.14.2.tar.gz
Collecting python-mimeparse==1.6.0 (from -r requirements.txt (line 23))
  Using cached python_mimeparse-1.6.0-py2.py3-none-any.whl
Collecting pytz==2018.3 (from -r requirements.txt (line 24))
  Using cached pytz-2018.3-py2.py3-none-any.whl
Collecting simplejson==3.13.2 (from -r requirements.txt (line 25))
  Using cached simplejson-3.13.2.tar.gz
Collecting six>=1.11.0 (from -r requirements.txt (line 26))
  Using cached six-1.11.0-py2.py3-none-any.whl
Collecting speaklater==1.3 (from -r requirements.txt (line 27))
Collecting sqlparse==0.2.4 (from -r requirements.txt (line 28))
  Using cached sqlparse-0.2.4-py2.py3-none-any.whl
Collecting WTForms==2.1 (from -r requirements.txt (line 29))
Collecting Flask-Paranoid==0.2.0 (from -r requirements.txt (line 30))
  Using cached Flask_Paranoid-0.2.0-py2.py3-none-any.whl
Collecting backports.csv==1.0.5 (from -r requirements.txt (line 44))
  Using cached backports.csv-1.0.5-py2.py3-none-any.whl
Collecting importlib==1.0.3 (from -r requirements.txt (line 45))
Collecting psycopg2==2.7.3.2 (from -r requirements.txt (line 50))
  Using cached psycopg2-2.7.3.2-cp26-cp26m-manylinux1_x86_64.whl
Collecting pycrypto==2.6.1 (from -r requirements.txt (line 51))
Collecting Flask-Script==2.0.5 (from -r requirements.txt (line 52))
Collecting ordereddict (from -r requirements.txt (line 53))
Collecting python-dateutil==2.5.0 (from -r requirements.txt (line 54))
  Using cached python_dateutil-2.5.0-py2.py3-none-any.whl
Collecting SQLAlchemy==1.0.14 (from -r requirements.txt (line 55))
Collecting testtools>=0.9.22 (from fixtures==3.0.0->-r requirements.txt (line 
8))
  Using cached testtools-2.3.0-py2.py3-none-any.whl
Collecting click>=2.0 (from Flask==0.12.2->-r requirements.txt (line 9))
  Using cached click-6.7-py2.py3-none-any.whl
Collecting Jinja2>=2.4 (from Flask==0.12.2->-r requirements.txt (line 9))
  Using cached Jinja2-2.10-py2.py3-none-any.whl
Collecting Werkzeug>=0.7 (from Flask==0.12.2->-r requirements.txt (line 9))
  Using cached Werkzeug-0.14.1-py2.py3-none-any.whl
Collecting itsdangerous>=0.21 (from Flask==0.12.2->-r requirements.txt (line 9))
Collecting alembic>=0.6 (from Flask-Migrate==2.1.1->-r requirements.txt (line 
13))
Collecting Flask-BabelEx>=0.9.3 (from Flask-Security==3.0.0->-r 
requirements.txt (line 15))
  Using cached Flask-BabelEx-0.9.3.tar.gz
Collecting webencodings (from html5lib==1.0.1->-r requirements.txt (line 18))
  Using cached webencodings-0.5.1-py2.py3-none-any.whl
Collecting unittest2>=1.0.0 (from testtools>=0.9.22->fixtures==3.0.0->-r 
requirements.txt (line 8))
  Using cached unittest2-1.1.0-py2.py3-none-any.whl
Collecting traceback2 (from testtools>=0.9.22->fixtures==3.0.0->-r 
requirements.txt (line 8))
  Using cached traceback2-1.4.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->Flask==0.12.2->-r 
requirements.txt (line 9))
  Using cached MarkupSafe-1.0.tar.gz
Collecting Mako (from alembic>=0.6->Flask-Migrate==2.1.1->-r requirements.txt 
(line 13))
Collecting python-editor>=0.3 (from alembic>=0.6->Flask-Migrate==2.1.1->-r 
requirements.txt (line 13))
Collecting Babel>=1.0 (from Flask-BabelEx>=0.9.3->Flask-Security==3.0.0->-r 
requirements.txt (line 15))
  Using cached Babel-2.5.3-py2.py3-none-any.whl
Requirement already satisfied: argparse in 

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

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] SQLAlchemy stopped supporting Python 2.6.

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision c0cfc9f29b1e8ac1099a135ff7acf327576691fd (origin/master)
Commit message: "SQLAlchemy stopped supporting Python 2.6."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f c0cfc9f29b1e8ac1099a135ff7acf327576691fd
 > git rev-list b7c86da58605a7e9f474b1a9f4508d9bfc0bdff6 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.6

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python26] $ /bin/sh -xe /tmp/jenkins7938805908765504068.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 2.6 virtual environment...

New python executable in 

Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/local/python-2.6/bin/python
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting wheel==0.29.0
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting argparse; python_version == "2.6" (from wheel==0.29.0)
:339:
 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name 
Indication) extension to TLS is not available on this platform. This may cause 
the server to present an incorrect TLS certificate, which can cause validation 
failures. You can upgrade to a newer version of Python to solve this. For more 
information, see 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
:137:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. You can upgrade to a newer version of Python to solve 
this. For more information, see 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Using cached argparse-1.4.0-py2.py3-none-any.whl
Installing collected packages: argparse, wheel
Successfully installed argparse-1.4.0 wheel-0.29.0
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Ignoring psycopg2: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring pycryptodome: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring python-dateutil: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring Flask-HTMLmin: markers 'python_version >= "2.7"' don't match your 
environment
Invalid requirement: 'SQLAlchemy>=1.2.5   python_version >= '2.7''
Traceback (most recent call last):
  File 
"
 line 82, in __init__
req = Requirement(req)
  File 
"
 line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "u'python_v'"

ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



Build failed in Jenkins: pgadmin4-master-python35 #555

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Fix requirements for Python 2.6.

[Dave Page] SQLAlchemy stopped supporting Python 2.6.

--
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision c0cfc9f29b1e8ac1099a135ff7acf327576691fd (origin/master)
Commit message: "SQLAlchemy stopped supporting Python 2.6."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f c0cfc9f29b1e8ac1099a135ff7acf327576691fd
 > git rev-list a705fb46a8df9d4db072894d8214a568c38a341a # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.5

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python35] $ /bin/sh -xe /tmp/jenkins7472331979486973223.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.5 virtual environment...

Using base prefix '/usr/local/python-3.5'
New python executable in 

Also creating executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-3.5/bin/python3
Invalid requirement: 'SQLAlchemy>=1.2.5   python_version >= '2.7''
Traceback (most recent call last):
  File 
"
 line 92, in __init__
req = REQUIREMENT.parseString(requirement_string)
  File 
"
 line 1617, in parseString
raise exc
  File 
"
 line 1607, in parseString
loc, tokens = self._parse( instring, 0 )
  File 
"
 line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3376, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
  File 
"
 line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3164, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 32), (line:1, 
col:33)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"
 line 82, in __init__
req = Requirement(req)
  File 
"
 line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, 
parse error at "'python_v'"

ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



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

2018-04-04 Thread pgAdmin 4 Jenkins
See 





Build failed in Jenkins: pgadmin4-master-python33 #558

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Another attempt to fix the Python 2.6 deps.

--
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision a95775ae49e47fe1f289c514bb936a726010033c (origin/master)
Commit message: "Another attempt to fix the Python 2.6 deps."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a95775ae49e47fe1f289c514bb936a726010033c
 > git rev-list 33890da57e8e632119feef3a88e49ac655c64ec5 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.3

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python33] $ /bin/sh -xe /tmp/jenkins3017513691576367995.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.3 virtual environment...

Using base prefix '/usr/local/python-3.3'
New python executable in 

Also creating executable in 

Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/local/python-3.3/bin/python3
Collecting wheel==0.29.0
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.29.0
Double requirement given: Flask-Security>=3.0.0 (from -r requirements.txt (line 
40)) (already in Flask-Security==3.0.0 (from -r requirements.txt (line 15)), 
name='Flask-Security')
ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



Build failed in Jenkins: pgadmin4-master-python36 #552

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Another attempt to fix the Python 2.6 deps.

--
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision a95775ae49e47fe1f289c514bb936a726010033c (origin/master)
Commit message: "Another attempt to fix the Python 2.6 deps."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a95775ae49e47fe1f289c514bb936a726010033c
 > git rev-list 33890da57e8e632119feef3a88e49ac655c64ec5 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.6

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python36] $ /bin/sh -xe /tmp/jenkins7559983071530519523.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.6 virtual environment...

Using base prefix '/usr/local/python-3.6'
New python executable in 

Also creating executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-3.6/bin/python3
Double requirement given: Flask-Security>=3.0.0 (from -r requirements.txt (line 
40)) (already in Flask-Security==3.0.0 (from -r requirements.txt (line 15)), 
name='Flask-Security')
ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



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

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Another attempt to fix the Python 2.6 deps.

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision a95775ae49e47fe1f289c514bb936a726010033c (origin/master)
Commit message: "Another attempt to fix the Python 2.6 deps."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a95775ae49e47fe1f289c514bb936a726010033c
 > git rev-list 33890da57e8e632119feef3a88e49ac655c64ec5 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.6

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python26] $ /bin/sh -xe /tmp/jenkins2857619910417209263.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 2.6 virtual environment...

New python executable in 

Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/local/python-2.6/bin/python
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting wheel==0.29.0
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting argparse; python_version == "2.6" (from wheel==0.29.0)
:339:
 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name 
Indication) extension to TLS is not available on this platform. This may cause 
the server to present an incorrect TLS certificate, which can cause validation 
failures. You can upgrade to a newer version of Python to solve this. For more 
information, see 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
:137:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. You can upgrade to a newer version of Python to solve 
this. For more information, see 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Using cached argparse-1.4.0-py2.py3-none-any.whl
Installing collected packages: argparse, wheel
Successfully installed argparse-1.4.0 wheel-0.29.0
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Ignoring psycopg2: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring pycryptodome: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring python-dateutil: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring Flask-HTMLmin: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring SQLAlchemy: markers 'python_version >= "2.7"' don't match your 
environment
Ignoring Flask-Security: markers 'python_version >= "2.7"' don't match your 
environment
Double requirement given: Flask-Security==1.7.5 (from -r requirements.txt (line 
58)) (already in Flask-Security==3.0.0 (from -r requirements.txt (line 15)), 
name='Flask-Security')
ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



Build failed in Jenkins: pgadmin4-master-python35 #556

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Typo fix.

[Dave Page] Another attempt to fix the Python 2.6 deps.

--
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision a95775ae49e47fe1f289c514bb936a726010033c (origin/master)
Commit message: "Another attempt to fix the Python 2.6 deps."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a95775ae49e47fe1f289c514bb936a726010033c
 > git rev-list c0cfc9f29b1e8ac1099a135ff7acf327576691fd # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.5

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python35] $ /bin/sh -xe /tmp/jenkins3013319889388325584.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.5 virtual environment...

Using base prefix '/usr/local/python-3.5'
New python executable in 

Also creating executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-3.5/bin/python3
Double requirement given: Flask-Security>=3.0.0 (from -r requirements.txt (line 
40)) (already in Flask-Security==3.0.0 (from -r requirements.txt (line 15)), 
name='Flask-Security')
ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



Build failed in Jenkins: pgadmin4-master-python33 #556

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] SQLAlchemy stopped supporting Python 2.6.

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision c0cfc9f29b1e8ac1099a135ff7acf327576691fd (origin/master)
Commit message: "SQLAlchemy stopped supporting Python 2.6."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f c0cfc9f29b1e8ac1099a135ff7acf327576691fd
 > git rev-list b7c86da58605a7e9f474b1a9f4508d9bfc0bdff6 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.3

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python33] $ /bin/sh -xe /tmp/jenkins5066119437690354991.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.3 virtual environment...

Using base prefix '/usr/local/python-3.3'
New python executable in 

Also creating executable in 

Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/local/python-3.3/bin/python3
Collecting wheel==0.29.0
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.29.0
Invalid requirement: 'SQLAlchemy>=1.2.5   python_version >= '2.7''
Traceback (most recent call last):
  File 
"
 line 92, in __init__
req = REQUIREMENT.parseString(requirement_string)
  File 
"
 line 1617, in parseString
raise exc
  File 
"
 line 1607, in parseString
loc, tokens = self._parse( instring, 0 )
  File 
"
 line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3376, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
  File 
"
 line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3164, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 32), (line:1, 
col:33)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"
 line 82, in __init__
req = Requirement(req)
  File 
"
 line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, 
parse error at "'python_v'"

ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



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

2018-04-04 Thread pgAdmin 4 Jenkins
See 





pgAdmin 4 commit: Cleanup some duplication in the requirements.

2018-04-04 Thread Dave Page
Cleanup some duplication in the requirements.

Branch
--
master

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

Modified Files
--
requirements.txt | 2 --
1 file changed, 2 deletions(-)



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

2018-04-04 Thread pgAdmin 4 Jenkins
See 





Re: [pgAdmin4][Patch] Remake Docker container packaging

2018-04-04 Thread Dave Page
Hi

On Wed, Apr 4, 2018 at 2:46 PM, Максим Кольцов  wrote:

>
> So, I've fixed it. Patch attached. Now whole requirements.txt is
> installed in one step, with no left-overs and incompabilities.


I've committed the patch with some minor changes to avoid breaking
compatibility with the older version:

- The default ports are 80/443 again.
- Username/password are set with PGADMIN_DEFAULT_EMAIL
and PGADMIN_DEFAULT_PASSWORD (though, I have left them without defaults).

Thanks!

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

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


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

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Typo fix.

[Dave Page] Another attempt to fix the Python 2.6 deps.

--
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision a95775ae49e47fe1f289c514bb936a726010033c (origin/master)
Commit message: "Another attempt to fix the Python 2.6 deps."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a95775ae49e47fe1f289c514bb936a726010033c
 > git rev-list c0cfc9f29b1e8ac1099a135ff7acf327576691fd # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.7

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python27] $ /bin/sh -xe /tmp/jenkins6260303406607318944.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 2.7 virtual environment...

New python executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-2.7/bin/python
Double requirement given: Flask-Security>=3.0.0 (from -r requirements.txt (line 
40)) (already in Flask-Security==3.0.0 (from -r requirements.txt (line 15)), 
name='Flask-Security')
ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



Re: [pgAdmin4][RM#3155] Allow user to lock the Layout

2018-04-04 Thread Dave Page
On Wed, Apr 4, 2018 at 12:54 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> On Wed, Apr 4, 2018 at 5:00 PM, Dave Page  wrote:
>
>>
>>
>> On Wed, Apr 4, 2018 at 10:45 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> On Wed, Apr 4, 2018 at 2:47 PM, Dave Page  wrote:
>>>


 On Wed, Apr 4, 2018 at 7:20 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Tue, Apr 3, 2018 at 9:03 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Tue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Thanks Joao for reviewing.
>>>
>>> PFA updated patch.
>>>
>>> On Tue, Apr 3, 2018 at 1:11 AM, Joao De Almeida Pereira <
>>> jdealmeidapere...@pivotal.io> wrote:
>>>
 Hello,

 On Mon, Apr 2, 2018 at 10:07 AM Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

>
> ​Hello,
>
> Please find updated patch,
>
> Now layout will be locked after user updates its preferences, w
> e have used ​
> templated variable in the javascript file
> ​ because we do not have preference module or preference cache
> available when the page loads and panels gets rendered,
> ​I
> ​ also
> made changes in JS tests as per Joao's review comments.
>
 Looks like everything is working when we change the lock.
 As a personal preferences I would prefer to see this in at least 2
 commits, one that is related to the preference issue and another one 
 that
 is related to this story.


 All the tests are working, but he linter is failing:

 /tmp/build/4a5630c2/pivotal-rm-3155/web /tmp/build/4a5630c2
  
 
 ./pgadmin/misc/__init__.py:78: [E303] too many blank lines (2)
  
 
 1   E303 too many blank lines (2)
  
 

 1

>>> ​Fixed​
>>>
>>>


> @Dave/Pivotal team,
> The given patch is working fine for all the Tabs/Panels (all the
> panels from main window as well as from Query tool and Debugger) but 
> I'm
> facing an issue while handling the Browser tree section, It is a 
> wcDocer
> frame  and
> not a wcDocker panel
> . Like
> wcDocker panel, wcDocker frame do not provide any API so that a 
> developer
> can prevent drag-drop functionality on it.
>

>> It's not working fine for me. For example, if I put the SQL Panel on
>> it's own below the properties/stats panels (so it looks like pgAdmin 3 
>> used
>> to by default), and then lock the layout, I can un-dock the SQL panel 
>> into
>> a dialogue, but then cannot re-dock it. I can do weird things with the
>> browser tree as well, probably because it's a frame as you say.
>>
>
> ​That is expected behaviour ​because once you drag the panel out of
> the group of Panels then it becomes individual Frame, That is what the
> author of the wcDocker replied on my question,
> *"A panel must either be initialized as movable or non-movable from
> the beginning and never changed because it generates a different
> arrangement of elements depending. This feature should only ever be used
> within the onCreate method of the panel. I should probably have been more
> clear about this limitation in the documentation."*
>
>
 So does it become a panel again if a second panel is added to the new
 tab group?

>>> ​No, it stays Frame.​
>>>
>>> As far as I understand Panel needs a Frame to render itself if it is not
>>> attached to the main docker instance.​
>>>

 There must be some way we can lock a tab that's not part of a group.

>>> At a moment there is no way of ​
>>> locking frames out of the box :(
>>> ​
>>>
>>
>> Hmm, so the question becomes: do we include the lock feature, but rename
>> it to "Lock Tabs" or something similar, or leave it out altogether? It
>> clearly doesn't do everything we want right now.
>>
> ​I would say lets include the feature by adding warning note that this

Build failed in Jenkins: pgadmin4-master-python34 #547

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Another attempt to fix the Python 2.6 deps.

--
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision a95775ae49e47fe1f289c514bb936a726010033c (origin/master)
Commit message: "Another attempt to fix the Python 2.6 deps."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a95775ae49e47fe1f289c514bb936a726010033c
 > git rev-list 33890da57e8e632119feef3a88e49ac655c64ec5 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.4

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python34] $ /bin/sh -xe /tmp/jenkins4712627523173352784.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.4 virtual environment...

Using base prefix '/usr/local/python-3.4'
New python executable in 

Also creating executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-3.4/bin/python3
Double requirement given: Flask-Security>=3.0.0 (from -r requirements.txt (line 
40)) (already in Flask-Security==3.0.0 (from -r requirements.txt (line 15)), 
name='Flask-Security')
ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



pgAdmin 4 commit: Update container build to use Alpine Linux and Gunico

2018-04-04 Thread Dave Page
Update container build to use Alpine Linux and Gunicorn instead of CentOS and 
Apache. Fixes #3246

This results in a much more slim-line container, requiring fewer resources to 
run.
In addition, the majority of the build is now done using the Docker 
infrastructure, allowing for quicker rebuilds and better use of layers.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=05e2e3cb397b21a669129feb067ac44d2fc916dd
Author: Максим Кольцов 

Modified Files
--
docs/en_US/release_notes_3_0.rst |  1 +
pkg/docker/.dockerignore |  2 +
pkg/docker/Dockerfile| 87 +---
pkg/docker/README| 58 +--
pkg/docker/build.sh  | 58 +--
pkg/docker/config_distro.py  |  4 ++
pkg/docker/entry.sh  | 29 --
pkg/docker/entrypoint.sh | 26 
pkg/docker/pgadmin4.conf.j2  | 43 
pkg/docker/run_pgadmin.py|  4 ++
10 files changed, 120 insertions(+), 192 deletions(-)



Re: [pgAdmin4][RM#3155] Allow user to lock the Layout

2018-04-04 Thread Ashesh Vashi
On Wed, Apr 4, 2018 at 8:09 PM, Dave Page  wrote:

>
>
> On Wed, Apr 4, 2018 at 12:54 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> On Wed, Apr 4, 2018 at 5:00 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, Apr 4, 2018 at 10:45 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 On Wed, Apr 4, 2018 at 2:47 PM, Dave Page  wrote:

>
>
> On Wed, Apr 4, 2018 at 7:20 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Tue, Apr 3, 2018 at 9:03 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 Thanks Joao for reviewing.

 PFA updated patch.

 On Tue, Apr 3, 2018 at 1:11 AM, Joao De Almeida Pereira <
 jdealmeidapere...@pivotal.io> wrote:

> Hello,
>
> On Mon, Apr 2, 2018 at 10:07 AM Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>>
>> ​Hello,
>>
>> Please find updated patch,
>>
>> Now layout will be locked after user updates its preferences, w
>> e have used ​
>> templated variable in the javascript file
>> ​ because we do not have preference module or preference cache
>> available when the page loads and panels gets rendered,
>> ​I
>> ​ also
>> made changes in JS tests as per Joao's review comments.
>>
> Looks like everything is working when we change the lock.
> As a personal preferences I would prefer to see this in at least 2
> commits, one that is related to the preference issue and another one 
> that
> is related to this story.
>
>
> All the tests are working, but he linter is failing:
>
> /tmp/build/4a5630c2/pivotal-rm-3155/web /tmp/build/4a5630c2
>  
> 
> ./pgadmin/misc/__init__.py:78: [E303] too many blank lines (2)
>  
> 
> 1   E303 too many blank lines (2)
>  
> 
>
> 1
>
 ​Fixed​


>
>
>> @Dave/Pivotal team,
>> The given patch is working fine for all the Tabs/Panels (all the
>> panels from main window as well as from Query tool and Debugger) but 
>> I'm
>> facing an issue while handling the Browser tree section, It is a 
>> wcDocer
>> frame  and
>> not a wcDocker panel
>> . Like
>> wcDocker panel, wcDocker frame do not provide any API so that a 
>> developer
>> can prevent drag-drop functionality on it.
>>
>
>>> It's not working fine for me. For example, if I put the SQL Panel on
>>> it's own below the properties/stats panels (so it looks like pgAdmin 3 
>>> used
>>> to by default), and then lock the layout, I can un-dock the SQL panel 
>>> into
>>> a dialogue, but then cannot re-dock it. I can do weird things with the
>>> browser tree as well, probably because it's a frame as you say.
>>>
>>
>> ​That is expected behaviour ​because once you drag the panel out of
>> the group of Panels then it becomes individual Frame, That is what the
>> author of the wcDocker replied on my question,
>> *"A panel must either be initialized as movable or non-movable from
>> the beginning and never changed because it generates a different
>> arrangement of elements depending. This feature should only ever be used
>> within the onCreate method of the panel. I should probably have been more
>> clear about this limitation in the documentation."*
>>
>>
> So does it become a panel again if a second panel is added to the new
> tab group?
>
 ​No, it stays Frame.​

 As far as I understand Panel needs a Frame to render itself if it is
 not attached to the main docker instance.​

>
> There must be some way we can lock a tab that's not part of a group.
>
 At a moment there is no way of ​
 locking frames out of the box :(
 ​

>>>
>>> Hmm, so the question becomes: do we include the lock feature, but 

Build failed in Jenkins: pgadmin4-master-python34 #545

2018-04-04 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] SQLAlchemy stopped supporting Python 2.6.

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision c0cfc9f29b1e8ac1099a135ff7acf327576691fd (origin/master)
Commit message: "SQLAlchemy stopped supporting Python 2.6."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f c0cfc9f29b1e8ac1099a135ff7acf327576691fd
 > git rev-list b7c86da58605a7e9f474b1a9f4508d9bfc0bdff6 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=3.4

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python34] $ /bin/sh -xe /tmp/jenkins1349483360067051400.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 3.4 virtual environment...

Using base prefix '/usr/local/python-3.4'
New python executable in 

Also creating executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-3.4/bin/python3
Invalid requirement: 'SQLAlchemy>=1.2.5   python_version >= '2.7''
Traceback (most recent call last):
  File 
"
 line 92, in __init__
req = REQUIREMENT.parseString(requirement_string)
  File 
"
 line 1617, in parseString
raise exc
  File 
"
 line 1607, in parseString
loc, tokens = self._parse( instring, 0 )
  File 
"
 line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3376, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
  File 
"
 line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"
 line 3164, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 32), (line:1, 
col:33)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"
 line 82, in __init__
req = Requirement(req)
  File 
"
 line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, 
parse error at "'python_v'"

ERROR: Failed to install the application requirements.
ERROR: Error detected when running the Python tests.
Build step 'Execute shell' marked build as failure



Re: pgAdmin4 - Issue of unmaintained libraries

2018-04-04 Thread Victoria Henry
Hi Dave,

On Wed, Apr 4, 2018 at 5:03 AM, Dave Page  wrote:

> Hi
>
> On Tue, Apr 3, 2018 at 9:09 PM, Joao De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hi Dave,
>>
>> On Tue, Apr 3, 2018 at 8:32 AM Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, Apr 3, 2018 at 1:22 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Team,

 As we are heavily dependent on 3rd party JS libraries and some of them
 are no longer actively maintained by their respective authors (Last commit
 was approximate year ago).

 Some of the core libraries which are no longer actively maintained are,
 - Backbone 
 - wcDocker 
 - aciTree 
 - Backgrid /Backform
 - jQuery 1.x 
 version

 What would be our future plans when it comes to fixing the issues in
 the core libraries or adding new feature?
 (Ref: Email thread
 
 )

>>>
>>> Well jQuery can be updated can't it?
>>>
>>> wcDocker is, as far as I'm aware, the only library of it's kind. Unless
>>> something else has surpassed it in the last couple of years, there's
>>> nothing even close in functionality to it. aciTree was in a similar
>>> position, though Joao and team think there may be other candidates now.
>>>
>>
>> About the wcDocker, in fact it as a lot of features. In our User
>> Interviews we didn't find any person that was using features like dragging
>> and creating new panels. The only feature that we see people using was the
>> tabs. So if the only feature that people use of wcDocker is really tabs
>> there are some other libraries like:
>> react-tabs or react-tabtab (Draggable tabs) or rc-tabs(Static tabs, with
>> 52k Downloads last 7 days).
>>
>
> On a personal level, I do re-arrange the panel layout.
>

> On a practical level, we create new panels every time you use the query
> tool or debugger, or open properties dialogues etc.
>

We do know that and all the libraries that we highlighted have the ability
to create tabs dynamically.


>
>>
>> For ACITree we already started the process of isolating it from the
>> application, This will allow us in the future to replace it with something
>> that is more up to date.
>>
>>
>>> As for Backbone/Backgrid/Backform, I don't know. Backbone could maybe be
>>> replaced with React eventually. Not sure about the others.
>>>
>>> In any case, this is likely to be a problem on an ongoing basis - and I
>>> think we need to consider the future on a case by case basis when
>>> necessary. It may mean moving to a different library, or it may mean
>>> forking components, or it may be the upstream may have not had any commits
>>> for a long time simply because there is no development happening right now,
>>> but bugs may still be fixed.
>>>
>>>
>> We understand and agree that this should be handled case-by-case instead
>> of replacing everything at once since it is not feasible to do a complete
>> rewrite of the application.  But we also think it's hard to build new
>> features on top of libraries that are no longer supported.  We don't really
>> want to fork a library either because we'll become responsible for
>> maintaining that library, which means maintaining more code.  We want to
>> use libraries that are actively maintained so we can get security patches,
>> new features, etc.  Also, if we need a new functionality on a specific
>> library, we can, for example, open an issue and the maintainers of that
>> library can implement it for us or we can create a pull request for them to
>> merge.
>>
>
> Sure, but the main issue is that projects get abandoned all the time. We
> have no way of knowing what will get dropped and what won't until it
> actually happens - and even then it's not always clear, for example the
> wcDocker case where there haven't been code changes in some time, but the
> lead developer is still responding to issues very promptly.
>

There are 2 PR one from 2017 and another one from Feb that have no comments
on them, and there are open issues also because that have no answer or were
never worked on. Despite the fact that he does answer emails, it looks like
the library will not see any further development.


>
> My point is that it's very hard to know when a component needs to be
> replaced, unless the team actually announces its EOL, and even then some
> components require a huge amount of effort to replace them, when in reality
> forking them and maintaining the fork may require significantly less effort.
>

You are right, specially in the world of Javascript everything changes at a
very high rate. The decisions 

Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree

2018-04-04 Thread Dave Page
Khushboo, Murtuza,

Can you spend some time reviewing this please? I've started playing with it
as well - the first thing that's irking me somewhat is the lack of
comments. Descriptive function names are all well and good, but sometimes a
little more is needed, especially for less experienced developers or
newcomers to the application!

On Mon, Apr 2, 2018 at 7:45 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Hackers,
>
> Attached you can find the patch that will start to decouple pgAdmin from
> ACITree library.
> This patch is intended to be merged after 3.0, because we do not want to
> cause any entropy or delay the release, but we want to start the discussion
> and show some code.
>
> This job that we started is a massive tech debt chore that will take some
> time to finalize and we would love the help of the community to do it.
>
> *Summary of the patch:*
> 0001 patch:
>  - Creates a new tree that will allow us to create a separation between
> the application and ACI Tree
>  - Creates a Fake Tree (Test double, for reference on the available test
> doubles: https://martinfowler.com/bliki/TestDouble.html) that can be used
> to inplace to replace the ACITree and also encapsulate the new tree
> behavior on our tests
>  - Adds tests for all the tree functionalities
>
> 0002 patch:
>  - Extracts, refactors, adds tests and remove dependency from ACI Tree on:
> - getTreeNodeHierarchy
> - on backup.js: menu_enabled, menu_enabled_server,
> start_backup_global_server, backup_objects
> - on datagrid.js: show_data_grid, get_panel_title, show_query_tool
> - Start using sprintf-js as Underscore.String is deprecating sprintf
> function
>
> This patch represents only 10 calls to ACITree.itemData out of 176 that
> are spread around our code
>
>
> *In Depth look on the process behind the patch:*
>
> We started writing this patch with the idea that we need to decouple
> pgAdmin4 from ACITree, because ACITree is no longer supported, the
> documentation is non existent and ACITree is no longer being actively
> developed.
>
> Our process:
> 1. We "randomly" selected a function that is part of the ACITree. From
> this point we decided to replace that function with our own version. The
> function that we choose was "itemData".
> The function gives us all the "data" that a specific node of the tree find.
> Given in order to replace the tree we would need to have a function that
> would give us the same information. We had 2 options:
>   a) Create a tree with a function called itemData
> Pros:
>  - At first view this was the simpler solution
>  - Would keep the status quo
> Cons:
>  - Not a OOP approach
>  - Not very flexible
>   b) Create a tree that would return a node given an ID and then the node
> would be responsible for giving it's data.
> Pros:
>  - OOP Approach
>  - More flexible and we do not need to bring the tree around, just a node
> Cons:
>  - Break the current status quo
>
> Given these 2 options we decided to go for a more OOP approach creating a
> Tree and a TreeNode classes, that in the future will be renamed to
> ACITreeWrapper and TreeNode.
>
> 2. After we decided on the starting point we searched for occurrences of
> the function "itemData" and we found out that there were 303 occurrences of
> "itemData" in the code and roughly 176 calls to the function itself (some
> of the hits were variable names).
>
> 3. We selected the first file on the search and found the function that
> was responsible for calling the itemData function.
>
> 4. Extracted the function to a separate file
>
> 5. Wrap this function with tests
>
> 6. Refactor the function to ES6, give more declarative names to variables
> and break the functions into smaller chunks
>
> 7. When all the tests were passing we replaced ACITree with our Tree
>
> 8. We ensured that all tests were passing
>
> 9. Remove function from the original file and use the new function
>
> 10. Ensure everything still works
>
> 11. Find the next function and execute from step 4 until all the functions
> are replaced, refactored and tested.
>
> As you can see by the process this is a pretty huge undertake, because of
> the number of calls to the function. This is just the first step on the
> direction of completely isolating the ACITree so that we can solve the
> problem with a large number of elements on the tree.
>
> *What is on our radar that we need to address:*
>  - Finish the complete decoupling of the ACITree
>  - Performance of the current tree implementation
>  - Tweak the naming of the Tree class to explicitly tell us this is to use
> only with ACITree.
>
>
> Thanks
> Joao
>
>


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

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


Re: [pgAdmin4][Patch] Remake Docker container packaging

2018-04-04 Thread Максим Кольцов
2018-04-04 18:22 GMT+03:00 Dave Page :
> Hi
>
> On Wed, Apr 4, 2018 at 2:46 PM, Максим Кольцов  wrote:
>>
>>
>> So, I've fixed it. Patch attached. Now whole requirements.txt is
>> installed in one step, with no left-overs and incompabilities.
>
>
> I've committed the patch with some minor changes to avoid breaking
> compatibility with the older version:
>
> - The default ports are 80/443 again.
> - Username/password are set with PGADMIN_DEFAULT_EMAIL and
> PGADMIN_DEFAULT_PASSWORD (though, I have left them without defaults).
>
> Thanks!

Great, thank you very much!
Will you update image at docker hub?

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



Re: [pgAdmin4][RM#3154] Update modules to latest version

2018-04-04 Thread Murtuza Zabuawala
Hi Joao,

Yes it bundles latest version but I doubt that is not using it, If we
upgrade the jQuery to 3.3.1 then it's breaking the SlickGrid.
I have tried that and I started getting jQuery related errors when trying
to run query tool or when running jasmine tests.

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


On Wed, Apr 4, 2018 at 1:39 AM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Murtuza,
>
> The patches look good and they pass all tests in CI.
> One think that we realized was the SlickGrid as a npm package now:
> https://www.npmjs.com/package/slickgrid
> Also Slickgrid comes packaged with jquery 3.1 not sure if it is fully
> supported or not..
>
> Thanks
> Victoria & Joao
>
> On Tue, Apr 3, 2018 at 11:50 AM Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> ​Hi Dave,
>>
>> Reverted back jQuery version to 1.x because of SlickGrid dependancy.
>> Please find updated patch.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Tue, Apr 3, 2018 at 8:50 PM, Murtuza Zabuawala > enterprisedb.com> wrote:
>>
>>> Please hold on my previous patch.
>>>
>>> We can't use latest jQuery version as SlickGrid has dependancy on older
>>> version.
>>> I'll send updated patch again.
>>>
>>> On Tue, Apr 3, 2018 at 8:20 PM, Murtuza Zabuawala >> enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find updated patches, there are two patches attached one is for
 the story and another is for changes required as per new modules.


 On Tue, Apr 3, 2018 at 6:27 PM, Dave Page  wrote:

> Hi
>
> On Fri, Mar 30, 2018 at 8:01 AM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch to update the modules to latest version.
>>
>>
> - Why isn't jQuery updated to 3.3.1?
>
 ​Done​


> ​
>
>

> - Shouldn't pkg/pip/setup_pip.py be updated with changes to psycopg2
> and pycrypto etc?
>
 ​Done​


>
>
>
>> We are not able to update some of the modules to latest version due
>> to dependancy on other modules, For example
>> - Python: Flask-Security has dependancy on flask-babelex which causes
>> conflict with flask_babel
>>
>
> Hmm, flask-babelex might be a better option anyway; in particular, it
> avoids loading catalogs with every request which seems desirable given the
> size of ours. On the other hand, it hasn't been updated so recently.
>
 ​I have removed flask-babel and used flask_babelex instead.​


>
>
>> - JS: Can't update to Bootstrap4 because Bootstrap Switch &
>> Bootstrap Datetime picker has dependancy on Bootstrap3.
>>
>
> OK.
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


>>>
>>


Re: [pgAdmin4][Patch]: RM #1978 - Add an option to allow user to disable alertifyjs and acitree animations

2018-04-04 Thread Dave Page
Thanks, applied.

On Wed, Apr 4, 2018 at 6:26 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Tue, Apr 3, 2018 at 7:23 PM, Dave Page  wrote:
>
>> Hi
>>
>> Thanks - I've committed this, however, could you send me an updated
>> screenshot for the docs? The one you sent was a different size and colour
>> depth from the others (and looked like a different scale).
>>
>> Please find the attached patch for the same.
>
>> On Tue, Apr 3, 2018 at 10:42 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached updated patch.
>>>
>>> On Thu, Mar 29, 2018 at 6:54 PM, Dave Page  wrote:
>>>
 Hi

 On Thu, Mar 29, 2018 at 1:51 PM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Mar 26, 2018 at 6:07 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Mon, Mar 26, 2018 at 7:23 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch to fix RM #1978: Add an option to
>>> allow user to disable alertifyjs and acitree animations.
>>>
>>
>> I think these really need to be per-user settings, not
>> per-installation.. Whether or not animations are shown is really a matter
>> of personal taste and circumstance.
>>
>> Right, it should be per-user settings.  Please find the attached
> updated patch.
>

 I found some issues I'm afraid:

 - The label "Enable dialogues/notifications animation?" should read
 "Enable dialogue/notification animation?"

 Changed.
>>>
 - Disabling treeview animation only seems to affect the main browser
 treeview, and not others in the application (e.g. the one on the
 Preferences panel).

 Fixed
>>>
  - After disabling dialogue/notification animations, I cannot re-enable
 notification animations. If I flip the switch back on, dialogue animations
 immediately start working again, but notification animations don't even
 work following a reload.

 Fixed.
>>>
 Thanks.

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

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

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



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

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


Re: [pgAdmin4][RM#3154] Update modules to latest version

2018-04-04 Thread Dave Page
Thanks, patch applied.



On Tue, Apr 3, 2018 at 4:49 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> ​Hi Dave,
>
> Reverted back jQuery version to 1.x because of SlickGrid dependancy.
> Please find updated patch.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> On Tue, Apr 3, 2018 at 8:50 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Please hold on my previous patch.
>>
>> We can't use latest jQuery version as SlickGrid has dependancy on older
>> version.
>> I'll send updated patch again.
>>
>> On Tue, Apr 3, 2018 at 8:20 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find updated patches, there are two patches attached one is for
>>> the story and another is for changes required as per new modules.
>>>
>>>
>>> On Tue, Apr 3, 2018 at 6:27 PM, Dave Page  wrote:
>>>
 Hi

 On Fri, Mar 30, 2018 at 8:01 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to update the modules to latest version.
>
>
 - Why isn't jQuery updated to 3.3.1?

>>> ​Done​
>>>
>>>
 ​


>>>
 - Shouldn't pkg/pip/setup_pip.py be updated with changes to psycopg2
 and pycrypto etc?

>>> ​Done​
>>>
>>>



> We are not able to update some of the modules to latest version due to
> dependancy on other modules, For example
> - Python: Flask-Security has dependancy on flask-babelex which causes
> conflict with flask_babel
>

 Hmm, flask-babelex might be a better option anyway; in particular, it
 avoids loading catalogs with every request which seems desirable given the
 size of ours. On the other hand, it hasn't been updated so recently.

>>> ​I have removed flask-babel and used flask_babelex instead.​
>>>
>>>


> - JS: Can't update to Bootstrap4 because Bootstrap Switch & Bootstrap 
> Datetime
> picker has dependancy on Bootstrap3.
>

 OK.


 --
 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 - Issue of unmaintained libraries

2018-04-04 Thread Dave Page
Hi

On Tue, Apr 3, 2018 at 9:09 PM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Dave,
>
> On Tue, Apr 3, 2018 at 8:32 AM Dave Page  wrote:
>
>> Hi
>>
>> On Tue, Apr 3, 2018 at 1:22 PM, Murtuza Zabuawala > enterprisedb.com> wrote:
>>
>>> Hi Team,
>>>
>>> As we are heavily dependent on 3rd party JS libraries and some of them
>>> are no longer actively maintained by their respective authors (Last commit
>>> was approximate year ago).
>>>
>>> Some of the core libraries which are no longer actively maintained are,
>>> - Backbone 
>>> - wcDocker 
>>> - aciTree 
>>> - Backgrid /Backform
>>> - jQuery 1.x 
>>> version
>>>
>>> What would be our future plans when it comes to fixing the issues in the
>>> core libraries or adding new feature?
>>> (Ref: Email thread
>>> 
>>> )
>>>
>>
>> Well jQuery can be updated can't it?
>>
>> wcDocker is, as far as I'm aware, the only library of it's kind. Unless
>> something else has surpassed it in the last couple of years, there's
>> nothing even close in functionality to it. aciTree was in a similar
>> position, though Joao and team think there may be other candidates now.
>>
>
> About the wcDocker, in fact it as a lot of features. In our User
> Interviews we didn't find any person that was using features like dragging
> and creating new panels. The only feature that we see people using was the
> tabs. So if the only feature that people use of wcDocker is really tabs
> there are some other libraries like:
> react-tabs or react-tabtab (Draggable tabs) or rc-tabs(Static tabs, with
> 52k Downloads last 7 days).
>

On a personal level, I do re-arrange the panel layout.

On a practical level, we create new panels every time you use the query
tool or debugger, or open properties dialogues etc.


>
> For ACITree we already started the process of isolating it from the
> application, This will allow us in the future to replace it with something
> that is more up to date.
>
>
>> As for Backbone/Backgrid/Backform, I don't know. Backbone could maybe be
>> replaced with React eventually. Not sure about the others.
>>
>> In any case, this is likely to be a problem on an ongoing basis - and I
>> think we need to consider the future on a case by case basis when
>> necessary. It may mean moving to a different library, or it may mean
>> forking components, or it may be the upstream may have not had any commits
>> for a long time simply because there is no development happening right now,
>> but bugs may still be fixed.
>>
>>
> We understand and agree that this should be handled case-by-case instead
> of replacing everything at once since it is not feasible to do a complete
> rewrite of the application.  But we also think it's hard to build new
> features on top of libraries that are no longer supported.  We don't really
> want to fork a library either because we'll become responsible for
> maintaining that library, which means maintaining more code.  We want to
> use libraries that are actively maintained so we can get security patches,
> new features, etc.  Also, if we need a new functionality on a specific
> library, we can, for example, open an issue and the maintainers of that
> library can implement it for us or we can create a pull request for them to
> merge.
>

Sure, but the main issue is that projects get abandoned all the time. We
have no way of knowing what will get dropped and what won't until it
actually happens - and even then it's not always clear, for example the
wcDocker case where there haven't been code changes in some time, but the
lead developer is still responding to issues very promptly.

My point is that it's very hard to know when a component needs to be
replaced, unless the team actually announces its EOL, and even then some
components require a huge amount of effort to replace them, when in reality
forking them and maintaining the fork may require significantly less effort.

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

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


Re: [pgAdmin4][RM#3155] Allow user to lock the Layout

2018-04-04 Thread Murtuza Zabuawala
On Wed, Apr 4, 2018 at 2:47 PM, Dave Page  wrote:

>
>
> On Wed, Apr 4, 2018 at 7:20 AM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Tue, Apr 3, 2018 at 9:03 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, Apr 3, 2018 at 12:56 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 Thanks Joao for reviewing.

 PFA updated patch.

 On Tue, Apr 3, 2018 at 1:11 AM, Joao De Almeida Pereira <
 jdealmeidapere...@pivotal.io> wrote:

> Hello,
>
> On Mon, Apr 2, 2018 at 10:07 AM Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>>
>> ​Hello,
>>
>> Please find updated patch,
>>
>> Now layout will be locked after user updates its preferences, w
>> e have used ​
>> templated variable in the javascript file
>> ​ because we do not have preference module or preference cache
>> available when the page loads and panels gets rendered,
>> ​I
>> ​ also
>> made changes in JS tests as per Joao's review comments.
>>
> Looks like everything is working when we change the lock.
> As a personal preferences I would prefer to see this in at least 2
> commits, one that is related to the preference issue and another one that
> is related to this story.
>
>
> All the tests are working, but he linter is failing:
>
> /tmp/build/4a5630c2/pivotal-rm-3155/web /tmp/build/4a5630c2
>  
> 
> ./pgadmin/misc/__init__.py:78: [E303] too many blank lines (2)
>  
> 
> 1   E303 too many blank lines (2)
>  
> 
>
> 1
>
 ​Fixed​


>
>
>> @Dave/Pivotal team,
>> The given patch is working fine for all the Tabs/Panels (all the
>> panels from main window as well as from Query tool and Debugger) but I'm
>> facing an issue while handling the Browser tree section, It is a wcDocer
>> frame  and not a 
>> wcDocker
>> panel . Like
>> wcDocker panel, wcDocker frame do not provide any API so that a developer
>> can prevent drag-drop functionality on it.
>>
>
>>> It's not working fine for me. For example, if I put the SQL Panel on
>>> it's own below the properties/stats panels (so it looks like pgAdmin 3 used
>>> to by default), and then lock the layout, I can un-dock the SQL panel into
>>> a dialogue, but then cannot re-dock it. I can do weird things with the
>>> browser tree as well, probably because it's a frame as you say.
>>>
>>
>> ​That is expected behaviour ​because once you drag the panel out of the
>> group of Panels then it becomes individual Frame, That is what the author
>> of the wcDocker replied on my question,
>> *"A panel must either be initialized as movable or non-movable from the
>> beginning and never changed because it generates a different arrangement of
>> elements depending. This feature should only ever be used within the
>> onCreate method of the panel. I should probably have been more clear about
>> this limitation in the documentation."*
>>
>>
> So does it become a panel again if a second panel is added to the new tab
> group?
>
​No, it stays Frame.​

As far as I understand Panel needs a Frame to render itself if it is not
attached to the main docker instance.​

>
> There must be some way we can lock a tab that's not part of a group.
>
At a moment there is no way of ​
locking frames out of the box :(
​

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


Re: [pgAdmin4][RM#3235] Code refactoring in Query tool

2018-04-04 Thread Murtuza Zabuawala
Hi,

Thank you Victoria & Joao for reviewing.
PFA updated patch.

On Wed, Apr 4, 2018 at 12:26 AM, Joao De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Murtuza
>
> It is really good to see other patches that are just refactoring code.
>
> We have some suggestions:
> - We are trying to use === instead of == because === ensure that the type
> is also checked (https://developer.mozilla.org/en-US/docs/Web/JavaScript/
> Equality_comparisons_and_sameness)
>
​Done​


- Now that we are refactoring some code, maybe we should keep some
> consistency on the way we name functions and variables.
>
We should use camelCase for names instead of snake_case. In general, if you
> see a function or variable name that doesn't fit the desired syntax or if a
> block of code seems confusing, it is better to refactor it.
>
Done​, I have also changed other variables.​
BTW I'm using camelCase convention from last few patches :)

- By the name of the function is_new_transaction_required, it describes
> what the function represents but doesn't seem to explain the full scope of
> the function. What do you think about the name: httpResponseRequiresNewT
> ransaction
>
​Done​


- The extraction doesn't look like it matches the code removed
>

> -if (pgAdmin.Browser.UserManagement.is_pga_login_required(e))
> {
> -  self.save_state('_explain_timing', []);
> -  return pgAdmin.Browser.UserManagement.pga_login();
> -}
> -
> -if(transaction.is_new_transaction_required(e)) {
> -  self.save_state('_explain_timing', []);
> -  return self.init_transaction();
> -}
> -
> -alertify.alert(gettext('Explain options error'),
> -  gettext('Error occurred while setting timing option in
> explain.')
> +let msg = httpErrorHandler.handleQueryToolAjaxError(
> +  pgAdmin, self, e, '_explain_timing', null, true
>  );
> +alertify.alert(gettext('Explain options error'), msg);
> In this case we are only saving state if the following conditions are
> true:
> isNotConnectedToThePythonServer and httpResponseJSONIsPresent and
> connectionLostToPostgresDatabase and shouldSaveState
> That is not the case on the removed code.
>
​I think the *null* value got your attention b
ut actually I have a check in ​*handleQueryToolAjaxError *which will make
it array [] with respect to arguments for the state to save, Anyways I have
also changed it to pass [] instead of null for better clarity.
We have all those checks in our function so it check for those condition
and save the state only if those returns True.

- The functions extracted when are called do not use all the parameters.
> This tells us that the function groups too much functionality that is not
> used in same cases. Maybe we should split this function into smaller
> functions that do each part.
>
​We already had split up the function in two part.
​

>
>
> Thanks
> Victoria & Joao
>
> On Tue, Apr 3, 2018 at 11:38 AM Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA updated patch, I've renamed it to query_tool_http_error_handler.js
>> & query_tool_http_error_handler_spec.js respectively.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Tue, Apr 3, 2018 at 7:43 PM, Dave Page  wrote:
>>
>>> HI
>>>
>>> On Tue, Apr 3, 2018 at 12:27 PM, Murtuza Zabuawala >> enterprisedb.com> wrote:
>>>
 Hi,

 PFA patch to extract the common code from query tool to handle ajax
 errors & connection handling, Also added unit tests around extracted code.

>>>
>>> Looks good to me, except, I wonder if we should rename
>>> is_new_transaction_required.js/is_new_transaction_required_spec.js to
>>> something a little more generic; maybe conn_tx_handler_funcs.js? Not sure I
>>> like that though.
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>


RM_3235_v2.diff
Description: Binary data