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

Run OSD integ test ci-groups in parallel #5179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rishabh6788
Copy link
Collaborator

@rishabh6788 rishabh6788 commented Nov 11, 2024

Description

Run OSD integ test ci-groups in parallel.

This change proposes a dedicated job to run OSD integration test ci-groups in parallel.
The existing job can add a check to remove OSD component from list and run as usual.

Issues Resolved

#4944

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.

Comment on lines 46 to 52
if self.args.ci_group:
orig_component_name = component.name
for i in range(1, test_config.integ_test['ci-groups'] + 1):
component.name = f"{orig_component_name}-ci-group-{i}"
test_suite = self.__create_test_suite__(component, test_config, work_dir.path)
test_results = test_suite.execute_tests()
[self.test_recorder.test_results_logs.generate_component_yml(result_data) for result_data in test_suite.result_data]
all_results.append(component.name, test_results)
component.name = f"{orig_component_name}-ci-group-{self.args.ci_group}"
test_suite = self.__create_test_suite__(component, test_config, work_dir.path)
test_results = test_suite.execute_tests()
[self.test_recorder.test_results_logs.generate_component_yml(result_data) for result_data in test_suite.result_data]
all_results.append(component.name, test_results)
Copy link
Member

Choose a reason for hiding this comment

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

Looks like if and else block has a duplicate code. Does the below recommendation makes sense? Only change component-name if ci-group is present. Everything goes on as before.

if self.args.ci_group:
    orig_component_name = component.name
    component.name = f"{orig_component_name}-ci-group-{self.args.ci_group}"

test_suite = self.__create_test_suite__(component, test_config, work_dir.path)
test_results = test_suite.execute_tests()
[self.test_recorder.test_results_logs.generate_component_yml(result_data) for result_data in test_suite.result_data]
all_results.append(component.name, test_results)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@@ -149,8 +151,6 @@ def test_with_integ_test_ci_groups(self, mock_temp: Mock, mock_test_recorder: Mo
results = runner.run()

self.assertEqual(results["sql-ci-group-1"], mock_test_results)
self.assertEqual(results["sql-ci-group-2"], mock_test_results)
Copy link
Member

Choose a reason for hiding this comment

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

Can we check his assertions for given ci-group number?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test is checking the assertion when the ci-group parameter is passed with value 1.
I just deleted the previous implementation of running all ci-groups in the manifest file.

@@ -0,0 +1,376 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Can you please make changes in current integ-test workflow so that diff is easily visible?

Copy link
Collaborator Author

@rishabh6788 rishabh6788 Nov 13, 2024

Choose a reason for hiding this comment

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

I am proposing a dedicated job for OSD integ test because adding this ci-group changes in the existing job will be hacky and not clean. Running ci-groups and different components are technically two different use-cases.
This can be done in existing file but will make it clunky and hacky. For e.g, we don't need build manifest related stuff for ci-group processing and will result in a lot of if-else.

Copy link
Member

Choose a reason for hiding this comment

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

How about putting it in a library and calling the library instead. Seeing a lot of duplicate code and also worried about the maintenance like changing docker image names in both files, agent names, etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored to use the same job file.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.11%. Comparing base (ea478af) to head (3c6b992).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5179      +/-   ##
==========================================
- Coverage   92.12%   92.11%   -0.01%     
==========================================
  Files         197      197              
  Lines        6817     6814       -3     
==========================================
- Hits         6280     6277       -3     
  Misses        537      537              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants