Skip to content

Bug - error when creating track on Serverless existing Serach project #1931

@aavidan

Description

@aavidan

I have a Serverless ES project with existing index.
When running the create-track command:

./rally --skip-update \
create-track --track=uiam-first-track --target-hosts="https://atara-elasticsearch-project-fe4ad5.es.us-east-1.aws.dev.elastic.cloud" \
--client-options="use_ssl:true,verify_certs:false,basic_auth_user:'admin',basic_auth_password:'removed'" \
--indices="atara-uiam-index" --output-path=~/tracks

It fails with

esrally/tracker/index.py", line 77, in extract_index_mapping_and_settings
    index_settings = filter_ephemeral_index_settings(details["settings"]["index"])
KeyError: 'index'

The reason is that the index in Serverless was created with an empty settings.

Fixing the line to be the following

            index_settings = filter_ephemeral_index_settings(details["settings"].get("index", {}))

seems to solve the issue.

This is the first time I work with this project so I would like to get feedback if you think I should create a PR.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions