librelist archives

« back to archive

configuration delayed-loading bug

configuration delayed-loading bug

From:
Ben
Date:
2011-11-29 @ 20:13
Hi there,

I was looking for further implication of the fact that the config is 
loaded so late. (Actually, that you need a MercurialContent and to be able
to load the config, and that the MercurialContent object might needs 
config values from the current_app which is only available inside a 
request.)

I found a trouble occurring at the very first request if the content 
directory is not 'content'. The blog will appear as would be no posts in 
it.

Another one occurs within the setup_theme, where values are read from the 
config, without those one being read (yet) from the repository.

I do, however, have a fix proposal for that [1]. I had to cut the circular
dependency by introducing a new entity. I choose to introduce a function 
(init_config).

Let me know what you think about those.

Oh, by the way, I also updated the doc about the FREEZER_BASE_URL config 
value [2].

Regards,
Ben

[1] https://bitbucket.org/benallard/blohg/changeset/25c061ca7963
[2] https://bitbucket.org/benallard/blohg/changeset/dcefc455c0e2

Re: [blohg] configuration delayed-loading bug

From:
Rafael Martins
Date:
2011-11-29 @ 23:50
On Tue, Nov 29, 2011 at 6:13 PM, Ben <benoit.allard@gmx.de> wrote:
> Hi there,
>
> I was looking for further implication of the fact that the config is 
loaded so late. (Actually, that you need a MercurialContent and to be able
to load the config, and that the MercurialContent object might needs 
config values from the current_app which is only available inside a 
request.)
>
> I found a trouble occurring at the very first request if the content 
directory is not 'content'. The blog will appear as would be no posts in 
it.
>
> Another one occurs within the setup_theme, where values are read from 
the config, without those one being read (yet) from the repository.
>
> I do, however, have a fix proposal for that [1]. I had to cut the 
circular dependency by introducing a new entity. I choose to introduce a 
function (init_config).
>
> Let me know what you think about those.
>
> Oh, by the way, I also updated the doc about the FREEZER_BASE_URL config
value [2].
>
> Regards,
> Ben
>
> [1] https://bitbucket.org/benallard/blohg/changeset/25c061ca7963
> [2] https://bitbucket.org/benallard/blohg/changeset/dcefc455c0e2
>

Thanks Ben,

I'll review them tomorrow.

Regards,

-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/

Re: [blohg] configuration delayed-loading bug

From:
Rafael Martins
Date:
2011-12-03 @ 02:31
On Tue, Nov 29, 2011 at 9:50 PM, Rafael Martins
<rafael@rafaelmartins.eng.br> wrote:
> On Tue, Nov 29, 2011 at 6:13 PM, Ben <benoit.allard@gmx.de> wrote:
>> Hi there,
>>
>> I was looking for further implication of the fact that the config is 
loaded so late. (Actually, that you need a MercurialContent and to be able
to load the config, and that the MercurialContent object might needs 
config values from the current_app which is only available inside a 
request.)
>>
>> I found a trouble occurring at the very first request if the content 
directory is not 'content'. The blog will appear as would be no posts in 
it.
>>
>> Another one occurs within the setup_theme, where values are read from 
the config, without those one being read (yet) from the repository.
>>
>> I do, however, have a fix proposal for that [1]. I had to cut the 
circular dependency by introducing a new entity. I choose to introduce a 
function (init_config).
>>
>> Let me know what you think about those.
>>
>> Oh, by the way, I also updated the doc about the FREEZER_BASE_URL 
config value [2].
>>
>> Regards,
>> Ben
>>
>> [1] https://bitbucket.org/benallard/blohg/changeset/25c061ca7963
>> [2] https://bitbucket.org/benallard/blohg/changeset/dcefc455c0e2
>>
>
> Thanks Ben,
>
> I'll review them tomorrow.
>
> Regards,
>

Okay, I just got the time to review the patches tonight. They are merged now.

Please do not squash commits that you already published, this forces
me to run rebase, and makes the changelog a bit weird. :)

Thanks.

-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/

Re: [blohg] configuration delayed-loading bug

From:
Rafael Martins
Date:
2011-12-03 @ 02:48
On Sat, Dec 3, 2011 at 12:31 AM, Rafael Martins
<rafael@rafaelmartins.eng.br> wrote:
> On Tue, Nov 29, 2011 at 9:50 PM, Rafael Martins
> <rafael@rafaelmartins.eng.br> wrote:
>> On Tue, Nov 29, 2011 at 6:13 PM, Ben <benoit.allard@gmx.de> wrote:
>>> Hi there,
>>>
>>> I was looking for further implication of the fact that the config is 
loaded so late. (Actually, that you need a MercurialContent and to be able
to load the config, and that the MercurialContent object might needs 
config values from the current_app which is only available inside a 
request.)
>>>
>>> I found a trouble occurring at the very first request if the content 
directory is not 'content'. The blog will appear as would be no posts in 
it.
>>>
>>> Another one occurs within the setup_theme, where values are read from 
the config, without those one being read (yet) from the repository.
>>>
>>> I do, however, have a fix proposal for that [1]. I had to cut the 
circular dependency by introducing a new entity. I choose to introduce a 
function (init_config).
>>>
>>> Let me know what you think about those.
>>>
>>> Oh, by the way, I also updated the doc about the FREEZER_BASE_URL 
config value [2].
>>>
>>> Regards,
>>> Ben
>>>
>>> [1] https://bitbucket.org/benallard/blohg/changeset/25c061ca7963
>>> [2] https://bitbucket.org/benallard/blohg/changeset/dcefc455c0e2
>>>
>>
>> Thanks Ben,
>>
>> I'll review them tomorrow.
>>
>> Regards,
>>
>
> Okay, I just got the time to review the patches tonight. They are merged now.
>
> Please do not squash commits that you already published, this forces
> me to run rebase, and makes the changelog a bit weird. :)
>
> Thanks.
>

Ignore my last comment, I messed things here. Repo fixed :)

Thanks


-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/