-
Notifications
You must be signed in to change notification settings - Fork 272
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
Conversation
565f5d2
to
00b5b45
Compare
Codecov Report
@@ 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
|
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.
Hi @rishabh6788 add some comments here.
Thanks!
src/run_benchmark_test.py
Outdated
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) |
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.
I think you can just combine these two?
manifest: Union[BundleManifest, BuildManifest] = <> ?
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.
updated.
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", |
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 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.
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.
Probably create an issue related to this as a later improvements?
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.
I think we are already doing that https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/opensearch/distribution-build.jenkinsfile#L156-L168
Just need to upload the manifest too?
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.
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.
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.
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.
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.
@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
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.
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.
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.
Bundling min with startup script is not the right way forward as it will fail due to lack of security plugin.
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.
I see what you mean! Yeah we need to add check if plugin exists in start up scripts.
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 issue #3686 to track above mentioned requirements. @gaiksaya @peterzhuamazon
Signed-off-by: Rishabh Singh <[email protected]>
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.