Re: [pgAdmin4][RM#3139] Create proper template path if Windows

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][RM#3139] Create proper template path if Windows
Date: 2018-03-13 16:45:27
Message-ID: CA+OCxow2Vm3naG8FbiRhudw+23=TwZQKVE6iTDiukDdTEr6P=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, applied.

On Tue, Mar 13, 2018 at 9:27 AM, Murtuza Zabuawala <
murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:

> Hi Dave,
>
> Please find updated patch which Joao sent along with RM#3139 fix.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> On Tue, Mar 13, 2018 at 6:24 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I have already replied on another thread regarding the failure of these
>> tests, Joao has already sent a patch for the same.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Tue, Mar 13, 2018 at 6:20 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>> And... reverted. It seems this makes Jenkins very unhappy.
>>>
>>> On Tue, Mar 13, 2018 at 7:58 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>
>>>> OK, thanks. Patch applied.
>>>>
>>>> On Tue, Mar 13, 2018 at 12:32 AM, Murtuza Zabuawala <
>>>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> We are not joining template path with os.path.join because we are
>>>>> passing prefix paths in render_template(..) at many places,
>>>>> we are passing them as below,
>>>>>
>>>>> Some of examples,
>>>>>
>>>>> render_template(
>>>>> "exclusion_constraint/js/exclusion_constraint.js",
>>>>> _=_
>>>>> ),
>>>>>
>>>>> recovery_check_sql = render_template(
>>>>> "connect/sql/#{0}#/check_recovery.sql".format(postgres_versi
>>>>> on))
>>>>>
>>>>> sql = render_template(
>>>>> "/servers/sql/#{0}#/stats.sql".format(manager.version),
>>>>> conn=conn, _=gettext
>>>>> )
>>>>>
>>>>> sql = render_template(
>>>>> "/".join([self.template_path, 'create.sql']),
>>>>> data=data, conn=self.conn
>>>>> )
>>>>>
>>>>> def csssnippets(self):
>>>>> """
>>>>> Returns a snippet of css to include in the page
>>>>> """
>>>>> snippets = [render_template("css/servers.css")]
>>>>>
>>>>>
>>>>> So again it will conflict if use os.path.join, To make it consistent
>>>>> with render_template(...) and VersionedTemplateLoader(..) class we
>>>>> opt'd for this mechanism.
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Murtuza Zabuawala
>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>>
>>>>> On Tue, Mar 13, 2018 at 6:11 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> On Mon, Mar 12, 2018 at 10:15 AM, Murtuza Zabuawala <
>>>>>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> PFA patch to correct the template path generation logic incase of
>>>>>>> Windows system.
>>>>>>>
>>>>>>
>>>>>> Seems like it would be better to fix it the other way round to me -
>>>>>> e.g. update the template loader to use os.path.join.
>>>>>>
>>>>>> Any reason not to do that?
>>>>>>
>>>>>> --
>>>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> 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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Joao De Almeida Pereira 2018-03-13 18:19:02 Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190)
Previous Message Dave Page 2018-03-13 16:45:20 pgAdmin 4 commit: Fix template paths for Windows. Fixes #3139