Skip to content

feat: Optionally ignore unused track parameters#2077

Open
lhearachel wants to merge 1 commit intoelastic:masterfrom
lhearachel:ignore-unused-params
Open

feat: Optionally ignore unused track parameters#2077
lhearachel wants to merge 1 commit intoelastic:masterfrom
lhearachel:ignore-unused-params

Conversation

@lhearachel
Copy link
Copy Markdown

This makes it possible to ignore totally-unused track parameters, rather than always failing with an error when a track parameter is given but not used. This is, at minimum, a developer-experience improvement while building new tracks.

Sample Output

> esrally race --track=geonames --track-params="nonexistent_param:foo"

    ____        ____
   / __ \____ _/ / /_  __
  / /_/ / __ `/ / / / / /
 / _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
                /____/

[INFO] Race id is [66377ae1-42ab-4bf8-8c33-a3b8f215f3c0]
[ERROR] Some of your track parameter(s) "nonexistent_param" are not used by this track; perhaps you intend to use  instead.

All track parameters you provided are:
- nonexistent_param

All parameters exposed by this track:
- bulk_indexing_clients
- bulk_size
- cluster_health
- conflict_probability
- conflicts
- error_level
- include_force_merge
- include_non_serverless_index_settings
- include_target_throughput
- index_settings
- ingest_percentage
- max_num_segments
- number_of_replicas
- number_of_shards
- on_conflict
- post_ingest_sleep
- post_ingest_sleep_duration
- recency
- source_enabled
- store_type
[ERROR] Cannot race. Traceback (most recent call last):
  =~ snipped for brevity ~=

> esrally race --track=geonames --track-params="nonexistent_param:foo" --ignore-unused-track-params

    ____        ____
   / __ \____ _/ / /_  __
  / /_/ / __ `/ / / / / /
 / _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
                /____/

[INFO] Race id is [aef4d33b-b525-4e9a-886d-e9e16e443214]
[WARNING] Some of your track parameter(s) "nonexistent_param" are not used by this track; perhaps you intend to use  instead.

All track parameters you provided are:
- nonexistent_param

All parameters exposed by this track:
- bulk_indexing_clients
- bulk_size
- cluster_health
- conflict_probability
- conflicts
- error_level
- include_force_merge
- include_non_serverless_index_settings
- include_target_throughput
- index_settings
- ingest_percentage
- max_num_segments
- number_of_replicas
- number_of_shards
- on_conflict
- post_ingest_sleep
- post_ingest_sleep_duration
- recency
- source_enabled
- store_type
[INFO] Preparing for race ..
  =~ snipped for brevity ~=

Testing

I get the following error when I run make check-all locally:

self = <it.TestCluster object at 0x107ad5160>, distribution_version = '8.5.1'
node_name = 'metrics-store', car = 'defaults,basic-license', http_port = 10200

    def install(self, distribution_version, node_name, car, http_port):
        self.http_port = http_port
        transport_port = http_port + 100
        try:
            output = process.run_subprocess_with_output(
                "esrally install --configuration-name={cfg} --quiet --distribution-version={dist}--build-type=tar "
                "--http-port={http_port} --node={node_name} --master-nodes={node_name} --car={car} "
                '--seed-hosts="127.0.0.1:{transport_port}" --cluster-name={cfg}'.format(
                    cfg=self.cfg,
                    dist=distribution_version,
                    http_port=http_port,
                    node_name=node_name,
                    car=car,
                    transport_port=transport_port,
                )
            )
            self.installation_id = json.loads("".join(output))["installation-id"]
        except BaseException as e:
>           raise AssertionError(f"Failed to install Elasticsearch {distribution_version}.", e)
E           AssertionError: ('Failed to install Elasticsearch 8.5.1.', JSONDecodeError('Expectingvalue: line 1 column 2 (char 1)'))

it/__init__.py:161: AssertionError

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

Successfully merging this pull request may close these issues.

1 participant