-
Notifications
You must be signed in to change notification settings - Fork 278
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
Support new distribution-validations and add few enhancements to validation workflow #4447
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4447 +/- ##
==========================================
+ Coverage 91.55% 91.99% +0.44%
==========================================
Files 190 192 +2
Lines 6214 6284 +70
==========================================
+ Hits 5689 5781 +92
+ Misses 525 503 -22 ☔ View full report in Codecov by Sentry. |
949582b
to
3261601
Compare
@@ -61,7 +61,7 @@ def start_cluster(self) -> bool: | |||
def validation(self) -> bool: | |||
# STEP 2 . inspect image digest between opensearchproject(downloaded/local) and opensearchstaging(dockerHub) | |||
if not self.args.using_staging_artifact_only: | |||
self.image_names_list = [self.args.OS_image, self.args.OSD_image] | |||
self.image_names_list = ['opensearchproject/' + project for project in self.args.projects] | |||
self.image_names_list = [x for x in self.image_names_list if (os.path.basename(x) in self.args.projects)] |
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.
what does these two lines of self.image_names_list
do?
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.
Second this.
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 have unassigned the args self.args.OS_image, self.args.OSD_image in args.py and declared a list which stores the images names based on projects=["opensearch", "opensearchdashboards"]
FYI: self.OS_image = 'opensearchproject/opensearch'
self.OSD_image = 'opensearchproject/opensearch-dashboards'
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, Divya, I just feel a bit redundant here becasue you constructed the image_names_list from args.projects on the first line of code, and then you do a filtering from the same args.projects on the next line of code. Could you give me an exmaple of expected output from the 2nd line of code assuming the image_names_list has ["opensearchproject/opensearch", "opensearchproject/opensearchdashboards"] at the first line?
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 get it now. Sorry missed this line while editing. It's of no use. Will remove it Thanks for pointing.
execute(f'sudo {set_password} dpkg -i {os.path.basename(self.args.file_path.get(project))}', str(self.tmp_dir.path)) | ||
time.sleep(80) | ||
except: | ||
raise Exception("Failed to install Opensearch") |
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 the product might be anything? OpenSearch or Dashboards? Recommending to make the error message generic.
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.
^^
|
||
if args.distribution == "docker": | ||
if args.osd_build_number != "latest" and "opensearch-dashboards" not in args.projects: | ||
raise Exception("Provide opensearch-dashboards in projects argument to validate OSD") |
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:
raise Exception("Provide opensearch-dashboards in projects argument to validate OSD") | |
raise Exception("Provide opensearch-dashboards in projects argument to validate OpenSearch-Dashboards") |
Hi Divya, can you please add more details in the PR description explaining what changes are being made. Looks like it is doing a lot more than debian and zip validation. Thanks! |
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 @Divyaasm ,
As @gaiksaya also pointed out here, the PR is huge with a lot of information but little comments or descriptions on what is happening.
I would suggest you separate this PR into two separate ones, lets review and get deb merge and we understand your approach before going back on win zip, as you can also avoid duplicate changes.
You are also missing tests on the PR. With a big PR like this I am hesitate to just merge through without any tests.
Please take a look at the comments and let us know. 😄
Thanks.
execute(f'sudo {set_password} dpkg -i {os.path.basename(self.args.file_path.get(project))}', str(self.tmp_dir.path)) | ||
time.sleep(80) | ||
except: | ||
raise Exception("Failed to install Opensearch") |
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.
^^
@@ -61,7 +61,7 @@ def start_cluster(self) -> bool: | |||
def validation(self) -> bool: | |||
# STEP 2 . inspect image digest between opensearchproject(downloaded/local) and opensearchstaging(dockerHub) | |||
if not self.args.using_staging_artifact_only: | |||
self.image_names_list = [self.args.OS_image, self.args.OSD_image] | |||
self.image_names_list = ['opensearchproject/' + project for project in self.args.projects] | |||
self.image_names_list = [x for x in self.image_names_list if (os.path.basename(x) in self.args.projects)] |
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.
Second this.
Sure Sayali |
6efda2d
to
6817dfc
Compare
Signed-off-by: Divya Madala <divyaasm@amazon.com> Add changes to docker Signed-off-by: Divya Madala <divyaasm@amazon.com> Add requested changes Signed-off-by: Divya Madala <divyaasm@amazon.com> Add testcases Signed-off-by: Divya Madala <divyaasm@amazon.com>
3ba53cf
to
ce41e97
Compare
Signed-off-by: Divya Madala <divyaasm@amazon.com>
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.
More questions.
Signed-off-by: Divya Madala <divyaasm@amazon.com>
Signed-off-by: Divya Madala <divyaasm@amazon.com>
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 @Divyaasm .
Add a few nitpiks but those are more for the further improvements later.
As for now we just need to address the parameter name change to be more inline with the behavior.
Thanks.
f"{self.args.arch}/{self.args.distribution}/dist/{project}/{project}-{self.args.version}-{self.args.platform}-" | ||
f"{self.args.arch}.{file_name_suffix}" | ||
) | ||
if self.args.distribution == "yum": |
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.
TODO: APT will be added in a future PR, so probably need to think about how to use generic function instead of having a if statement specifically on yum.
Signed-off-by: Divya Madala <divyaasm@amazon.com>
Thanks @Divyaasm for addressing these comments. Thanks. |
Hi @Divyaasm you need to address the python test failure. |
Signed-off-by: Divya Madala <divyaasm@amazon.com>
Description
compose file when both OS and OSD are provided.
Addresses #4424 and #4423
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.