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 Java home argument to the manifest workflow #2354

Closed
wants to merge 2 commits into from

Conversation

zelinh
Copy link
Member

@zelinh zelinh commented Jul 20, 2022

Description

Add Java home argument to the manifest workflow based on the manifest version. If it's 1.x (in our case 1.3.x primarily), it will add jdk 11 argument. If it's 2.x or 3.x, it will add jdk 17 for now. Otherwise, it will set to jdk17 by default.

Issues Resolved

#2044

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.

zelinh added 2 commits July 19, 2022 13:28
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@zelinh zelinh requested a review from a team as a code owner July 20, 2022 19:11
@zelinh zelinh self-assigned this Jul 20, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2022

Codecov Report

Merging #2354 (e94faf4) into main (858dc0e) will increase coverage by 0.32%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #2354      +/-   ##
============================================
+ Coverage     94.61%   94.94%   +0.32%     
============================================
  Files           209      157      -52     
  Lines          4309     4134     -175     
  Branches         29       19      -10     
============================================
- Hits           4077     3925     -152     
+ Misses          226      209      -17     
+ Partials          6        0       -6     
Impacted Files Coverage Δ
src/manifests_workflow/input_manifests.py 98.98% <100.00%> (+0.01%) ⬆️
tests/jenkins/jobs/UploadTestResults_Jenkinsfile
...ests/jenkins/jobs/AssembleManifest_rpm_Jenkinsfile
src/jenkins/InputManifest.groovy
...bs/PrintArtifactDownloadUrlsForStaging_Jenkinsfile
...tifactsQualifier_OpenSearch_Dashboards_Jenkinsfile
tests/jenkins/jobs/SignArtifacts_Jenkinsfile
...sts/jenkins/jobs/DetectTestDockerAgent_Jenkinsfile
...ests/jenkins/jobs/AssembleManifest_tar_Jenkinsfile
tests/jenkins/jobs/BuildYumRepo_Jenkinsfile
... and 43 more

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

This is going to start adding JDK args into OpenSearch Dashboards' manifests as well, which is certainly not desired.

I think you need to do something more elaborate. Instead of hard-coding both image_map and data: Dict = ... maybe create a folder structure with templates and load those depending on the product and version being built, falling back to a default that doesn't have anything in it?

manifests/templates/opensearch/main/manifest.yml
manifests/templates/opensearch/2.x/manifest.yml
manifests/templates/opensearch-dashboards/main/manifest.yml

Another alternative would be to look for the previous version of the manifest, and copy image and args from there. Maybe simpler?

Finally, if you do go the hard-coded route, create a map of maps to split up OS and OSD.

@zelinh
Copy link
Member Author

zelinh commented Jul 20, 2022

This is going to start adding JDK args into OpenSearch Dashboards' manifests as well, which is certainly not desired.

I think you need to do something more elaborate. Instead of hard-coding both image_map and data: Dict = ... maybe create a folder structure with templates and load those depending on the product and version being built, falling back to a default that doesn't have anything in it?

manifests/templates/opensearch/main/manifest.yml
manifests/templates/opensearch/2.x/manifest.yml
manifests/templates/opensearch-dashboards/main/manifest.yml

Another alternative would be to look for the previous version of the manifest, and copy image and args from there. Maybe simpler?

Finally, if you do go the hard-coded route, create a map of maps to split up OS and OSD.

oops you are right. I didn't think about about the dashboard situation. I will close this PR for now and dive into the solution you propose. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants