<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Sun Feb 11 23:47:30 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>[BUILD-1030] New look at tooling for assessing quality of PRs</title>
                <link>https://jira.magnolia-cms.com/browse/BUILD-1030</link>
                <project id="10330" key="BUILD">Build</project>
                    <description>&lt;p&gt;As we nowdays automatically deploy to the SaaS anything we merge to master, we need to better check the quality of the code. We can&apos;t enforce something like a JaCoCo threshold due to amount of untested code. What we&apos;re looking for instead is PR-level validation. Here are a couple of options:&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;bitbucketcodecoverage&quot;&gt;&lt;/a&gt;bitbucket-code-coverage&lt;/h3&gt;

&lt;p&gt;The easiest to roll out solution I&apos;ve seen. Using JaCoCo reports as material, it annotates the code to highlight tested/untested lines of code. This only requires a Bitbucket server plugin and running the following commands:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
mvn clean verify -Penable-code-coverage jacoco:report

mvn com.atlassian.bitbucket:code-coverage-maven-plugin:publish \
&#160; &#160; -Dbitbucket.url=https:&lt;span class=&quot;code-comment&quot;&gt;//git.magnolia-cms.com \
&lt;/span&gt;  &#160; -Dbitbucket.user=mmichel \
&#160; &#160; -Dbitbucket.password=$LDAP_PSWD \
&#160; &#160; -Dbitbucket.commit.id=8e3839923cb1434dcf320e1c9115676d206ef081 \
&#160; &#160; -Dcoverage.file=magnolia-core/target/site/jacoco/jacoco.xml \
&#160; &#160; -Dcoverage.format=JACOCO&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Source: &lt;a href=&quot;https://bitbucket.org/atlassian/bitbucket-code-coverage/src/master/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bitbucket.org/atlassian/bitbucket-code-coverage/src/master/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Problem: this isn&apos;t helpful in the sense that it doesn&apos;t validate the PR with a yes/no answer to the question of whether the quality is sufficient. As agreed to in the March 21st&apos; architecture meeting, it&apos;s anyway another tool in the toolbox, we might as well give it a try.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;Bitbucketcodeinsights&quot;&gt;&lt;/a&gt;Bitbucket code insights&lt;/h3&gt;

&lt;p&gt;Already built into Bitbucket is an API to which we can post checks of any nature about the code: &lt;a href=&quot;https://confluence.atlassian.com/bitbucketserver/code-insights-966660485.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://confluence.atlassian.com/bitbucketserver/code-insights-966660485.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is (I assume) what is used by professional tools such as Sonarqube. However, because it&apos;s a REST API, nothing prevents us from pushing simpler reports/metrics into it: test coverage, Snyk report, style, etc.&lt;/p&gt;

&lt;p&gt;The downside is that it will require inhouse development work &amp;amp; maintenance. It will also never match Sonarqube&apos;s own insights.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;jacocoreportGitHubaction&quot;&gt;&lt;/a&gt;jacoco-report GitHub action&lt;/h3&gt;

&lt;p&gt;Using the Jacoco data and a bit of tinkering, as well as the Bitbucket code insights, it is possible to calculate the coverage for the PR&apos;s changed files. This coverage can then be compared to a limit, and fail the PR if deemed insufficient.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/Madrapps/jacoco-report&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/Madrapps/jacoco-report&lt;/a&gt; as well as attached screenshot for Bitbucket Server rendering&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
curl -u mmichel:$LDAP_PSWD --request PUT &lt;span class=&quot;code-quote&quot;&gt;&apos;https:&lt;span class=&quot;code-comment&quot;&gt;//git.magnolia-cms.com/&lt;span class=&quot;code-keyword&quot;&gt;rest&lt;/span&gt;/insights/latest/projects/PLATFORM/repos/main/commits/8e3839923cb1434dcf320e1c9115676d206ef081/reports/test-report-1&apos;&lt;/span&gt; \
&lt;/span&gt;--header &lt;span class=&quot;code-quote&quot;&gt;&apos;Content-Type: application/json&apos;&lt;/span&gt; \
--data-raw &apos;{
&#160; &#160; &lt;span class=&quot;code-quote&quot;&gt;&quot;title&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;Coverage PR quality check&quot;&lt;/span&gt;,
&#160; &#160; &lt;span class=&quot;code-quote&quot;&gt;&quot;details&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;This checks evaluates whether coverage on changed files is sufficient.&quot;&lt;/span&gt;,
&#160; &#160; &lt;span class=&quot;code-quote&quot;&gt;&quot;result&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;FAIL&quot;&lt;/span&gt;,
&#160; &#160; &lt;span class=&quot;code-quote&quot;&gt;&quot;data&quot;&lt;/span&gt;: [
&#160; &#160; &#160; &#160; { &lt;span class=&quot;code-quote&quot;&gt;&quot;title&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;Number&lt;/span&gt; of analysed files&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;NUMBER&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;value&quot;&lt;/span&gt;: 1 },
&#160; &#160; &#160; &#160; { &lt;span class=&quot;code-quote&quot;&gt;&quot;title&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;Coverage on changed files&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;PERCENTAGE&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;value&quot;&lt;/span&gt;: 80 },
&#160; &#160; &#160; &#160; { &lt;span class=&quot;code-quote&quot;&gt;&quot;title&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;Safe to merge?&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;BOOLEAN&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;value&quot;&lt;/span&gt;: &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; }
&#160; &#160; ],
&#160; &#160; &lt;span class=&quot;code-quote&quot;&gt;&quot;reporter&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;Foundation&quot;&lt;/span&gt;
}&apos;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;&lt;a name=&quot;Sonarqube&quot;&gt;&lt;/a&gt;Sonarqube&lt;/h3&gt;

&lt;p&gt;We have already looked into rolling Sonarqube. It&apos;s likely a popular name on the market for a good reason, however, we&apos;ve found it expensive per line of code. Also, it will need to be adapted to our code style.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;would the price be lower if we ran it ourselves? As we use Bitbucket server, we have no choice but to deploy it ourselves, actually.&lt;/li&gt;
	&lt;li&gt;can it run exclusively on pull requests, dramatically lowering the lines of code it&apos;s scanning, vastly reducing the price? Yes, but no impact pricing.&lt;/li&gt;
	&lt;li&gt;that being said I have pulled our most critical repositories (as defined by: is a dependency of SaaS webapp) and the total lines of java code valid for Sonar is 230k, which is only $100 a month. We would likely start with the $12/month plan, but, even if we scaled, it would be totally acceptable (assuming developers like the added value)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Conclusion: we roll out SonarQube.&lt;/p&gt;</description>
                <environment></environment>
        <key id="129464">BUILD-1030</key>
            <summary>New look at tooling for assessing quality of PRs</summary>
                <type id="3" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10898&amp;avatarType=issuetype">Task</type>
                                            <priority id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/neutral.gif">Neutral</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="11">Done</resolution>
                                        <assignee username="mmichel">Maxime Michel</assignee>
                                    <reporter username="mmichel">Maxime Michel</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Mar 2023 10:52:53 +0100</created>
                <updated>Tue, 28 Mar 2023 14:27:33 +0200</updated>
                            <resolved>Tue, 28 Mar 2023 14:27:32 +0200</resolved>
                                                                        <due></due>
                            <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="349204" author="mmichel" created="Wed, 22 Mar 2023 10:41:33 +0100"  >&lt;p&gt;Just added two screenshots to show another type of check running on some PRs that I found out by chance.&lt;/p&gt;</comment>
                            <comment id="350155" author="mmichel" created="Tue, 28 Mar 2023 12:45:30 +0200"  >&lt;p&gt;Just added a screenshot of the type of enforcing Sonar will do on PRs. It&apos;s effectively enforcing coverage (without us having to do the implementation described above) but at the same time also evaluating security, technical debt, etc. It&apos;s great!&lt;/p&gt;</comment>
                            <comment id="350178" author="mmichel" created="Tue, 28 Mar 2023 14:27:33 +0200"  >&lt;p&gt;Going with SonarQube makes the most sense. See linked tickets for progress.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>relation</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="109617">MGNLTEST-215</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="109603">MGNLTEST-213</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="109366" name="Screenshot 2023-03-20 at 15.11.46.png" size="104230" author="mmichel" created="Mon, 20 Mar 2023 15:14:08 +0100"/>
                            <attachment id="109422" name="Screenshot 2023-03-22 at 10.40.41.png" size="64154" author="mmichel" created="Wed, 22 Mar 2023 10:41:05 +0100"/>
                            <attachment id="109423" name="Screenshot 2023-03-22 at 10.40.51.png" size="126934" author="mmichel" created="Wed, 22 Mar 2023 10:41:05 +0100"/>
                            <attachment id="109655" name="Screenshot 2023-03-28 at 12.42.14.png" size="84598" author="mmichel" created="Tue, 28 Mar 2023 12:43:26 +0200"/>
                    </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_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_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>mmichel</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            45 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>mmichel</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|y09e5u:</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_14167" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Task DoR</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_12430" key="com.atlassian.teams:rm-teams-custom-field-team">
                        <customfieldname>Team</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[30]]></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_13933" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Urgency (resolution)</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15724"><![CDATA[Normal]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>