Subversion and var/storage

Author Message

Greg McAvoy-Jensen

Friday 06 June 2008 11:33:22 pm

I've read posts about handling var/cache and var/log with svn:ignore. That makes sense. But should var/storage be handled the same way? What makes the most sense?

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Gaetano Giunta

Saturday 07 June 2008 2:41:09 am

It makes sense to svn:ignore var/storage too for the two simple reasons:

- it will grow very big very fast, and putting it in svn will make your svn crawl to a grinding halt - especially if you keep your workspace on windows (not even taking into account a possible antivirus), but on unix too (just svn delete of the var/storage dir when linked to repo over https over internet took me an hour or so)

- as soon as you have made a first copy of your dev server install to a test, integration or production setup, the different installs will diverge as for content present. Devs will create test content in the dev eZ to check out new templates, editors will usually start to fill in real content in the integration or prod installs, etc. Some identical content will be created by hand in both eZP installs, resulting in different files in var/storage

In short: have svn ignore it. When you need to resync your data from eg. prod to dev, copy over at the same time both the db and the storage, and you're done

Principal Consultant International Business
Member of the Community Project Board

Greg McAvoy-Jensen

Saturday 07 June 2008 6:39:53 am

Thanks, Gaetano.

That's what I thought, but wanted to be sure I wasn't missing something since the article (http://ez.no/developer/articles/using_subversion_with_ez_publish) listed var/cache and var/log but not var/storage or simply "var".

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Greg McAvoy-Jensen

Monday 23 June 2008 11:30:45 am

One follow-up question: does this mean that if we're using the ignore property on the var directory, we should never use svn commit from the root ezpublish directory?

I'm new to SVN, and assumed after doing whatever changes I wanted (template override settings, extension design, etc.) I would then just do a svn commit from the root ezpublish directory--but this updates the var directory even with propset ignore. Am I missing something?

And is the same true on the testing and production servers--we should only use svn update on the specific directories we've made changes to? It seems to make us more prone to errors.

Thanks for any thoughts.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Maxime Thomas

Wednesday 26 January 2011 6:02:36 pm

Hi Greg,

Another point you can focus on : some extension are generating data inside the extension and not inside the var directory.

Typically ezfind has its own index under /extensions/ezfind/java/solr/data.

Max

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Gaetano Giunta

Saturday 29 January 2011 2:33:17 am

@maxime a good point. And I think we should in fact fix those extensions,as the 'ez' way is to only have variable data in /var.

Apart form ezfind, any other known offender?

Principal Consultant International Business
Member of the Community Project Board

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:16:09
Script start
Timing: Jan 18 2025 02:16:09
Module start 'layout'
Timing: Jan 18 2025 02:16:09
Module start 'content'
Timing: Jan 18 2025 02:16:10
Module end 'content'
Timing: Jan 18 2025 02:16:10
Script end

Main resources:

Total runtime1.0925 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.0469152.6250
Module start 'layout' 0.00520.0028 741.671939.4453
Module start 'content' 0.00801.0831 781.1172629.3828
Module end 'content' 1.09110.0014 1,410.500020.1641
Script end 1.0925  1,430.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3271160.0002
Check MTime0.00130.1227160.0001
Mysql Total
Database connection0.00060.056010.0006
Mysqli_queries1.019593.3199680.0150
Looping result0.00190.1714660.0000
Template Total1.063597.320.5318
Template load0.00260.240620.0013
Template processing1.060997.105420.5304
Template load and register function0.00010.010310.0001
states
state_id_array0.00100.089710.0010
state_identifier_array0.00110.098920.0005
Override
Cache load0.00230.2088310.0001
Sytem overhead
Fetch class attribute can translate value0.00120.107830.0004
Fetch class attribute name0.00170.156490.0002
XML
Image XML parsing0.00160.142730.0005
class_abstraction
Instantiating content class attribute0.00000.0044120.0000
General
dbfile0.00170.1561300.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs