Skip to content

Commit

Permalink
Use Rally's artifact cache cleanup (elastic#263)
Browse files Browse the repository at this point in the history
With this commit we remove night-rally's custom artifact cache cleanup
and instead rely on Rally's mechanism implemented in elastic/rally#998.
We also set the cache duration to two days (instead of the default seven
days) to ensure artifacts are cached for the nightlies but are still
present for quick follow-up investigations without taking up too much
space on disk.

Relates elastic/rally#998
  • Loading branch information
danielmitterdorfer committed May 25, 2020
1 parent ec155b6 commit 7f40bf6
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 43 deletions.
1 change: 0 additions & 1 deletion night_rally.sh
Expand Up @@ -208,7 +208,6 @@ then
cd ${NIGHT_RALLY_HOME}/night_rally/fixtures/ansible
ansible-playbook -i inventory/production -u rally playbooks/update-rally.yml --extra-vars="rally_environment=${RALLY_ENVIRONMENT} in_vagrant=${IN_VAGRANT} skip_rally_update=${SKIP_RALLY_UPDATE}"
ansible-playbook -i inventory/production -u rally playbooks/check-drive-health.yml ${ANSIBLE_SKIP_TAGS_STRING} --extra-vars="in_vagrant=${IN_VAGRANT}"
ansible-playbook -i inventory/production -u rally playbooks/evict-artifact-cache.yml
ansible-playbook -i inventory/production -u rally playbooks/setup.yml ${ANSIBLE_SKIP_TAGS_STRING}

popd >/dev/null 2>&1
Expand Down
16 changes: 0 additions & 16 deletions night_rally/fixtures/ansible/playbooks/evict-artifact-cache.yml

This file was deleted.

Expand Up @@ -12,6 +12,7 @@ env.name = {{rally_environment}}
remote.repo.url = https://github.com/elastic/elasticsearch.git
elasticsearch.src.subdir = elasticsearch
cache = true
cache.days = 2

[benchmarks]
local.dataset.cache = {{rally_homedir}}/.rally/benchmarks/data
Expand Down
2 changes: 1 addition & 1 deletion night_rally/night_rally.py
Expand Up @@ -184,7 +184,7 @@ class SourceBasedCommand(BaseCommand):
def __init__(self, params, revision):
self.params = ParamsFormatter(params=params + [
LicenseParams(distribution_version="master"),
ConstantParam("pipeline", "from-sources-complete"),
ConstantParam("pipeline", "from-sources"),
ConstantParam("revision", revision)
])

Expand Down
50 changes: 25 additions & 25 deletions tests/night_rally_test.py
Expand Up @@ -361,14 +361,14 @@ def test_run_two_oss_challenges_successfully(self, mocked_wait_until_port_is_fre
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-append-1node,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" "
"--pipeline=\"from-sources\" "
"--revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts-index-only\" --car=\"4gheap\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-append-4g-1node,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--track-params=\"{{\\\"number_of_replicas\\\": 0}}\" --pipeline=\"from-sources-complete\" "
"--track-params=\"{{\\\"number_of_replicas\\\": 0}}\" --pipeline=\"from-sources\" "
"--revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id)
]
,
Expand Down Expand Up @@ -414,7 +414,7 @@ def test_exclude_tasks_option(self, mocked_wait_until_port_is_free):
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-append-1node,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--exclude-tasks=\"delete,type:search\" --pipeline=\"from-sources-complete\" "
"--exclude-tasks=\"delete,type:search\" --pipeline=\"from-sources\" "
"--revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id)
]
,
Expand Down Expand Up @@ -460,7 +460,7 @@ def test_overwrite_runtime_jdk_successfully(self, mocked_wait_until_port_is_free
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-append-1node,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"13\" "
"--pipeline=\"from-sources-complete\" "
"--pipeline=\"from-sources\" "
"--revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id)
]
,
Expand Down Expand Up @@ -531,26 +531,26 @@ def test_run_two_mixed_license_challenges_successfully(self, mocked_wait_until_p
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" "
"--pipeline=\"from-sources\" "
"--revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"4gheap\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-4g,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id),
"--pipeline=\"from-sources\" --revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults,basic-license\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,race-configs-id:{},license:basic\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id),
"--pipeline=\"from-sources\" --revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"4gheap,basic-license\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-4g,setup:bare,race-configs-id:{},license:basic\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id)
"--pipeline=\"from-sources\" --revision=\"@2016-01-01T00:00:00Z\"".format(race_configs_id)
]
,
system_call.calls
Expand Down Expand Up @@ -617,13 +617,13 @@ def test_run_two_oss_tracks_successfully(self, mocked_wait_until_port_is_free):
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),
"--pipeline=\"from-sources\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"127.0.0.2:9200\" "
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"percolator\" "
"--challenge=\"append-no-conflicts\" --car=\"4gheap\" --client-options=\"timeout:240\" "
"--user-tag=\"name:percolator-4g,setup:bare,race-configs-id:{},license:oss\" "
"--runtime-jdk=\"8\" --pipeline=\"from-sources-complete\" "
"--runtime-jdk=\"8\" --pipeline=\"from-sources\" "
"--revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id)
]
,
Expand Down Expand Up @@ -747,19 +747,19 @@ def test_run_three_sets_of_mixed_license_tracks_successfully(self, mocked_wait_u
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),
"--pipeline=\"from-sources\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"4gheap,basic-license\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-append-4g-3nodes,setup:bare,race-configs-id:{},license:basic\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),
"--pipeline=\"from-sources\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults,trial-license\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,race-configs-id:{},license:trial\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),
"--pipeline=\"from-sources\" --revision=\"@2016-10-01T00:00:00Z\"".format(race_configs_id),

'rally --skip-update --configuration-name="nightly" --quiet '
'--target-host="localhost:9200" --effective-start-date="2016-10-01 00:00:00" '
Expand All @@ -771,7 +771,7 @@ def test_run_three_sets_of_mixed_license_tracks_successfully(self, mocked_wait_u
'--runtime-jdk="8" --car-params="{{\\"xpack_ml_enabled\\": false, '
'\\"xpack_monitoring_enabled\\": false, \\"xpack_watcher_enabled\\": false}}" '
'--track-params="{{\\"number_of_replicas\\": 0}}" '
'--pipeline="from-sources-complete" --revision="@2016-10-01T00:00:00Z"'.format(race_configs_id),
'--pipeline="from-sources" --revision="@2016-10-01T00:00:00Z"'.format(race_configs_id),

'rally --skip-update --configuration-name="nightly" --quiet '
'--target-host="localhost:9200" --effective-start-date="2016-10-01 00:00:00" '
Expand All @@ -781,7 +781,7 @@ def test_run_three_sets_of_mixed_license_tracks_successfully(self, mocked_wait_u
',basic_auth_password:\'rally-password\'" '
'--user-tag="name:percolator-4g,setup:bare,race-configs-id:{},license:trial,x-pack:true" --runtime-jdk="8" '
'--car-params="{{\\"xpack_ml_enabled\\": false, \\"xpack_monitoring_enabled\\": false, '
'\\"xpack_watcher_enabled\\": false}}" --pipeline="from-sources-complete" '
'\\"xpack_watcher_enabled\\": false}}" --pipeline="from-sources" '
'--revision="@2016-10-01T00:00:00Z"'.format(race_configs_id),

'rally --skip-update --configuration-name="nightly" --quiet '
Expand All @@ -792,7 +792,7 @@ def test_run_three_sets_of_mixed_license_tracks_successfully(self, mocked_wait_u
',basic_auth_password:\'rally-password\'" '
'--user-tag="name:percolator,setup:bare,race-configs-id:{},license:trial,x-pack:true" --runtime-jdk="8" '
'--car-params="{{\\"xpack_ml_enabled\\": false, \\"xpack_monitoring_enabled\\": false, '
'\\"xpack_watcher_enabled\\": false}}" --pipeline="from-sources-complete" '
'\\"xpack_watcher_enabled\\": false}}" --pipeline="from-sources" '
'--revision="@2016-10-01T00:00:00Z"'.format(race_configs_id)
]
,
Expand Down Expand Up @@ -861,13 +861,13 @@ def test_run_adhoc_benchmark(self, mocked_wait_until_port_is_free):
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"eventdata\" --track=\"eventdata\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:eventdata-defaults,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"66202dc\"".format(race_configs_id),
"--pipeline=\"from-sources\" --revision=\"66202dc\"".format(race_configs_id),

"rally --skip-update --configuration-name=\"lucene-7\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"percolator\" "
"--challenge=\"append-no-conflicts\" --car=\"4gheap\" --client-options=\"timeout:240\" "
"--user-tag=\"name:percolator-4g,setup:bare,race-configs-id:{},license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"66202dc\"".format(race_configs_id)
"--pipeline=\"from-sources\" --revision=\"66202dc\"".format(race_configs_id)
]
,
system_call.calls
Expand Down Expand Up @@ -1596,13 +1596,13 @@ def test_run_continues_on_error(self, mocked_wait_until_port_is_free):
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-10-01T00:00:00Z\"",
"--pipeline=\"from-sources\" --revision=\"@2016-10-01T00:00:00Z\"",

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-10-01 00:00:00\" --track-repository=\"default\" --track=\"percolator\" "
"--challenge=\"append-no-conflicts\" --car=\"4gheap\" --client-options=\"timeout:240\" "
"--user-tag=\"name:percolator-4g,setup:bare,license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-10-01T00:00:00Z\""
"--pipeline=\"from-sources\" --revision=\"@2016-10-01T00:00:00Z\""
]
,
system_call.calls
Expand Down Expand Up @@ -1652,7 +1652,7 @@ def test_run_with_telemetry_from_command_line(self, mocked_wait_until_port_is_fr
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,license:oss\" --runtime-jdk=\"8\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-01-01T00:00:00Z\""
"--pipeline=\"from-sources\" --revision=\"@2016-01-01T00:00:00Z\""
]
,
system_call.calls
Expand Down Expand Up @@ -1713,19 +1713,19 @@ def test_run_with_telemetry_from_race_config(self, mocked_wait_until_port_is_fre
"--challenge=\"append-no-conflicts\" --car=\"defaults\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-defaults,setup:bare,license:oss\" --runtime-jdk=\"8\" "
"--telemetry=\"jfr,gc,jit\" --telemetry-params=\"{\\\"recording-template\\\": \\\"profile\\\"}\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-01-01T00:00:00Z\"",
"--pipeline=\"from-sources\" --revision=\"@2016-01-01T00:00:00Z\"",

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"4gheap\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-4g,setup:bare,license:oss\" --runtime-jdk=\"8\" "
"--telemetry=\"gc\" --pipeline=\"from-sources-complete\" --revision=\"@2016-01-01T00:00:00Z\"",
"--telemetry=\"gc\" --pipeline=\"from-sources\" --revision=\"@2016-01-01T00:00:00Z\"",

"rally --skip-update --configuration-name=\"nightly\" --quiet --target-host=\"localhost:9200\" "
"--effective-start-date=\"2016-01-01 00:00:00\" --track-repository=\"default\" --track=\"geonames\" "
"--challenge=\"append-no-conflicts\" --car=\"8gheap\" --client-options=\"timeout:240\" "
"--user-tag=\"name:geonames-8g,setup:bare,license:oss\" --runtime-jdk=\"8\" --on-error=\"abort\" "
"--pipeline=\"from-sources-complete\" --revision=\"@2016-01-01T00:00:00Z\"",
"--pipeline=\"from-sources\" --revision=\"@2016-01-01T00:00:00Z\"",
]
,
system_call.calls
Expand All @@ -1741,7 +1741,7 @@ def test_finds_race_meta_data(self, client_factory):
"trial-timestamp": "20200310T200052Z",
"race-id": "6a7527a5-79ba-4cbf-a41c-d09a4b254b2a",
"race-timestamp": "20200310T200000Z",
"pipeline": "from-sources-complete",
"pipeline": "from-sources",
"user-tags": {
"name": "geonames-append-4g-3nodes",
"setup": "bare-oss",
Expand Down

0 comments on commit 7f40bf6

Please sign in to comment.