Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new base-path parameter to enhance the component yml from test workflow #3497

Merged
merged 8 commits into from
May 22, 2023

Conversation

zelinh
Copy link
Member

@zelinh zelinh commented May 10, 2023

Description

Add new base-path parameter for test_recorder to enhance the component yml generated from test workflow to display the location/URLs of local cluster logs or std text files.

If this parameter is not specified, the component yml file will display the real local path of those files.

I also updated the stdout & stderr path by removing an extra test-results folder.
Change from
/usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/test-results/stdout.txt
to
/usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/stdout.txt

Issues Resolved

#3381

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

zelinh added 2 commits May 10, 2023 14:10
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented May 11, 2023

Codecov Report

Merging #3497 (c86a90d) into main (08904ce) will increase coverage by 0.31%.
The diff coverage is 96.77%.

@@            Coverage Diff             @@
##             main    #3497      +/-   ##
==========================================
+ Coverage   91.16%   91.48%   +0.31%     
==========================================
  Files         181      181              
  Lines        5342     5364      +22     
==========================================
+ Hits         4870     4907      +37     
+ Misses        472      457      -15     
Impacted Files Coverage Δ
...workflow/integ_test/integ_test_suite_opensearch.py 66.66% <0.00%> (+0.81%) ⬆️
src/test_workflow/integ_test/integ_test_runner.py 97.56% <100.00%> (+0.06%) ⬆️
src/test_workflow/integ_test/integ_test_suite.py 94.54% <100.00%> (+0.54%) ⬆️
...teg_test/integ_test_suite_opensearch_dashboards.py 95.23% <100.00%> (-0.08%) ⬇️
src/test_workflow/test_args.py 100.00% <100.00%> (ø)
src/test_workflow/test_recorder/test_recorder.py 84.94% <100.00%> (+21.30%) ⬆️

@zelinh
Copy link
Member Author

zelinh commented May 11, 2023

With this feature, the component yml file will be like

[opensearch@92677c32ca49 opensearch-build]$ cat test-results/1234/integ-test/sql/with-security/sql.yml
component_name: sql
run_id: 1234
test_config: with-security
test_result: PASS
test_result_files:
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/stdout.txt
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/stderr.txt
- local-cluster-logs:
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/stdout.txt
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/stderr.txt
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_server.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log.00
test_type: integ-test

with command ./test.sh integ-test manifests/2.7.0/opensearch-2.7.0-test.yml --component sql -p opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/7771/linux/x64/tar --test-run-id 1234 --base-path https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/

If we don't specify the --base-path, the yaml file will showcase the realpath to those logs in local.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain what this actually does? I don't quite understand "Add new function to enhance the component yml generated from test workflow.' I see that you're adding a new path parameter though ;)

src/test_workflow/test_recorder/test_recorder.py Outdated Show resolved Hide resolved
src/test_workflow/test_recorder/test_recorder.py Outdated Show resolved Hide resolved
@@ -28,6 +28,8 @@ def __init__(self) -> None:
parser = argparse.ArgumentParser(description="Test an OpenSearch Bundle")
parser.add_argument("test_manifest_path", type=TestArgsPathValidator.validate, help="Specify a test manifest path.")
parser.add_argument("-p", "--paths", nargs='*', action=TestKwargs, default={}, help="Specify paths for OpenSearch and OpenSearch Dashboards.")
# e.g. --base-path https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/ with trailing slash because of the property of urljoin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be very hard to debug, make it work without the trailing slash.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is found when I was looking into urljoin. https://stackoverflow.com/questions/10893374/python-confusions-with-urljoin
Let me see whether there is any alternative way of joining url or we could just join them with /.

@zelinh zelinh changed the title Add new function to enhance the component yml from test workflow Add new base-path parameter to enhance the component yml from test workflow May 11, 2023
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@zelinh
Copy link
Member Author

zelinh commented May 11, 2023

Explain what this actually does? I don't quite understand "Add new function to enhance the component yml generated from test workflow.' I see that you're adding a new path parameter though ;)

@dblock Sorry for a little confusion. I just updated the title of this PR to be more clear. This is basically enable a new parameter so that the component yml file generated from our test workflow will include realpath/URL of all the recorded logs.

@gaiksaya
Copy link
Member

What is the default behavior if you do not provide a basepath? I assume the absolute paths of the files is recorded?

@zelinh
Copy link
Member Author

zelinh commented May 11, 2023

What is the default behavior if you do not provide a basepath? I assume the absolute paths of the files is recorded?

@gaiksaya Yes, if not specified, real local path for those file would be displayed. #3497 (comment)

@zelinh
Copy link
Member Author

zelinh commented May 11, 2023

Example of running integ test workflow without enabling base-path
command: ./test.sh integ-test manifests/2.7.0/opensearch-2.7.0-test.yml --component sql -p opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/7771/linux/x64/tar --test-run-id 1234

[opensearch@92677c32ca49 opensearch-build]$ cat test-results/1234/integ-test/sql/with-security/sql.yml
component_name: sql
run_id: 1234
test_config: with-security
test_result: PASS
test_result_files:
- /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/stdout.txt
- /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/stderr.txt
- local-cluster-logs:
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/stdout.txt
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/stderr.txt
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_server.json
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1.log
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.json
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.json
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.json
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.log
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.json
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.log
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.log
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.log
  - /usr/share/opensearch/opensearch-build/test-results/1234/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log.00
test_type: integ-test

@zelinh
Copy link
Member Author

zelinh commented May 12, 2023

New example of this with command: ./test.sh integ-test manifests/2.7.0/opensearch-2.7.0-test.yml --component sql -p opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/7771/linux/x64/tar --test-run-id 4836 --base-path https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/

This job number is a real job number so that most of below URL are accessible. Only exception are the stdout.txt & stderr.txt of component because I remove the additional test-results directory in this PR.

Change from
https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/test-results/stdout.txt
to
https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/stdout.txt

[opensearch@92677c32ca49 opensearch-build]$ cat test-results/4836/integ-test/sql/with-security/sql.yml
component_name: sql
run_id: 4836
test_config: with-security
test_result: PASS
test_result_files:
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/stdout.txt
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/stderr.txt
- local-cluster-logs:
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/stdout.txt
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/stderr.txt
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_server.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.json
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.log
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log.00
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1-2023-05-11-1.json.gz
  - https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1-2023-05-11-1.log.gz
test_type: integ-test

zelinh added 2 commits May 18, 2023 14:26
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
outcome = {
"test_type": self.test_type,
"test_run_id": self.test_run_id,
"run_id": self.test_run_id,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the rename?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want this key to be written above the test_result_files when generating the yaml file but not strong opinion to change it. Open to change it back.

Comment on lines 62 to 75
local_cluster_logs_path = os.path.join(output_path, "local-cluster-logs")
local_cluster_logs = self._get_list_files(local_cluster_logs_path)
local_cluster_logs = self._update_absolute_file_paths(local_cluster_logs, base_file_path, "local-cluster-logs")

opensearch_service_logs_path = os.path.join(local_cluster_logs_path, "opensearch-service-logs")
opensearch_service_logs = self._get_list_files(opensearch_service_logs_path)
opensearch_service_logs = self._update_absolute_file_paths(opensearch_service_logs, base_file_path, os.path.join("local-cluster-logs", "opensearch-service-logs"))

test_result_file = components_files + [
{
"local-cluster-logs":
local_cluster_logs + opensearch_service_logs
}
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want this to be generic so that any log files can be written under here. Did you check how this behavior affects dashboards integ-test? Since this just seems to be related to opensearch logs and test_recorder is generic to all tests plus OS and OSD. Should this be part of LocalClusterLogs class?
https://github.com/opensearch-project/opensearch-build/pull/3497/files#diff-d8e45f5fe0a4500dc4bb059941f629bcc07c6cff714a4a6ee1711dc1fdc7c08aR104

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaiksaya
For integ test on dashboards, the behavior here are the same. The component yml file (functionalTestDashboards.yml) would list out the stdout&stderr for component and local cluster logs since it doesn't contain opensearch_service. The only things it wouldn't include are those cypress folders (e.g. cypress-screenshots/cypress-videos/cypress-report). I don't think it necessary to keep track of them in the scope of this PR as they are relatively too much to list them all. We could anyway track those videos/reports from the OSD team website I believe.

I don't think we should have this be part of the LocalClusterLogs as that class is mainly for recording and generating those files. Here we basically just list them out in the component yml file.

Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@zelinh
Copy link
Member Author

zelinh commented May 19, 2023

Updated with compatibility for integ tests on dashboards.

The component yml file would include opensearch-dashboards-service-logs for OSD. If we are running for OS, it wouldn't include since this log doesn't exist.

Command:
./test.sh integ-test manifests/2.7.0/opensearch-dashboards-2.7.0-test.yml --component customImportMapDashboards -p opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/7771/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/2.7.0/6100/linux/x64/tar --test-run-id 3473
customImportMapDashboards.yml will be like this:

[opensearch@6aafd8c0fb16 opensearch-build]$ cat test-results/3473/integ-test/customImportMapDashboards/with-security/customImportMapDashboards.yml
component_name: customImportMapDashboards
run_id: 3473
test_config: with-security
test_result: FAIL
test_result_files:
- /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/stdout.txt
- /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/stderr.txt
- local-cluster-logs:
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/stdout.txt
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/stderr.txt
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_server.json
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_task_detailslog.log
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_deprecation.json
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_indexing_slowlog.json
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_task_detailslog.json
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_deprecation.log
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/gc.log
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_indexing_slowlog.log
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_search_slowlog.json
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_search_slowlog.log
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch.log
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-service-logs/gc.log.00
  - /usr/share/opensearch/opensearch-build/test-results/3473/integ-test/customImportMapDashboards/with-security/local-cluster-logs/opensearch-dashboards-service-logs/opensearch_dashboards.log
test_type: integ-test

@gaiksaya
Copy link
Member

gaiksaya commented May 20, 2023

The dashboard integration tests should also store the cypress artifacts as mentioned here https://github.com/opensearch-project/opensearch-build/blob/main/src/test_workflow/integ_test/integ_test_suite_opensearch_dashboards.py#L133-L137.
Can you check with that? It is similar to opensearch-service logs. I see below in our S3 buckets. Might want to run locally and check the actual location with recent parallelization:
image

These will fall under test_result_files not under local-cluster logs.

Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@zelinh
Copy link
Member Author

zelinh commented May 22, 2023

The dashboard integration tests should also store the cypress artifacts as mentioned here https://github.com/opensearch-project/opensearch-build/blob/main/src/test_workflow/integ_test/integ_test_suite_opensearch_dashboards.py#L133-L137. Can you check with that? It is similar to opensearch-service logs. I see below in our S3 buckets. Might want to run locally and check the actual location with recent parallelization: image

These will fall under test_result_files not under local-cluster logs.

@gaiksaya Updated with the new commits. Currently this component yml file would traverse through the results directory and listed out all those files.

@zelinh
Copy link
Member Author

zelinh commented May 22, 2023

The new component yml file would include path/url to cypress folders (screenshots, reports, videos)

Command: ./test.sh integ-test manifests/1.3.10/opensearch-dashboards-1.3.10-test.yml --component indexManagementDashboards --test-run-id 3531 --paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.10/latest/linux/x64/tar opensearch-dashboards=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/1.3.10/latest/linux/x64/tar --base-path https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar

[opensearch@8f7f8fadebcd opensearch-build]$ cat test-results/3531/integ-test/indexManagementDashboards/with-security/indexManagementDashboards.yml
component_name: indexManagementDashboards
run_id: 3531
test_config: with-security
test_result: FAIL
test_result_files:
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/stdout.txt
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/stderr.txt
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-2b22ba9c47f55cc949e19f82b616286c.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-71a1506578862b51d8d59b8b4fcdfde7.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-4ff8ab68cf7dec66445b8b39d2313b9f.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-cbd8531c6a7b1bbca6fb16c8592ca5a8.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-8d2cb91db4abfa2161d60d1ae66bde8e.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-ed02f83fa11d0c302aadedb4d480b6be.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-74f61e140c632ca789fdd84377e0cbe3.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-6596eb55b992cb98ea05ece73a2709bb.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-20ec67bf226e091ed3ae667001006d41.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-report/results-926b70f352dac9a26e27aa0c44c9ca86.xml
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-videos/plugins/index-management-dashboards-plugin/indices_spec.js.mp4
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-videos/plugins/index-management-dashboards-plugin/rollups_spec.js.mp4
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-videos/plugins/index-management-dashboards-plugin/managed_indices_spec.js.mp4
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-videos/plugins/index-management-dashboards-plugin/policies_spec.js.mp4
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-videos/plugins/index-management-dashboards-plugin/transforms_spec.js.mp4
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-screenshots/plugins/index-management-dashboards-plugin/rollups_spec.js/Rollups
  -- successfully -- before each hook (failed).png
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-screenshots/plugins/index-management-dashboards-plugin/policies_spec.js/Policies
  -- successfully -- before each hook (failed).png
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-screenshots/plugins/index-management-dashboards-plugin/transforms_spec.js/Transforms
  -- successfully -- before each hook (failed).png
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-screenshots/plugins/index-management-dashboards-plugin/indices_spec.js/Indices
  -- successfully -- before each hook (failed).png
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/cypress-screenshots/plugins/index-management-dashboards-plugin/managed_indices_spec.js/Managed
  indices -- successfully -- before each hook (failed).png
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/stdout.txt
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/stderr.txt
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_server.json
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_deprecation.json
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_indexing_slowlog.json
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_deprecation.log
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/gc.log
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_indexing_slowlog.log
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_search_slowlog.json
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch_index_search_slowlog.log
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/opensearch.log
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-service-logs/gc.log.00
- https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.10/1234/linux/x64/tar/test-results/3531/integ-test/indexManagementDashboards/with-security/local-cluster-logs/opensearch-dashboards-service-logs/opensearch_dashboards.log
test_type: integ-test

For OS, it remains the same
Command: ./test.sh integ-test manifests/2.7.0/opensearch-2.7.0-test.yml --component sql -p opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/7771/linux/x64/tar --test-run-id 4836 --base-path https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/

[opensearch@92677c32ca49 opensearch-build]$ cat test-results/4836/integ-test/sql/with-security/sql.yml
component_name: sql
run_id: 4836
test_config: with-security
test_result: PASS
test_result_files:
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/stdout.txt
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/stderr.txt
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/stdout.txt
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/stderr.txt
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_server.json
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1.log
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.json
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.json
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.json
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_indexing_slowlog.log
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.json
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_deprecation.log
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_task_detailslog.log
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/opensearchcluster1_index_search_slowlog.log
- https://ci.opensearch.org/ci/dbc/integ-test/2.7.0/7771/linux/x64/tar/test-results/4836/integ-test/sql/with-security/local-cluster-logs/opensearch-service-logs/gc.log.00
test_type: integ-test

Copy link
Member

@gaiksaya gaiksaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much cleaner with tree walker. Thanks for adding tests for test recorder too.

@zelinh zelinh merged commit f675b83 into opensearch-project:main May 22, 2023
@zelinh zelinh deleted the component_yml branch May 22, 2023 23:21
zelinh added a commit to zelinh/opensearch-build that referenced this pull request May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants