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

Allow to filter tasks by tag #1154

Merged
merged 2 commits into from
Jan 18, 2021

Conversation

danielmitterdorfer
Copy link
Member

With this commit we allow users to filter tasks by tags. Tasks define a
new property tags and we add a new tag keyword prefix for task
filters. A usage example is:

--exclude-tasks="tag:setup"

By adding this task filter, Rally executes all tasks but the ones that
contain this tag.

With this commit we allow users to filter tasks by tags. Tasks define a
new property `tags` and we add a new `tag` keyword prefix for task
filters. A usage example is:

```
--exclude-tasks="tag:setup"
```

By adding this task filter, Rally executes all tasks but the ones that
contain this tag.
@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo :Usability Makes Rally easier to use labels Jan 18, 2021
@danielmitterdorfer danielmitterdorfer added this to the 2.0.4 milestone Jan 18, 2021
@danielmitterdorfer danielmitterdorfer self-assigned this Jan 18, 2021
Copy link
Contributor

@gingerwizard gingerwizard left a comment

Choose a reason for hiding this comment

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

LGTM. Surprisingly simple change. Only comment on case sensitivity. I'd lean towards the behaviour we have now on other filtering and document accordingly.

self.tag_name = tag_name

def matches(self, task):
return self.tag_name in task.tags
Copy link
Contributor

Choose a reason for hiding this comment

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

This appears to mean case sensitive matching? Is this what we want? I assume include-tasks is currently case sensitive?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, this behavior is consistent with current behavior, i.e. all other task filters are also case-sensitive.

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed an additional note in the docs about case sensitivity of task filters in 6cd13b2.

@danielmitterdorfer danielmitterdorfer merged commit f74f43d into elastic:master Jan 18, 2021
@danielmitterdorfer danielmitterdorfer deleted the task-tags branch January 18, 2021 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :Usability Makes Rally easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants