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 support to run benchmark against min distribution #3684

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

rishabh6788
Copy link
Collaborator

Description

This PR adds support to run benchmark tests against min bundle.

Issues Resolved

#3516

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.

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #3684 (00b5b45) into main (b3534a9) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 00b5b45 differs from pull request most recent head a59ec75. Consider uploading reports for the commit a59ec75 to get more accurate results

@@            Coverage Diff             @@
##             main    #3684      +/-   ##
==========================================
+ Coverage   91.53%   91.54%   +0.01%     
==========================================
  Files         182      182              
  Lines        5408     5419      +11     
==========================================
+ Hits         4950     4961      +11     
  Misses        458      458              
Impacted Files Coverage Δ
src/run_benchmark_test.py 93.33% <100.00%> (+1.02%) ⬆️
..._workflow/benchmark_test/benchmark_test_cluster.py 85.05% <100.00%> (+0.17%) ⬆️
...t_workflow/benchmark_test/benchmark_test_runner.py 95.45% <100.00%> (+0.45%) ⬆️
...benchmark_test/benchmark_test_runner_opensearch.py 96.77% <100.00%> (+0.22%) ⬆️
...k_test/benchmark_test_runner_opensearch_plugins.py 85.71% <100.00%> (+2.38%) ⬆️
..._workflow/benchmark_test/benchmark_test_runners.py 100.00% <100.00%> (ø)

Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

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

Hi @rishabh6788 add some comments here.

Thanks!

Comment on lines 23 to 26
manifest: Union[BundleManifest, BuildManifest]
benchmark_args = BenchmarkArgs()
console.configure(level=benchmark_args.logging_level)
manifest = BundleManifest.from_file(benchmark_args.bundle_manifest)
manifest = BundleManifest.from_file(benchmark_args.bundle_manifest) if not benchmark_args.min_distribution else \
BuildManifest.from_file(benchmark_args.bundle_manifest)
Copy link
Member

Choose a reason for hiding this comment

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

I think you can just combine these two?

manifest: Union[BundleManifest, BuildManifest] = <> ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated.

Comment on lines +126 to +127
f"https://artifacts.opensearch.org/snapshots/core/opensearch/{self.manifest.build.version}/opensearch-min-"
f"{self.manifest.build.version}-linux-{self.manifest.build.architecture}-latest.tar.gz",
Copy link
Member

Choose a reason for hiding this comment

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

Not really liking this but does build manifest not providing any of this information?
If so I would seriously thinking about Prudhvi suggestion to just assemble raw min without plugin before pushing to artifact.opensearch.org.

Copy link
Member

Choose a reason for hiding this comment

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

Probably create an issue related to this as a later improvements?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@rishabh6788 rishabh6788 Jun 28, 2023

Choose a reason for hiding this comment

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

As of now the BuildManifest doesn't have location field in the manifest therefore had to format the url to download the min distribution. It is also not supported in the schema.
I will create an issue to track this and update once the field becomes available.

Copy link
Member

Choose a reason for hiding this comment

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

I believe what we are saying is today snapshots min is created same way as we build distribution but just with 1 component OpenSearch. So it has all the things that distribution does. Regarding commit id that you want, we can get that if we also upload the manifest.yml to artifacts.opensearch.org in the same way as we upload min tarball.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gaiksaya Peter's change uploads the min-snapshot manifest too, it is of type BuildManifest which doesn't have location field in it as per schema.
min-snapshot manifest https://artifacts.opensearch.org/snapshots/core/opensearch/2.9.0-SNAPSHOT/opensearch-min-2.9.0-SNAPSHOT-linux-arm64-latest.tar.gz.build-manifest.yml
@peterzhuamazon

Copy link
Member

@peterzhuamazon peterzhuamazon Jun 28, 2023

Choose a reason for hiding this comment

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

Hi @gaiksaya we are creating with build, not assemble after build, this means only build manifest is present which seems that does not have the location information.

By running another round of assemble without plugin would just repackage min into a tar with a startup script and bundle manifest. The reason I am hesitate because that startup script will break due to no SEC and PA plugins.

Therefore, I would say put this as a later improvement in an issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bundling min with startup script is not the right way forward as it will fail due to lack of security plugin.

Copy link
Member

Choose a reason for hiding this comment

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

I see what you mean! Yeah we need to add check if plugin exists in start up scripts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Created issue #3686 to track above mentioned requirements. @gaiksaya @peterzhuamazon

@rishabh6788 rishabh6788 merged commit cc7252d into opensearch-project:main Jun 28, 2023
9 checks passed
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.

3 participants