-
Notifications
You must be signed in to change notification settings - Fork 277
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
BWC test workflow #1603
BWC test workflow #1603
Conversation
Example test results:
|
Related OpenSearch Dashboards PR: opensearch-project/OpenSearch-Dashboards#1190 |
) | ||
|
||
def get_cmd(self, script, security, manifest_build_location): | ||
return f"{script}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be updated but current bwctest.sh
doesn't accept other arguments: https://github.com/opensearch-project/anomaly-detection/blob/main/bwctest.sh
Adding backwards compatability workflow for OpenSearch and OpenSearch Dashboards. Issue: opensearch-project#705 Signed-off-by: Kawika Avilla <[email protected]>
ea3a423
to
f3b674c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
Update READMEs wrt bwc tests soon.
with TemporaryDirectory(keep=self.args.keep, chdir=True) as work_dir: | ||
all_results = TestSuiteResults() | ||
for component in self.components.select(focus=self.args.component): | ||
if component.name in self.test_manifest.components: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but we do a similar workflow in many places and I don't love the double-select here, first pass --component name
to pick a component, but then we also only want components that have a test configuration.
One option would be to fail if self.args.component not in self.test_manifest.components
with an explicit error, and refactor components.select
to take an array of components, i.e. self.components.select(focus=self.test_manifest.components)
.
Another, possibly better, could be to do self.components.select(focus=self.args.component, configs=self.test_manifest.components, key: "bwc_test")
that would return a set of tuples of component + configuration. The code then becomes quite clean:
for component, config in self.components.select(focus=self.args.component, configs: self.test_manifest.components, key: "bwc_test"):
test_suite = ...
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a cleanup issue here: #1604 and assigned myself.
Signed-off-by: Kawika Avilla <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1603 +/- ##
============================================
+ Coverage 94.50% 94.52% +0.01%
Complexity 13 13
============================================
Files 153 162 +9
Lines 3296 3433 +137
Branches 13 21 +8
============================================
+ Hits 3115 3245 +130
- Misses 172 185 +13
+ Partials 9 3 -6
Continue to review full report at Codecov.
|
test-configs: | ||
- with-security | ||
- without-security | ||
schema-version: '1.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit; Can we move this to the top?
Or run BWC tests against an existing build. | ||
|
||
```bash | ||
./test.sh bwc-test manifests/1.3.0/opensearch-1.3.0-test.yml --paths opensearch=https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/869/linux/x64 # looks for https://.../builds/opensearch/manifest.yml and https://.../dist/opensearch/manifest.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great documentation
@@ -0,0 +1,39 @@ | |||
# SPDX-License-Identifier: Apache-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this class is a whole lot of stuff for effectively two lines of differentiated behavior. I don't think there is an easier way but food for thought
mock_bundle_manifest = MagicMock() | ||
mock_bundle_manifest.components = mock_components | ||
|
||
mock_build_manifest = MagicMock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit; Looks like you setup mock manifests a couple of times over, might be worthwhile to add MockBuildManifest/MockTestManifest that could condense these unit tests, or at least let them reuse the same setup logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note; even if they used a 'canned' construction pattern and then you modified them afterward to fit one test or another that could be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great contribution!
We've got an outstanding item #1512 to make sure the test workflows have typing information - do you think you could see about adding in typing info in your new classes? If you'd like to pickup that issue separately that works for me too.
Not sure what you quiet mean here. Do you have an example? If it requires updates, then probably will need to do this in the integ tests as well. Which might be beneficial to create another clean up task that I can do to get the bwc tests and integ tests aligned. |
I've merged your change, checkout issue #1237 for a detailed explanation with some example PRs |
Will do and will handle some of the clean ups you suggested |
* BWC test workflow Adding backwards compatability workflow for OpenSearch and OpenSearch Dashboards. Issue: opensearch-project#705 Signed-off-by: Kawika Avilla <[email protected]> * [BWC] Update docs and return cmd Signed-off-by: Kawika Avilla <[email protected]>
Description
Adding backwards compatability workflow for OpenSearch and OpenSearch
Dashboards.
Signed-off-by: Kawika Avilla [email protected]
Issues Resolved
#705
Check List
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.