diff --git a/.github/workflows/Nightly_Perf_Env_CI.yml b/.github/workflows/Nightly_Perf_Env_CI.yml index 8d5b76c07..4903955e3 100644 --- a/.github/workflows/Nightly_Perf_Env_CI.yml +++ b/.github/workflows/Nightly_Perf_Env_CI.yml @@ -340,7 +340,7 @@ jobs: ELASTICSEARCH_USER: ${{ secrets.PERF_ELASTICSEARCH_USER }} ELASTICSEARCH_PASSWORD: ${{ secrets.PERF_ELASTICSEARCH_PASSWORD }} run: | - python "$GITHUB_WORKSPACE"/benchmark_runner/grafana/update_versions_main_libsonnet.py + cd "$GITHUB_WORKSPACE" && PYTHONPATH=. python benchmark_runner/grafana/update_versions_main_libsonnet.py - name: Generate grafana dashboard.json using grafonnet container run: | diff --git a/.github/workflows/Perf_Env_Build_Test_CI.yml b/.github/workflows/Perf_Env_Build_Test_CI.yml index 558098c07..6752025e9 100644 --- a/.github/workflows/Perf_Env_Build_Test_CI.yml +++ b/.github/workflows/Perf_Env_Build_Test_CI.yml @@ -288,7 +288,7 @@ jobs: ELASTICSEARCH_USER: ${{ secrets.PERF_ELASTICSEARCH_USER }} ELASTICSEARCH_PASSWORD: ${{ secrets.PERF_ELASTICSEARCH_PASSWORD }} run: | - python "$GITHUB_WORKSPACE"/benchmark_runner/grafana/update_versions_main_libsonnet.py + cd "$GITHUB_WORKSPACE" && PYTHONPATH=. python benchmark_runner/grafana/update_versions_main_libsonnet.py - name: Generate grafana dashboard.json using grafonnet container run: | diff --git a/benchmark_runner/common/grafana/update_grafana_last_value_mappings.py b/benchmark_runner/common/grafana/update_grafana_latest_value_mappings.py similarity index 99% rename from benchmark_runner/common/grafana/update_grafana_last_value_mappings.py rename to benchmark_runner/common/grafana/update_grafana_latest_value_mappings.py index fd578fce3..f133fb22f 100644 --- a/benchmark_runner/common/grafana/update_grafana_last_value_mappings.py +++ b/benchmark_runner/common/grafana/update_grafana_latest_value_mappings.py @@ -6,7 +6,7 @@ from benchmark_runner.common.elasticsearch.elasticsearch_operations import ElasticSearchOperations -class UpdateGrafanaLastValueMappings: +class UpdateGrafanaLatestValueMappings: """ This class updates grafana dashboard with last value mappings from ElasticSearch """ diff --git a/benchmark_runner/grafana/update_versions_main_libsonnet.py b/benchmark_runner/grafana/update_versions_main_libsonnet.py index 2ccfb9a18..6e71d05f8 100644 --- a/benchmark_runner/grafana/update_versions_main_libsonnet.py +++ b/benchmark_runner/grafana/update_versions_main_libsonnet.py @@ -1,10 +1,10 @@ -from benchmark_runner.common.grafana.update_grafana_last_value_mappings import UpdateGrafanaLastValueMappings +from benchmark_runner.common.grafana.update_grafana_latest_value_mappings import UpdateGrafanaLatestValueMappings from benchmark_runner.main.environment_variables import environment_variables # Update perf main.libsonnet with last versions environment_variables_dict = environment_variables.environment_variables_dict -update_grafana_mappings_value = UpdateGrafanaLastValueMappings(main_libsonnet_path=environment_variables_dict.get('main_libsonnet_path', '')) +update_grafana_mappings_value = UpdateGrafanaLatestValueMappings(main_libsonnet_path=environment_variables_dict.get('main_libsonnet_path', '')) last_versions = update_grafana_mappings_value.get_last_elasticsearch_versions() update_grafana_mappings_value.update_value_mappings_last_versions(last_versions=last_versions) update_grafana_mappings_value.update_main_libsonnet()