Обсуждение: [Pgadmin] [Docker] servers.json import fails when running indesktop mode

Поиск
Список
Период
Сортировка

[Pgadmin] [Docker] servers.json import fails when running indesktop mode

От
Levitt Olivier
Дата:
Hi,

When running the docker image in desktop mode (PGADMIN_CONFIG_SERVER_MODE=False), no user is created. That is expected
behaviour.
But then the code that imports the servers.json pre-configuration fails as it ties the import to the default user.

I think line 40 of entrypoint.sh
(https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob;f=pkg/docker/entrypoint.sh;h=47d14bf2d415777c64b221fb1fc75d61c5e3cecc;hb=HEAD)
shouldnot specify a user when running in dekstop mode.  
I tested it without --user parameter and it successfully imported the servers.json configuration.

Should I submit a patch ? First time contributing to Pgadmin :)

Regards,
Olivier Levitt



Re: [Pgadmin] [Docker] servers.json import fails when running indesktop mode

От
Ashesh Vashi
Дата:


On Sat, Dec 14, 2019 at 3:53 AM Levitt Olivier <olivier.levitt@insee.fr> wrote:
Hi,

When running the docker image in desktop mode (PGADMIN_CONFIG_SERVER_MODE=False), no user is created. That is expected behaviour.
But then the code that imports the servers.json pre-configuration fails as it ties the import to the default user. 

I think line 40 of entrypoint.sh (https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob;f=pkg/docker/entrypoint.sh;h=47d14bf2d415777c64b221fb1fc75d61c5e3cecc;hb=HEAD) should not specify a user when running in dekstop mode.
I tested it without --user parameter and it successfully imported the servers.json configuration.

Should I submit a patch ? First time contributing to Pgadmin :)
Please do.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



Regards,
Olivier Levitt


RE: [Pgadmin] [Docker] servers.json import fails when running indesktop mode

От
Levitt Olivier
Дата:
Hi,

Here is a patch (first contribution \o/) that solves the issue by importing the servers.json anonymously when running
inDESKTOP mode.   
There may be a better way to check if we are running in DESKTOP mode or not but checking PGADMIN_CONFIG_SERVER_MODE
shouldbe enough when running pgadmin4 in docker.   

Regards,
Olivier Levitt


________________________________________
From: Ashesh Vashi [ashesh.vashi@enterprisedb.com]
Sent: 14 December 2019 05:52
To: Levitt Olivier
Cc: pgadmin-hackers@postgresql.org
Subject: Re: [Pgadmin] [Docker] servers.json import fails when running in desktop mode

<http://www.linkedin.com/in/asheshvashi>

On Sat, Dec 14, 2019 at 3:53 AM Levitt Olivier <olivier.levitt@insee.fr<mailto:olivier.levitt@insee.fr>> wrote:
Hi,

When running the docker image in desktop mode (PGADMIN_CONFIG_SERVER_MODE=False), no user is created. That is expected
behaviour.
But then the code that imports the servers.json pre-configuration fails as it ties the import to the default user.

I think line 40 of entrypoint.sh
(https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob;f=pkg/docker/entrypoint.sh;h=47d14bf2d415777c64b221fb1fc75d61c5e3cecc;hb=HEAD)
shouldnot specify a user when running in dekstop mode. 
I tested it without --user parameter and it successfully imported the servers.json configuration.

Should I submit a patch ? First time contributing to Pgadmin :)
Please do.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com>


http://www.linkedin.com/in/asheshvashi

Regards,
Olivier Levitt



Вложения

Re: [Pgadmin] [Docker] servers.json import fails when running indesktop mode

От
Akshay Joshi
Дата:
Thanks, patch applied.

On Mon, Dec 16, 2019 at 4:42 PM Levitt Olivier <olivier.levitt@insee.fr> wrote:
Hi,

Here is a patch (first contribution \o/) that solves the issue by importing the servers.json anonymously when running in DESKTOP mode. 
There may be a better way to check if we are running in DESKTOP mode or not but checking PGADMIN_CONFIG_SERVER_MODE should be enough when running pgadmin4 in docker. 

Regards,
Olivier Levitt


________________________________________
From: Ashesh Vashi [ashesh.vashi@enterprisedb.com]
Sent: 14 December 2019 05:52
To: Levitt Olivier
Cc: pgadmin-hackers@postgresql.org
Subject: Re: [Pgadmin] [Docker] servers.json import fails when running in desktop mode

<http://www.linkedin.com/in/asheshvashi>

On Sat, Dec 14, 2019 at 3:53 AM Levitt Olivier <olivier.levitt@insee.fr<mailto:olivier.levitt@insee.fr>> wrote:
Hi,

When running the docker image in desktop mode (PGADMIN_CONFIG_SERVER_MODE=False), no user is created. That is expected behaviour.
But then the code that imports the servers.json pre-configuration fails as it ties the import to the default user.

I think line 40 of entrypoint.sh (https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob;f=pkg/docker/entrypoint.sh;h=47d14bf2d415777c64b221fb1fc75d61c5e3cecc;hb=HEAD) should not specify a user when running in dekstop mode.
I tested it without --user parameter and it successfully imported the servers.json configuration.

Should I submit a patch ? First time contributing to Pgadmin :)
Please do.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company<http://www.enterprisedb.com>


http://www.linkedin.com/in/asheshvashi

Regards,
Olivier Levitt




--
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246