pgAdmin 4 commit: Rename the video and log file created by Selenium tes

2021-04-01 Thread Akshay Joshi
Rename the video and log file created by Selenium tests.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=fe236316dea45235e4d13e45ca2b64911052f858
Author: Yogesh Mahajan 

Modified Files
--
web/regression/python_test_utils/test_utils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



Re: Feature Test Fix

2021-04-01 Thread Akshay Joshi
Thanks, patch applied.

On Thu, Apr 1, 2021 at 12:28 PM Yogesh Mahajan <
yogesh.maha...@enterprisedb.com> wrote:

> Hello,
>
> Please find one more patch which rename nomenclature for video & log file
> names created by solenoid.
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>
>
> On Thu, Apr 1, 2021 at 12:19 PM Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Thanks, patch applied.
>>
>> On Thu, Apr 1, 2021 at 12:06 PM Yogesh Mahajan <
>> yogesh.maha...@enterprisedb.com> wrote:
>>
>>> Hi Team,
>>>
>>> Please find a patch which asserts the actual result of button click
>>> (before it did not).
>>> Also changes in locators for query tool & vire/edit data are
>>> accommodated.
>>>
>>>
>>> Thanks,
>>> Yogesh Mahajan
>>> EnterpriseDB
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Fixed PEP8 issue.

2021-04-01 Thread Akshay Joshi
Fixed PEP8 issue.

Branch
--
master

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

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



Re: CLI for Schema Diff

2021-04-01 Thread Dave Page
Hi

On Thu, Apr 1, 2021 at 12:38 AM Steve Chavez  wrote:

> > but is this something you'd be interested in working on to become a more
> fully featured and production quality CLI?
>
> Yes, absolutely!
>

Cool!


> What would be the next step? I'm all for doing a CLI that covers pgAdmin
> quality standards.
>

I think there are a few things we'd need to do:

1) Agree a standard for command line syntax. CLIs can easily become very
messy - I've spent time designing such standards in the past
(unfortunately, I can't just share that), but some thoughts might be:

  - have a consistent  syntax. For example;

pgacli --output-format=json schema-diff generate-diff --source=...
--target=...
pgacli core register-server --host=... --maintenance-db=... ...
pgacli grant-wizard grant-acl --select --type=tables
--objects=schema.tb_*

(I've assumed a module name of 'core' for things directly related to
the heart of pgAdmin)

- Actions are in the form "verb-noun"
- Every common option has both a short and a long form
- Uncommon options have a long form only
- Support various help options, showing appropriate info;

pgacli -h
pgacli --help
pgacli core -h
pgacli schema-diff --help

2) Figure out how to avoid the hacks in your existing code to do things
like:

- Hide initialisation output
- Setup the dummy SQLite database

3) Make the code modular and extensible; perhaps using a Python module per
CLI module.

4) Allow the use of saved connections as well as arbitrary connection
strings.

I think 2 is the hardest issue. It may be that we add a flag to the main
application code that tells it it's running under the CLI, so that it can
avoid doing things it doesn't need to in those cases. One example is the
module loading; we might want to skip that entirely under the CLI, and have
the CLI module that's being called load just the modules it needs.


>
> On Wed, 31 Mar 2021 at 03:08, Dave Page  wrote:
>
>> Hi
>>
>> On Tue, Mar 30, 2021 at 3:36 PM Steve Chavez  wrote:
>>
>>> Hey all,
>>>
>>> In case anyone is interested, I've managed to enable a CLI mode for the
>>> Schema Diff on this repo:
>>>
>>> https://github.com/steve-chavez/pgadmin4/blob/cli/web/cli.py
>>>
>>> It basically works by using a Flask test client that interacts with the
>>> Schema Diff endpoints.
>>> It's a single isolated file, I haven't patched any of the existing
>>> modules.
>>>
>>> For a quickstart, there's also a docker image that can be used like:
>>>
>>> docker run supabase/pgadmin-schema-diff \
>>>   'postgres://postgres@host/diff_source' \
>>>   'postgres://postgres@host/diff_target' \
>>>   > diff.sql
>>> ## the stderr output shows the same messages as the Schema Diff GUI:
>>>
>>> Starting schema diff...
>>> Comparision started..0%
>>> Comparing FTS Dictionaries ...35%
>>> Comparing Functions ...50%
>>> Comparing Trigger Functions ...60%
>>> Comparing Sequences ...70%
>>> Comparing Tables ...80%
>>> Comparing Views ...90%
>>> Done.
>>>
>>>
>> That's an interesting approach! Obviously the code is just a proof of
>> concept at the moment (redirecting stdout is masking errors for example),
>> but is this something you'd be interested in working on to become a more
>> fully featured and production quality CLI?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EDB: http://www.enterprisedb.com
>>
>>

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

EDB: http://www.enterprisedb.com


Re: CLI for Schema Diff

2021-04-01 Thread Steve Chavez
> but is this something you'd be interested in working on to become a more
fully featured and production quality CLI?

Yes, absolutely! What would be the next step? I'm all for doing a CLI that
covers pgAdmin quality standards.

On Wed, 31 Mar 2021 at 03:08, Dave Page  wrote:

> Hi
>
> On Tue, Mar 30, 2021 at 3:36 PM Steve Chavez  wrote:
>
>> Hey all,
>>
>> In case anyone is interested, I've managed to enable a CLI mode for the
>> Schema Diff on this repo:
>>
>> https://github.com/steve-chavez/pgadmin4/blob/cli/web/cli.py
>>
>> It basically works by using a Flask test client that interacts with the
>> Schema Diff endpoints.
>> It's a single isolated file, I haven't patched any of the existing
>> modules.
>>
>> For a quickstart, there's also a docker image that can be used like:
>>
>> docker run supabase/pgadmin-schema-diff \
>>   'postgres://postgres@host/diff_source' \
>>   'postgres://postgres@host/diff_target' \
>>   > diff.sql
>> ## the stderr output shows the same messages as the Schema Diff GUI:
>>
>> Starting schema diff...
>> Comparision started..0%
>> Comparing FTS Dictionaries ...35%
>> Comparing Functions ...50%
>> Comparing Trigger Functions ...60%
>> Comparing Sequences ...70%
>> Comparing Tables ...80%
>> Comparing Views ...90%
>> Done.
>>
>>
> That's an interesting approach! Obviously the code is just a proof of
> concept at the moment (redirecting stdout is masking errors for example),
> but is this something you'd be interested in working on to become a more
> fully featured and production quality CLI?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>


pgAdmin 4 commit: Ensure that while comparing domains check function de

2021-04-01 Thread Akshay Joshi
Ensure that while comparing domains check function dependencies should be 
considered in schema diff. Fixes #6327

Branch
--
master

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

Modified Files
--
docs/en_US/release_notes_5_2.rst   |  1 +
.../servers/databases/schemas/domains/__init__.py  | 31 ++
2 files changed, 32 insertions(+)



[pgAdmin][Patch] RM6076 - No error thrown while importing server if servers.json has incorrect keys/insufficient keys

2021-04-01 Thread Yogesh Mahajan
Hello Team,

Please find an attached patch which shows the exact error if the json file
used to load the server has missing keys/incorrect key value.

Thanks,
Yogesh Mahajan
EnterpriseDB


RM6076_v1.patch
Description: Binary data


pgAdmin 4 commit: Fixed an issue where correct error not thrown while i

2021-04-01 Thread Akshay Joshi
Fixed an issue where correct error not thrown while importing servers and JSON 
file has incorrect/insufficient keys. Fixes #6076

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=53f5562468fde4bf06d3206eda0e6287e76d3015
Author: Yogesh Mahajan 

Modified Files
--
docs/en_US/release_notes_5_2.rst |  1 +
web/setup.py | 21 ++---
2 files changed, 15 insertions(+), 7 deletions(-)



Re: [pgAdmin][Patch] RM6076 - No error thrown while importing server if servers.json has incorrect keys/insufficient keys

2021-04-01 Thread Akshay Joshi
Thanks, patch applied.

On Thu, Apr 1, 2021 at 5:43 PM Yogesh Mahajan <
yogesh.maha...@enterprisedb.com> wrote:

> Hello Team,
>
> Please find an attached patch which shows the exact error if the json file
> used to load the server has missing keys/incorrect key value.
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*