Skip to content

Add additional filter options to rally list races#1597

Merged
ebadyano merged 5 commits intoelastic:masterfrom
ebadyano:list-races
Nov 2, 2022
Merged

Add additional filter options to rally list races#1597
ebadyano merged 5 commits intoelastic:masterfrom
ebadyano:list-races

Conversation

@ebadyano
Copy link
Copy Markdown
Contributor

@ebadyano ebadyano commented Oct 13, 2022

  • Added extra files to display for listing races ( ES Version, Revision and Rally Version).
  • Removed Track Parameters from being displayed, as for some races (e.g. logs) it's very long and makes it hard to understand the output.
  • Added new filters for list races: --track, --name and --to-date, --from-date

@ebadyano ebadyano added enhancement Improves the status quo :Reporting Command line reporting labels Oct 13, 2022
@ebadyano ebadyano self-assigned this Oct 13, 2022
@ebadyano ebadyano changed the title Add additional filter options to list races Add additional filter options to rally list races Oct 13, 2022
@ebadyano ebadyano requested review from DJRickyB and pquentin October 26, 2022 16:49
@ebadyano ebadyano marked this pull request as ready for review October 26, 2022 16:58
@ebadyano ebadyano requested review from michaelbaamonde and removed request for DJRickyB October 26, 2022 16:59
Copy link
Copy Markdown
Contributor

@michaelbaamonde michaelbaamonde left a comment

Choose a reason for hiding this comment

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

I tested out the basic functionality with both a local and remote metrics store and it worked well! This is a very nice improvement, thanks.

In addition to my comments on adjusting the help text, I think we should add a unit test for the new filtering logic contained in metrics.py.

help="Limit the number of search results for recent races (default: 10).",
default=10,
)
list_parser.add_argument(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With the way things are structured right now, all list commands will accept these new race-specific arguments, but can't do anything useful with them. It's not a huge deal, but seeing them in the --help output for something like esrally list tracks --help could add some confusion.

That said, there's already precedent for this. --limit only really applies to races, but you can pass it to any other list subcommand.

Could you perhaps change the help text for the new arguments to indicate that they're intended to be used for races only? Something like Show only races for this track in this case, for example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the plan is to add list annotations eventually, which --track and --to-date/--from-date options should be applicable as well. I could change to records to races for now and change it back to records once list annotations is implemented.. what do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, interesting. That works for me. Like I said, not a huge deal anyway.

@ebadyano
Copy link
Copy Markdown
Contributor Author

@michaelbaamonde thank you for your review. I added unit tests for the new filter logic. Thank you!

Copy link
Copy Markdown
Contributor

@michaelbaamonde michaelbaamonde left a comment

Choose a reason for hiding this comment

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

LGTM!

@ebadyano ebadyano merged commit 0ecdbb4 into elastic:master Nov 2, 2022
@pquentin pquentin added this to the 2.7.0 milestone Nov 3, 2022
ebadyano added a commit that referenced this pull request Nov 23, 2022
Added the following helper admin function:

delete a race from Elasticsearch metric store. Use `esrally delete race --id=..`
Relates to #1597
@ebadyano ebadyano deleted the list-races branch December 16, 2022 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improves the status quo :Reporting Command line reporting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants