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

Limit for attributes is applied before the max-depth filter #34

Closed
kayrus opened this issue May 25, 2019 · 4 comments
Closed

Limit for attributes is applied before the max-depth filter #34

kayrus opened this issue May 25, 2019 · 4 comments
Assignees

Comments

@kayrus
Copy link
Contributor

kayrus commented May 25, 2019

Examples:

$ hermesctl attributes action -l5
update
update/add/security-group
create
delete
create/role_assignment
$ hermesctl attributes action --max-depth 1 -l 3
update
create
$ hermesctl attributes action  --max-depth 2 -l 3
update
update/add
create
$ hermesctl attributes action --max-depth 1 -l 10
update
create
delete
read
$ hermesctl attributes action --max-depth 1
update
create
delete
read
stop
allow
disable
deny
restore
start

I assume that the limit should be applied after the max-depth filter.

@notque notque self-assigned this Jun 7, 2019
@notque
Copy link
Contributor

notque commented Jun 7, 2019

Will look to spend some time on this shortly.

@notque
Copy link
Contributor

notque commented Jun 25, 2019

Max depth isn't a filter, it's an indication that you want to split out events into composite parts of the hirearchy. This is used with elektra to allow you to explore the events based on the parts.

If you placed limited after the max depth, it wouldn't make any sense as you'd end up cutting off parts of the hirearchy. You're limiting the number of events that are returned, not the parts of the hirearchy that would come back.

Does this make sense?

@kayrus
Copy link
Contributor Author

kayrus commented Jun 26, 2019

this is not an expected behavior, but your explanation makes sense. thanks.

@kayrus kayrus closed this as completed Jun 26, 2019
@notque
Copy link
Contributor

notque commented Jun 26, 2019

I will update the docs to try to make this clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants