<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 04:11:35 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MAGNOLIA-6130] Revisit use case and approach for observing resource changes on classpath</title>
                <link>https://jira.magnolia-cms.com/browse/MAGNOLIA-6130</link>
                <project id="10000" key="MAGNOLIA">Magnolia</project>
                    <description>&lt;p&gt;We need to restore classpath observation before going final. This was made a blocker in terms of priority. See comment from May 6 for the status on that.&lt;/p&gt;

&lt;p&gt;&amp;#8211; old description&lt;/p&gt;

&lt;p&gt;We should revisit and &lt;b&gt;simplify&lt;/b&gt; the &lt;tt&gt;ClasspathWatcher&lt;/tt&gt;, in particular:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;we are concerned about performance&lt;/li&gt;
	&lt;li&gt;we are not sure this is strictly necessary&lt;/li&gt;
	&lt;li&gt;we &lt;em&gt;could&lt;/em&gt; try to find another library/util to do that better? e.g.
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;silly example &lt;tt&gt;JRebelClassChangeNotifier&lt;/tt&gt; in freemarker&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;https://github.com/ronmamo/reflections&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/ronmamo/reflections&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Guava&apos;s &lt;tt&gt;com.google.common.reflect.ClassPath&lt;/tt&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;thread mgmt&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Additionally, currently we spawn one thread per &lt;tt&gt;ClasspathOrigin&lt;/tt&gt; instance we have, i.e. per &lt;tt&gt;YamlConfigurationSource&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;We should extract &lt;tt&gt;ClasspathWatcher&lt;/tt&gt; and add a &lt;tt&gt;ClasspathWatcherService&lt;/tt&gt; to manage a single thread.&lt;/p&gt;</description>
                <environment></environment>
        <key id="43768">MAGNOLIA-6130</key>
            <summary>Revisit use case and approach for observing resource changes on classpath</summary>
                <type id="2" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10891&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="1" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/blocker.svg">Blocker</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="mgeljic">Mika&#235;l Gelji&#263;</assignee>
                                    <reporter username="mmuehlebach">Michael M&#252;hlebach</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Mar 2015 15:15:52 +0100</created>
                <updated>Sun, 7 Jun 2015 15:54:58 +0200</updated>
                            <resolved>Fri, 5 Jun 2015 11:37:50 +0200</resolved>
                                                    <fixVersion>5.4</fixVersion>
                                    <component>configuration</component>
                    <component>resource-loader</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="103458" author="mgeljic" created="Wed, 6 May 2015 10:55:42 +0200"  >&lt;p&gt;Gave a shot to a so-called &lt;tt&gt;ClasspathScanner&lt;/tt&gt; + service based on the reflections library (same as we use as one-shot in &lt;tt&gt;ClasspathOrigin&lt;/tt&gt;.&lt;br/&gt;
As much as initial scan was fairly fast (few hundreds ms), iterating over all such classpath resources to find out which ones were modified took 2 plain seconds.&lt;br/&gt;
As a result we disabled watching the classpath for now&#8212;by the time we reevaluate the use case and how we want to address it.&lt;/p&gt;

&lt;p&gt;a. Either we can dramatically reduce the time for checking last-modified date (filtering out the amount of resources to be iterated over)&lt;br/&gt;
b. Either we rely on hot-deployment of the IDE, and need to come up with lazy definition providers, that would re-resolve bean upon each &lt;tt&gt;get()&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Rephrasing/moving to a standalone issue.&lt;/p&gt;</comment>
                            <comment id="104904" author="mgeljic" created="Wed, 27 May 2015 10:56:08 +0200"  >&lt;p&gt;Raised prio to blocker. Two options:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;In worst case, we revive the old classpath observation, as &quot;ugly&quot; as it may be&#8212;it&apos;s only gonna be running in dev mode anyway.&lt;/li&gt;
	&lt;li&gt;In best case, we invest a bit in option b. mentioned in my comment above.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="104909" author="gjoseph" created="Wed, 27 May 2015 11:05:12 +0200"  >&lt;p&gt;3rd option:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;we hook into jrebel - &lt;a href=&quot;http://zeroturnaround.com/software/jrebel/learn/jrebel-plugins/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://zeroturnaround.com/software/jrebel/learn/jrebel-plugins/&lt;/a&gt; (there actually is a jrebel-magnolia plugin, i&apos;ll check on the status)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Option b. is imo a waste of energy, since it&apos;ll only add value for definitions we already know about (no add, no delete)&lt;/p&gt;

&lt;p&gt;Time to check the last-modified dates might be reduced with &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-6219&quot; title=&quot;ClasspathOrigin: filter resources out; expose mgnl-resources&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-6219&quot;&gt;&lt;del&gt;MAGNOLIA-6219&lt;/del&gt;&lt;/a&gt;, and further by &quot;caching&quot; it in the CRP at scan time, rather than retrieving it every time.&lt;/p&gt;

&lt;p&gt;Additionally, let&apos;s not forget there are other issues such as &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-6223&quot; title=&quot;Provide proper API for resource change communication&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-6223&quot;&gt;&lt;del&gt;MAGNOLIA-6223&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-6215&quot; title=&quot;YAML configuration not removed or de-registered after physical removal&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-6215&quot;&gt;&lt;del&gt;MAGNOLIA-6215&lt;/del&gt;&lt;/a&gt; which would impact this. If the focus of 5.4 is on front-end devs, java-free modules, etc, those 2 seem more relevant than the classpath observation.&lt;/p&gt;</comment>
                            <comment id="104919" author="pbaerfuss" created="Wed, 27 May 2015 11:42:35 +0200"  >&lt;p&gt;The front-end focus lead to the decision to prioritise config by files and for the YAML format. But the new configuration will be used by existing magnolia developers as well. It was also the priority to make configuration easier for everybody. It needs to work and ideally without needing a jrebel license. This is really a blocker for me.&lt;/p&gt;</comment>
                            <comment id="105728" author="mgeljic" created="Fri, 5 Jun 2015 11:37:50 +0200"  >&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Using &lt;tt&gt;ClasspathScanner&lt;/tt&gt; component through service, similarily &lt;em&gt;Reflections&lt;/em&gt;-based as &lt;tt&gt;ClasspathOrigin&lt;/tt&gt;&apos;s initial collection
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;though using much stricter filtering (YAML files only), see &lt;tt&gt;ClasspathOrigin#observedResourcesPattern()&lt;/tt&gt; to save time on costly last-modified checks&lt;/li&gt;
		&lt;li&gt;scheduled with a delay of 10s between every execution&lt;/li&gt;
		&lt;li&gt;naively checking if last-modified dates are greater than that of last-scan&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Service is enabled only if &lt;tt&gt;magnolia.develop=true&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;LegacyClasspathOrigin&lt;/tt&gt; does not implement such watching, in particular as it&apos;s not meant to contain any config file&lt;/li&gt;
	&lt;li&gt;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.magnolia-cms.com/images/icons/emoticons/warning.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; have to disable shunting loggers in &lt;tt&gt;ClasspathOriginTests&lt;/tt&gt;, not reliable at present&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>relation</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="45626">MAGNOLIA-6244</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>magnolia-cms.com</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 19 Mar 2015 09:01:54 +0100</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10246" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>BL-211</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mmuehlebach</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 37 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gjoseph</customfieldvalue>
            <customfieldvalue>mmuehlebach</customfieldvalue>
            <customfieldvalue>mgeljic</customfieldvalue>
            <customfieldvalue>pbaerfuss</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i04s9j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>