elastic / rally

Macrobenchmarking framework for Elasticsearch
Apache License 2.0
1.95k stars 313 forks source link

Override serverless cluster version #1818

Closed gbanasiak closed 8 months ago

gbanasiak commented 9 months ago

Early Elastic Serverless versions returned no version.number and no version.build_hash fields under root API endpoint (/). Initial Rally adjustment for Serverless had taken this into account, see https://github.com/elastic/rally/pull/1738.

Later, due to BWC with clients, version.number and version.build_hash returned in static/pinned form.

{
    "name": "serverless",
    "cluster_name": "e4ba38a16a19425e9eac79c868c2afc5",
    "cluster_uuid": "btqR_bqJTPqvbV4Rgn_Z5Q",
    "version": {
        "number": "8.11.0", <--- HERE
        "build_flavor": "serverless",
        "build_type": "docker",
        "build_hash": "00000000", <--- HERE
        "build_date": "2023-10-31",
        "build_snapshot": false,
        "lucene_version": "9.7.0",
        "minimum_wire_compatibility_version": "8.11.0",
        "minimum_index_compatibility_version": "8.11.0"
    },
    "tagline": "You Know, for Search"
}

To address dummy build hash, when running with operator privileges the actual build hash is retrieved using nodes info API (see https://github.com/elastic/rally/pull/1756). The version number, however, remains at 8.11.0. As a consequence, Rally checks out 8.11.0 Rally track branch which is fine today as it's kept in sync with master, but does not allow us to move to a newer track branch.

This PR restores the original concept of reporting the version of serverless when run against Elastic Serverless clusters. With serverless version, Rally track branch selection defaults to master, see here: https://github.com/elastic/rally/blob/6611f677cf6e6019bad8dc45e4452b91b3be745e/esrally/utils/versions.py#L187-L188