-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/flux-kvs: Update dir and ls usage #1444
Conversation
Er. not sure this looks right:
|
src/cmd/flux-kvs.c
Outdated
&& (ptr = strchr (nkey, '/'))) { | ||
/* No key suffix, decorate with default '.' */ | ||
if (*(ptr + 1) == '\0') | ||
strcat (nkey, "."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you decorate with .
here, is that resulting in an extra .
when the keys are actually printed in dir
? e.g. I'm seeing:
$ flux kvs put ns:foo/bar=none
$ flux kvs dir ns:foo/
ns:foo/..bar = none
The /..
might confusing people. I would assume we'd want the same output as we used to put the key in the first place, i.e. ns:foo/bar = none
-- leading dots stripped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as you are in here, I wonder if a fix for this issue would also fix #1391? For some reason I find this awkward:
$ flux kvs dir resource.
resource..hwloc.
Possibly just stripping all trailing .
from "key" will help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops sorry, @garlick beat me to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that is issue #1391. I was going to fix it separately.
Codecov Report
@@ Coverage Diff @@
## master #1444 +/- ##
=========================================
Coverage ? 78.76%
=========================================
Files ? 163
Lines ? 30208
Branches ? 0
=========================================
Hits ? 23792
Misses ? 6416
Partials ? 0
|
Either way. I suppose together in one pr is slightly preferable.
…On Tue, Apr 10, 2018, 2:14 PM Al Chu ***@***.***> wrote:
@garlick <https://github.com/garlick> The double period is issue #1391
<#1391>, was going to
fix that issue separately. But could merge in here if that's what's desired.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1444 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKX2xb-jjdG0IGDzFltKZNwyl5ZpKVWks5tnSCbgaJpZM4TO-Cu>
.
|
With the dir and ls commands in flux-kvs, if a user specifies a namespace prefix without a key, assume the user desires the root (i.e. ".") directory within that namespace. Update/adjust unit tests appropriately. Fixes flux-framework#1434
Fix output corner cases where double periods or errant additional period could be output. Fixes flux-framework#1391
Also adjust older tests to remove double periods.
Just pushed update w/ period output corner case fixes. It fixes both the double period output case an an extraneous period output corner case that I found along the way. Lots of unit tests added. Also added in dumb patch in which I remove a duplicate test. |
hit a
which I think is #1311. Restarted builder. |
Better!
Hmm, what about this one?
|
I would say this is a different bug, where we have to decide if we want to "normalize" a users input before output. We didn't do that before.
Is this a change we want to do? I think that it should be different issue though. |
I'm going to create a new issue for the above case, as I feel its separate from this PR and has a few things to consider. |
Sounds good. I'll go ahead and merge this. Thanks! |
With the dir and ls commands in flux-kvs, if a user specifies a
namespace prefix without a key, assume the user desires the root
(i.e. ".") directory within that namespace.
Update/adjust unit tests appropriately.
Fixes #1434