-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix: Use Internal CLI templates #3590
Conversation
@@ -70,6 +70,10 @@ | |||
} | |||
|
|||
|
|||
def get_local_manifest_path(): | |||
return os.path.join(_init_path, "lib", "init", "local_manifest.json") |
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.
Can we use pathlib
here for consistency?
@@ -0,0 +1,176 @@ | |||
{ | |||
"dotnetcore3.1": [ |
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.
Should we get rid of the runtimes no longer supported by lambda from this manifest? @mndeveci
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.
Agreed, we are working on to remove them from app template repo, let's don't include them here at all.
@@ -124,7 +128,9 @@ def get_app_template_location(self, template_directory): | |||
return os.path.normpath(os.path.join(self._git_repo.local_path, template_directory)) | |||
|
|||
def get_manifest_path(self): | |||
return Path(self._git_repo.local_path, self.manifest_file_name) | |||
if self._git_repo.local_path and os.path.exists(Path(self._git_repo.local_path, self.manifest_file_name)): |
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.
Instead of os.path.exists
could we use Path(..).exists()
for pathlib
consistency moving forward?
tests/unit/commands/init/test_cli.py
Outdated
file_name_path = "local_manifest.json" | ||
self.assertIn(file_name_path, manifest_path) | ||
|
||
# @patch("samcli.commands.init.init_templates.InitTemplates.get_preprocessed_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.
Are these commented lines okay to remove if unused?
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.
Let's remove commented lines if we don't need them anymore
* bug fix for sunning samcli when cloning fails * fixed failing test in Appveyor * change os.path to pathlib.Path
Which issue(s) does this change fix?
#3576
Why is this change necessary?
Customers are currently experience issues when they can't clone
How does it address the issue?
Allow customers without internet or who can't clone the git repo access internal template without breaking
What side effects does this change have?
None
Checklist
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.