Skip to content
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

feat: agd query vstorage trailing slash for children #8637

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Conversation

turadg
Copy link
Member

@turadg turadg commented Dec 8, 2023

Description

I find myself using agd query vstorage by descending paths and sometimes querying data. Having to go back to the command to change data vs children` is a bit cumbersome.

This adds a path command that queries children if there's a trailing dot and data otherwise. This maintains backwards compatibility with the extant commands for each.

Future work could be to add an option to recursively query down the tree.

Security Considerations

Scaling Considerations

Documentation Considerations

Testing Considerations

Upgrade Considerations

Backwards compatible. Though the recursive option might change the output. Maybe I should change it now to handle that case?

Comment on lines 44 to 45
// if path ends with '/' then remove it
if path[len(path)-1] == '/' {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'/' seems sort of arbitrary for a vstorage path. I'd expect something more coherent to that model, like a trailing '.'. WDYT?

@michaelfig
Copy link
Member

I think I'd prefer a new agd query vstorage path <path-possibly-with-trailing-dot> command to implement this fuzzier behaviour without loosening what data or children do.

@turadg turadg marked this pull request as ready for review December 15, 2023 16:54
@turadg turadg requested a review from michaelfig December 15, 2023 16:54
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for addressing my comments.

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Dec 15, 2023
@mergify mergify bot merged commit 624ac4a into master Dec 15, 2023
67 checks passed
@mergify mergify bot deleted the ta/vstorage-cli branch December 15, 2023 18:28
mhofman pushed a commit that referenced this pull request Feb 18, 2024
feat: agd query vstorage trailing slash for children
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants