-
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
Add JAVA_HOME arguments in manifest workflow from template manifests. #2358
Conversation
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #2358 +/- ##
=========================================
Coverage 94.61% 94.62%
Complexity 27 27
=========================================
Files 209 209
Lines 4309 4316 +7
Branches 29 29
=========================================
+ Hits 4077 4084 +7
Misses 226 226
Partials 6 6
Help us with your feedback. Take ten seconds to tell us how you rate us. |
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
This PR is intended to refactor some of our hardcoding in our |
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.
LGTM. 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.
This is good!
See below to make it a bit simpler.
Write tests for using the default
manifest vs. using a manifest file that exists.
src/manifests/input_manifest.py
Outdated
@@ -136,6 +136,8 @@ def __init__(self, data: dict) -> None: | |||
|
|||
def __to_dict__(self) -> dict: | |||
return { | |||
"name": self.name | |||
} if self.args is None else { |
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.
You don't need to do this because to_dict
should compact the outcome. Just return what you have in else
.
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.
@dblock Actually I think we might need this. Otherwise it will output args: None
in dashboard manifest it generated.
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.
Make sure we call to_dict
, which removes these None
values.
input_manifest_templates = InputManifest.from_file(open(template_full_path)) | ||
else: | ||
input_manifest_templates = InputManifest.from_file(open(os.path.join(templates_base_path, self.prefix, | ||
"2.x", "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.
This hard-coding is bound to cause problems.
- Use the entire manifest, not just the
templates.ci
part, so remove the defaultdata
. - Add a default folder for the default manifest and load that instead of 2.x/manifest.yml.
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
9efd62a
to
26b57fe
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.
I think there's one more problem, the manifests CI workflow is going to pickup these templates. They probably need to move or the folder needs to be excluded somehow.
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Description
Add Java home argument to the manifest workflow based on the manifest version based on its major version templates stored in the
manifests
folder. 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 be corresponded with 2.x templates which has jdk17 by default.Followup to the previous closed PR #2354
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.