<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 27, 2018 at 8:47 AM, Amar Tumballi <span dir="ltr"><<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Aug 22, 2018 at 12:35 PM, Amar Tumballi <span dir="ltr"><<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Hi All,</p><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Below is an update about the project’s move towards using clang-formatter for imposing few coding-standards.</p><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Gluster project, since inception followed certain basic coding standard, which was (at that time) easy to follow, and easy to review.</p><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Over the time, with inclusion of many more developers and working with other communities, as the coding standards are different across projects, we got different type of code into source. After 11+years, now is the time we should be depending on tool for it more than ever, and hence we have decided to depend on clang-formatter for this.</p><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Below are some highlights of this activity. We expect each of you to actively help us in this move, so it is smooth for all of us.</p><ul class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;padding-left:2em;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial"><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box">We kickstarted this activity sometime around<span> </span><a href="https://bugzilla.redhat.com/show_bug.cgi?id=1564149" style="box-sizing:border-box;background-color:transparent;color:rgb(51,122,183);text-decoration:none" target="_blank">April 2018</a></li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">There was a repo created for trying out the options, and validating the code.<span> </span><a href="https://github.com/nigelbabu/clang-format-sample" style="box-sizing:border-box;background-color:transparent;color:rgb(51,122,183);text-decoration:none" target="_blank">Link to Repo</a></li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">Now, with the latest<span> </span><code style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;padding:0.2em 0px;background-color:rgba(0,0,0,0.04);border-radius:3px;margin:0px;color:inherit">.clang-format</code><span> </span>file, we have made the whole GlusterFS codebase changes.<span> </span><a href="https://github.com/nigelbabu/glusterfs" style="box-sizing:border-box;background-color:transparent;color:rgb(51,122,183);text-decoration:none" target="_blank">The change here</a></li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">We will be running regression with the changes, multiple times, so we don’t want to miss something getting in without our notice.</li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">As it is a very big change (Almost 6 lakh lines changed), we will not put this commit through gerrit, but directly pushing to the repo.</li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">Once this patch gets in (ETA: 28th August), all the pending patches needs to go through rebase.</li></ul><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial"></p></div></blockquote><div><br></div></span><div>All, as Shyam has proposed to change the branch out date for release-5.0 as Sept 10th [1], we are now targeting Sept 7th for this activity.</div><div><br></div></div></div></div></blockquote><div><br></div><div>We are finally Done!</div><div><br></div><div>We delayed in by another 4 days to make sure we pass the regression properly with clang changes, and it doesn't break anything.</div><div><br></div><div>Also note, from now, it is always better to format the changes with below command before committing.</div><div><br></div><div> sh$ cd glusterfs-git-repo/</div><div> sh$ clang-format -i $(list_of_files_changed)</div><div> sh$ git commit # and usual steps to publish your changes.</div><div><br></div><div>Also note, all the changes which were present earlier, needs to be rebased with clang-format too.</div><div><br></div><div>One of the quick and dirty way to get your changes rebased in the case if your patch is significantly large, is by applying the patches on top of the commit before the clang-changes, and copy the files over, and run clang-format -i on them, and checking the diff. As no code other coding style changes happened, this should work fine.</div><div><br></div><div>Please post if you have any concerns.</div><div><br></div><div>Regards,</div><div>Amar</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>[1] - <a href="https://lists.gluster.org/pipermail/gluster-devel/2018-August/055308.html" target="_blank">https://lists.gluster.org/<wbr>pipermail/gluster-devel/2018-<wbr>August/055308.html</a></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">What are the next steps:</p><ul class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;padding-left:2em;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial"><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box">The<span> </span><a href="https://review.gluster.org/#/c/glusterfs/+/20892" style="box-sizing:border-box;background-color:transparent;color:rgb(51,122,183);text-decoration:none" target="_blank">patch</a><span> </span>of adding<span> </span><code style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;padding:0.2em 0px;background-color:rgba(0,0,0,0.04);border-radius:3px;margin:0px;color:inherit">.clang-format</code><span> </span>file will get in first</li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">Nigel/Infra team will be keeping<span> </span><a href="https://github.com/nigelbabu/glusterfs" style="box-sizing:border-box;background-color:transparent;color:rgb(51,122,183);text-decoration:none" target="_blank">the repo</a><span> </span>with all files changed open for review till EOD 27th August, 2018</li></ul></div></blockquote></span><div>This changes to 05th Sept, 2018</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><ul class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;padding-left:2em;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial"><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">Upon passing regression, we will push this one change to main branch.</li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">After that, we will have a smoke job to validate the coding standard as per the<span> </span><code style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;padding:0.2em 0px;background-color:rgba(0,0,0,0.04);border-radius:3px;margin:0px;color:inherit">.clang-format</code><span> </span>file, which will vote -1 if it is not meeting the standard.</li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">There will be guidelines about how to setup your own .clang-format setup, so while sending the patch, it gets posted in proper format<ul style="box-sizing:border-box;margin-top:0px;margin-bottom:0px;padding-left:2em"><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box">This will be provided for both<span> </span><code style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;padding:0.2em 0px;background-color:rgba(0,0,0,0.04);border-radius:3px;margin:0px;color:inherit">./rfc.sh</code><span> </span>and<span> </span><code style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;padding:0.2em 0px;background-color:rgba(0,0,0,0.04);border-radius:3px;margin:0px;color:inherit">git review</code><span> </span>users.</li></ul></li><li class="m_5419763478846715308gmail-m_2009078242492793560gmail-" style="box-sizing:border-box;margin-top:0.25em">Having clang-formatter installed would be still optional, but there would be high chance the smoke would fail if not formatted right.</li></ul><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Any future changes to coding standard, due to improvements in clang-format tool itself, or due to developers believing some other option is better suited, can be getting in through gerrit.</p><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Also note that, we will not be applying the changes to<span> </span><code style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;padding:0.2em 0px;background-color:rgba(0,0,0,0.04);border-radius:3px;margin:0px;color:inherit">contrib/</code><span> </span>directory, as that is expected to be same as corresponding upstream coding standard of particular project. We believe that helps to make sure we can quickly check the <span style="letter-spacing:0.35px">diff with corresponding changes really easily.</span></p><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Happy to hear any feedback!</p><p class="m_5419763478846715308gmail-m_2009078242492793560gmail-part" style="box-sizing:border-box;margin:0px 0px 16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;text-decoration-style:initial;text-decoration-color:initial">Regards,<br style="box-sizing:border-box">Amar (on behalf of many Gluster Maintainers)</p><br clear="all"><div><br></div>
</div>
</blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_5419763478846715308gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</div></div>