<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:26:37 UTC 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>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-16392] Bash completion regressions, lctl and lfs</title>
                <link>https://jira.whamcloud.com/browse/LU-16392</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;There are a few regressions introduced in the bash completions for &lt;tt&gt;lctl&lt;/tt&gt; and &lt;tt&gt;lfs&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;1. Attempting completion for &lt;tt&gt;lctl&lt;/tt&gt; prints a message to stderr and does not generate any completions. To test this behavior interactively, type &lt;tt&gt;lctl &amp;lt;tab&amp;gt;&lt;/tt&gt;. To test this behavior programmatically, run&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-bash&quot;&gt;
source lustre/scripts/bash-completion/lustre; COMPLETIONS=$( _lustre_cmds lctl) &amp;amp;&amp;amp; [ ! -z &lt;span class=&quot;code-quote-red&quot;&gt;&quot;&lt;span class=&quot;code-object&quot;&gt;$COMPLETIONS&lt;/span&gt;&quot;&lt;/span&gt; ]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;An exit status of 1 indicates the bug is present.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;2. Completion for &lt;tt&gt;lfs check&lt;/tt&gt; gives incorrect results.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;3. Attempting completion for &lt;tt&gt;lfs find -component-flags&lt;/tt&gt; erroneously prints a message to stderr.&lt;/p&gt;</description>
                <environment></environment>
        <key id="73612">LU-16392</key>
            <summary>Bash completion regressions, lctl and lfs</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="bertschinger">Thomas Bertschinger</assignee>
                                    <reporter username="bertschinger">Thomas Bertschinger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2022 17:58:54 +0000</created>
                <updated>Thu, 7 Dec 2023 11:12:34 +0000</updated>
                            <resolved>Fri, 3 Feb 2023 14:05:26 +0000</resolved>
                                    <version>Lustre 2.16.0</version>
                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="356443" author="adilger" created="Wed, 14 Dec 2022 16:47:13 +0000"  >&lt;p&gt;It looks like this is a regression from patch &lt;a href=&quot;https://review.whamcloud.com/47162&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/47162&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8621&quot; title=&quot;Parser_execarg() prints help to stderr, usage to stdout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8621&quot;&gt;&lt;del&gt;LU-8621&lt;/del&gt;&lt;/a&gt; utils: cmd help to stdout or short cmd error&lt;/tt&gt;&quot;&lt;/p&gt;</comment>
                            <comment id="356451" author="adilger" created="Wed, 14 Dec 2022 17:04:18 +0000"  >&lt;p&gt;Thomas, thanks for your bug report. Any chance you could investigate how to change bash completion to call &quot;&lt;tt&gt;lctl --list-commands&lt;/tt&gt;&quot; to generate to command list instead of just a null input?&lt;/p&gt;

&lt;p&gt;Otherwise, it should be possible to revert the above patch to restore the basic functionality, with the accompanying spew of lines for any error (which is why it was changed originally).&lt;/p&gt;</comment>
                            <comment id="356457" author="adilger" created="Wed, 14 Dec 2022 17:51:24 +0000"  >&lt;blockquote&gt;
&lt;p&gt;To test this behavior programmatically, run:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;source lustre/scripts/bash-completion/lustre; COMPLETIONS=$( _lustre_cmds lctl) &amp;amp;&amp;amp; [ ! -z &quot;$COMPLETIONS&quot; ]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;Thanks for this. I was wondering how we might be able to write a regression test for this without having interactive usage. &lt;/p&gt;</comment>
                            <comment id="356461" author="JIRAUSER18444" created="Wed, 14 Dec 2022 18:37:54 +0000"  >&lt;p&gt;I considered resolving this by using &lt;tt&gt;lctl --list-commands&lt;/tt&gt;, but there are two problems:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;tt&gt;--list-commands&lt;/tt&gt; truncates long options, thus generating incorrect completions (example: &lt;tt&gt;changelog_deregister)&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;lctl --list-commands&lt;/tt&gt; lists options for sub-commands which do not apply to the top-level command, and I don&apos;t know how to work around this within the bash completion interface (example: &lt;tt&gt;lctl pcc add&lt;/tt&gt;: bash would suggest both &lt;tt&gt;pcc&lt;/tt&gt; and &lt;tt&gt;add&lt;/tt&gt; as completions)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I have a patch in progress that adds an option &lt;tt&gt;--list-commands-brief&lt;/tt&gt; which prints out subcommands without the above two problems. This has the advantage of not changing existing behavior of the CLI tools, but the disadvantage is adding a new, perhaps superfluous option. What do you think of this idea? An alternative would be modifying the format of &lt;tt&gt;lctl --list-commands&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Note, in this bug report I only mentioned &lt;tt&gt;lctl&lt;/tt&gt; but this problem applies to &lt;tt&gt;lfs&lt;/tt&gt; as well.&lt;/p&gt;</comment>
                            <comment id="356478" author="adilger" created="Wed, 14 Dec 2022 20:01:09 +0000"  >&lt;p&gt;I was looking at the command truncation issue as well. It looks like we are out by only a character or two in a few rare cases.  It would be better to misalign the output by a few characters to fit in the longest options I think, rather than creating a new option. &lt;/p&gt;</comment>
                            <comment id="356480" author="adilger" created="Wed, 14 Dec 2022 20:08:07 +0000"  >&lt;p&gt;For the sub-commands, is it possible to list only the top-level command, and then add eg. &quot;&lt;tt&gt;lctl pcc &amp;#45;&amp;#45;list&amp;#45;commands&lt;/tt&gt;&quot; to generate the list of sub commands for the completion (ie. it passes the sub-command as well, not just &quot;&lt;tt&gt;lctl &amp;#45;&amp;#45;list&amp;#45;commands&lt;/tt&gt;&quot;).?&lt;/p&gt;

&lt;p&gt;Also, in a semi-related note, I&apos;m not sure why &quot;&lt;tt&gt;&amp;#45;&amp;#45;list&amp;#45;commands&lt;/tt&gt;&quot; was used here instead of using &quot;&lt;tt&gt;&amp;#45;&amp;#45;help&lt;/tt&gt;&quot; to get this list, but it would be good to allow both (though &quot;&lt;tt&gt;&amp;#45;&amp;#45;list&amp;#45;commands&lt;/tt&gt;&quot; should be used for the completions since it has existed much longer).&lt;/p&gt;</comment>
                            <comment id="357206" author="gerrit" created="Thu, 22 Dec 2022 00:20:53 +0000"  >&lt;p&gt;&quot;Thomas Bertschinger &amp;lt;bertschinger@lanl.gov&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49484&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49484&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16392&quot; title=&quot;Bash completion regressions, lctl and lfs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16392&quot;&gt;&lt;del&gt;LU-16392&lt;/del&gt;&lt;/a&gt; utils: use --list-commands for bash completion&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 7c02a52fd57e2a0fa7e35c6cf3dad16ba12cb8d1&lt;/p&gt;</comment>
                            <comment id="357747" author="pjones" created="Tue, 3 Jan 2023 15:41:35 +0000"  >&lt;p&gt;Does not affect b2_15- just master&#160;&lt;/p&gt;</comment>
                            <comment id="361480" author="gerrit" created="Fri, 3 Feb 2023 06:50:56 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49484/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49484/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16392&quot; title=&quot;Bash completion regressions, lctl and lfs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16392&quot;&gt;&lt;del&gt;LU-16392&lt;/del&gt;&lt;/a&gt; utils: use --list-commands for bash completion&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: b4cc570ad11c1c07a6e1d825787ccc62c1245ca1&lt;/p&gt;</comment>
                            <comment id="361519" author="pjones" created="Fri, 3 Feb 2023 14:05:26 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="25084">LU-5170</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="39886">LU-8621</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="58033">LU-13225</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="56855">LU-12734</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12688">LU-930</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i037v3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

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