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

Show more user-friendly track loader errors #903

Merged

Conversation

danielmitterdorfer
Copy link
Member

With this commit we add more details when Rally cannot load a track. In
all cases we include the path to the completely rendered track file. We
also detect syntax errors separately and provide the specific context in
which the error happens.

With this commit we add more details when Rally cannot load a track. In
all cases we include the path to the completely rendered track file. We
also detect syntax errors separately and provide the specific context in
which the error happens.
@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo :Usability Makes Rally easier to use :Track Management New operations, changes in the track format, track download changes and the like labels Feb 17, 2020
@danielmitterdorfer danielmitterdorfer added this to the 1.4.1 milestone Feb 17, 2020
@danielmitterdorfer danielmitterdorfer self-assigned this Feb 17, 2020
@danielmitterdorfer
Copy link
Member Author

Here is an example of the new output for a missing comma:

[ERROR] Cannot list. Could not load '/Users/daniel/.rally/benchmarks/tracks/default/geonames/track.json': Expecting ',' delimiter: line 46 column 7 (char 1066). Lines containing the error:

    {
      "name": "default",
      "operation-type": "search"
      "body": {
------^ Error is here
        "query": {
          "match_all": {}

The complete track has been written to '/var/folders/pg/gbmwwwms3n50fttdmnqd4sl40000gn/T/tmpy3b8nifs.json' for diagnosis.

another example with a missing double-quote at the end of a string:

[ERROR] Cannot list. Could not load '/Users/daniel/.rally/benchmarks/tracks/default/geonames/track.json': Invalid control character at: line 45 column 33 (char 1059). Lines containing the error:

    },
    {
      "name": "default",
      "operation-type": "search,
--------------------------------^ Error is here
      "body": {
        "query": {

The complete track has been written to '/var/folders/pg/gbmwwwms3n50fttdmnqd4sl40000gn/T/tmpf33rckho.json' for diagnosis.

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Very useful, thanks! LGTM

@danielmitterdorfer danielmitterdorfer merged commit f8eb78b into elastic:master Feb 18, 2020
@danielmitterdorfer danielmitterdorfer deleted the better-error-msg branch February 18, 2020 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :Track Management New operations, changes in the track format, track download changes and the like :Usability Makes Rally easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants